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/ .