
gitlab-ci used to run all of our jobs in parallel, now it mostly seems to run them sequentially. So splitting up the various parts of the CI suite into separate jobs mostly slows things down. This combines the static tests into one job (lint, pmd, checkstyle, tools) with the JVM tests aka Robolectric. That makes three jobs from the previous six.
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
image: fdroid/ci:client-20161223
|
|
|
|
cache:
|
|
paths:
|
|
- .gradle/wrapper
|
|
- .gradle/caches
|
|
|
|
before_script:
|
|
- export GRADLE_USER_HOME=$PWD/.gradle
|
|
|
|
test:
|
|
script:
|
|
- cd app
|
|
- ./tools/langs-list-check.py
|
|
- ./tools/check-string-format.py
|
|
- cd ..
|
|
- ./gradlew assemble -PdisablePreDex
|
|
# always report on lint errors to the build log
|
|
- sed -i -e 's,textReport .*,textReport true,' app/build.gradle
|
|
- ./gradlew lint -PdisablePreDex
|
|
- ./gradlew pmd -PdisablePreDex
|
|
- ./gradlew checkstyle -PdisablePreDex
|
|
- ./gradlew test -PdisablePreDex || {
|
|
for log in app/build/reports/*ests/*/*ml; do
|
|
echo "read $log here:";
|
|
cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com;
|
|
done;
|
|
exit 1;
|
|
}
|
|
|
|
connected10:
|
|
variables:
|
|
AVD_SDK: "10"
|
|
script:
|
|
- emulator64-arm -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
|
|
- ./tools/wait-for-emulator
|
|
- adb shell input keyevent 82 &
|
|
- export EXITVALUE=0
|
|
- ./gradlew connectedCheck -PdisablePreDex || {
|
|
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
|
|
allow_failure: true
|
|
|
|
connected24:
|
|
variables:
|
|
AVD_SDK: "24"
|
|
script:
|
|
- emulator64-x86 -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
|
|
- ./tools/wait-for-emulator
|
|
- adb shell input keyevent 82 &
|
|
- export EXITVALUE=0
|
|
- ./gradlew connectedCheck -PdisablePreDex || {
|
|
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
|
|
|
|
after_script:
|
|
# this file changes every time but should not be cached
|
|
- rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
|
|
- rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/
|