From be94a5ef8d6c963d0e1868f261d0388931290eb1 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Fri, 13 Oct 2017 06:43:19 -0700 Subject: [PATCH] Fix NDK download in Travis Summary: After about 500MB, Travis seems to kill the TLS connection. Could be a traffic limit, could be a timeout. I've only seen this for their MacOS boxes. We're now retrying a few times with curl, which seems to work. Reviewed By: emilsjolander Differential Revision: D6051024 fbshipit-source-id: feb73bfb9fd81b2a8b9b4d33d4e9f230a9899a66 --- .travis.yml | 2 +- scripts/android-setup.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a25f2e67..3dc8d39c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,7 +76,7 @@ before_install: source scripts/android-setup.sh && installAndroidSDK export ANDROID_SDK=$ANDROID_HOME export ANDROID_NDK_REPOSITORY=$HOME/android-ndk - export ANDROID_NDK_HOME=$ANDROID_NDK_REPOSITORY/android-ndk-r13b + export ANDROID_NDK_HOME=$ANDROID_NDK_REPOSITORY/android-ndk-r15c fi # JavaScript diff --git a/scripts/android-setup.sh b/scripts/android-setup.sh index 72fd198f..fb32766f 100644 --- a/scripts/android-setup.sh +++ b/scripts/android-setup.sh @@ -1,8 +1,9 @@ function download() { + echo "Downloading '$1' to '$2' ..." if hash curl 2>/dev/null; then - curl -L -o $2 $1 + curl --retry 10 -L -o "$2" "$1" elif hash wget 2>/dev/null; then - wget -O $2 $1 + wget -O "$2" "$1" else echo >&2 "No supported download tool installed. Please get either wget or curl." exit