gitlab-ci: update to latest ci-images-client image
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 089f63d..3514050 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,12 +8,14 @@
before_script:
- export GRADLE_USER_HOME=$PWD/.gradle
- export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle`
- - echo y | android --silent update sdk --no-ui --filter android-${ANDROID_COMPILE_SDK}
+ - echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
- export ANDROID_BUILD_TOOLS=`sed -n "s,.*buildToolsVersion\s*'\([0-9][0-9.]*\)'.*,\1,p" app/build.gradle`
- - echo y | android --silent update sdk --no-ui --all --filter android-${ANDROID_BUILD_TOOLS}
+ - echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
- apt-get update && apt-get -y install gnupg
test:
+ only:
+ - branches
script:
- ./gradlew checkstyle
- ./gradlew assembleDebug
@@ -33,46 +35,29 @@
- sed -i 's,versionCode="[^"]*",versionCode="2070",' app/src/main/AndroidManifest.xml
- ./create_ota.sh release binaries
-connected10:
- variables:
- AVD_SDK: "10"
+.connected-template: &connected-template
script:
- - emulator64-arm -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
- - ./tools/wait-for-emulator
+ - ./gradlew assembleDebug
+ - echo y | sdkmanager "platforms;android-$AVD_SDK" > /dev/null
+ - if ! avdmanager list avd | grep "Name. avd$AVD_SDK$"; then
+ rm -rf ~/.android/avd $ANDROID_HOME/system-images;
+ echo y | sdkmanager "$AVD_PACKAGE" > /dev/null;
+ echo no | avdmanager create avd --name avd$AVD_SDK --tag "$AVD_TAG" --package "$AVD_PACKAGE";
+ avdmanager list avd;
+ fi
+ - emulator64-arm -avd avd$AVD_SDK -no-audio -no-window -no-snapstorage &
+ - wait-for-emulator
- adb shell input keyevent 82 &
- - export EXITVALUE=0
- - ./gradlew connectedCheck || {
- adb -e logcat -d '*:E';
- echo "get the full logcat here:";
- adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com;
- export EXITVALUE=1;
- }
- - for log in app/build/reports/*ests/*/*ml
- app/build/outputs/*results*/connected/*.xml; do
- echo "read $log here:";
- cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com;
- done
+ - ./gradlew connectedCheck || (adb -e logcat -d '*:E' > logcat.txt; exit 1)
connected24:
+ only:
+ - branches
variables:
AVD_SDK: "24"
- script:
- - emulator64-arm -avd fcl-test-$AVD_SDK -no-audio -no-window &
- - ./tools/wait-for-emulator
- - adb shell input keyevent 82 &
- - export EXITVALUE=0
- - ./gradlew connectedCheck || {
- adb -e logcat -d '*:E';
- echo "get the full logcat here:";
- adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com;
- export EXITVALUE=1;
- }
- - for log in app/build/reports/*ests/*/*ml
- app/build/outputs/*results*/connected/*.xml; do
- echo "read $log here:";
- cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com;
- done
- - exit $EXITVALUE
+ AVD_TAG: "default"
+ AVD_PACKAGE: "system-images;android-${AVD_SDK};${AVD_TAG};armeabi-v7a"
+ <<: *connected-template
after_script:
# this file changes every time but should not be cached