diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-07-02 14:14:29 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-03 14:24:18 -0700 |
commit | d6b043cd37b1d99aca0f7c52ca12c3671dddecf4 (patch) | |
tree | 8121ba3ff337d2500d20af26ad18b53aa2e7be48 | |
parent | 0661c748809e0f87b717ab4b2292ed7ca644d926 (diff) | |
download | subsurface-d6b043cd37b1d99aca0f7c52ca12c3671dddecf4.tar.gz |
build-system: tell Travis to wait longer for downloads
But simply ignore when building outside of Travis.
Of course since we are building Android in a container, we need to first pass
the environment variable to the container...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-x | packaging/android/android-build-wrapper.sh | 14 | ||||
-rw-r--r-- | scripts/android/travisbuild.sh | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh index 3c024ba17..d88eebe7a 100755 --- a/packaging/android/android-build-wrapper.sh +++ b/packaging/android/android-build-wrapper.sh @@ -13,7 +13,13 @@ # Qt/5.9/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake # (this script tries to do this automatically) -set -x # make debugging Travis easier +# avoid timeouts on Travis when downloads take a long time +SLOW_PROG="" +if [ -n "${TRAVIS:-}" ]; then + source subsurface/scripts/travis-wait.sh + set -x # make debugging Travis easier + SLOW_PROG="travis_wait" +fi exec 1> >(tee ./build.log) 2>&1 @@ -65,14 +71,14 @@ fi # first we need to get the Android SDK and NDK if [ ! -d $ANDROID_NDK ] ; then if [ ! -f $NDK_BINARIES ] ; then - wget -q https://dl.google.com/android/repository/$NDK_BINARIES + $SLOW_PROG wget -q https://dl.google.com/android/repository/$NDK_BINARIES fi unzip -q $NDK_BINARIES fi if [ ! -d $ANDROID_SDK ] ; then if [ ! -f $SDK_TOOLS ] ; then - wget -q https://dl.google.com/android/repository/$SDK_TOOLS + $SLOW_PROG wget -q https://dl.google.com/android/repository/$SDK_TOOLS fi mkdir $ANDROID_SDK pushd $ANDROID_SDK @@ -89,7 +95,7 @@ fi QT_DOWNLOAD_URL=https://download.qt.io/archive/qt/${QT_VERSION}/${LATEST_QT}/${QT_BINARIES} if [ ! -d Qt ] ; then if [ ! -f ${QT_BINARIES} ] ; then - wget -q ${QT_DOWNLOAD_URL} + $SLOW_PROG wget -q ${QT_DOWNLOAD_URL} fi chmod +x ./${QT_BINARIES} ./${QT_BINARIES} --platform minimal --script "$SUBSURFACE_SOURCE"/qt-installer-noninteractive.qs --no-force-installations diff --git a/scripts/android/travisbuild.sh b/scripts/android/travisbuild.sh index 8cec02585..84ce42f6d 100644 --- a/scripts/android/travisbuild.sh +++ b/scripts/android/travisbuild.sh @@ -3,7 +3,7 @@ set -x set -e -docker exec -t builder subsurface/packaging/android/android-build-wrapper.sh +docker exec -e TRAVIS="$TRAVIS" -t builder subsurface/packaging/android/android-build-wrapper.sh # Extract the built apk from the builder container docker cp builder:/workspace/subsurface-mobile-build-arm/build/outputs/apk/ . |