From 6606a76848a183009553cf4819cbd29c43bdc92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 21 Mar 2016 13:58:26 +0000 Subject: [PATCH] CI: Do not trust the SDK with reading `echo y` It will randomly fail, so be extra careful. `yes` or echoing without the sleep will also fail because the SDK sucks at reading a single line. Also remove the ANDROID_HOME test since this now runs on the public workers with their default image, which don't have the SDK preinstalled. And ignore SDK install errors, since it likes to complain about not being able to stop the ADB server. If anything doesn't install properly, it will cause errors down the line and CI will fail anyway. --- .gitlab-ci.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7bbfef22..73a621834 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,17 +4,15 @@ before_script: - apt-get -q install -y wget tar unzip python3 - echo " == Installing OpenJDK 7" - apt-get -q install -y openjdk-7-jdk - - test -z "$ANDROID_HOME" && - echo " == Installing Android SDK" && - apt-get -q install -y lib32stdc++6 lib32z1 && - wget -q -O android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz && - tar -xzf android-sdk.tgz && - export ANDROID_HOME=$PWD/android-sdk-linux && - export PATH="$ANDROID_HOME/tools:$PATH" && - echo y | android -s update sdk --no-ui -a -t platform-tools,tools,build-tools-23.0.2,android-22,extra-android-m2repository && - export PATH="$ANDROID_HOME/platform-tools:$PATH" && - export PATH="$ANDROID_HOME/build-tools/23.0.2:$PATH" && - echo y | android -s update sdk --no-ui -a -t android-10 + - echo " == Installing Android SDK" + - apt-get -q install -y lib32stdc++6 lib32z1 + - wget -q -O android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz + - tar -xzf android-sdk.tgz + - export ANDROID_HOME=$PWD/android-sdk-linux + - export PATH="$ANDROID_HOME/tools:$PATH" + - export PATH="$ANDROID_HOME/platform-tools:$PATH" + - export PATH="$ANDROID_HOME/build-tools/23.0.2:$PATH" + - while true; do echo y; sleep 1; done | android -s update sdk --no-ui -a -t platform-tools,tools,build-tools-23.0.2,android-22,extra-android-m2repository,android-10 || true test: script: