blob: bcf7a839071d0fd19342ec24d0642516e73cf405 [file] [log] [blame]
Hans-Christoph Steinereb54f682017-03-14 22:09:29 +01001image: registry.gitlab.com/fdroid/ci-images:client
Hans-Christoph Steiner91d025c2016-08-08 16:35:46 +02002
3cache:
4 paths:
5 - .gradle/wrapper
6 - .gradle/caches
7
8test:
9 script:
10 - export GRADLE_USER_HOME=$PWD/.gradle
Hans-Christoph Steiner8cb5c092017-03-17 12:12:32 +010011 - ./gradlew checkstyle
Hans-Christoph Steinere40a2502016-08-08 16:36:31 +020012 # always report on lint errors to the build log
13 - sed -i -e 's,textReport .*,textReport true,' app/build.gradle
Hans-Christoph Steiner899f6da2016-08-09 16:33:17 +020014 - ./gradlew build || {
Hans-Christoph Steiner91d025c2016-08-08 16:35:46 +020015 for log in app/build/reports/*ests/*/*ml; do
16 echo "read $log here:";
17 cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com;
18 done;
19 exit 1;
20 }
21 # this file changes every time but should not be cached
22 - rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
Hans-Christoph Steiner0887baf2016-08-10 11:59:12 +020023 - rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/
24
25connected10:
26 variables:
27 AVD_SDK: "10"
28 script:
29 - export GRADLE_USER_HOME=$PWD/.gradle
30 - emulator64-arm -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
31 - ./tools/wait-for-emulator
32 - adb shell input keyevent 82 &
33 - export EXITVALUE=0
34 - ./gradlew connectedCheck || {
35 adb -e logcat -d '*:E';
36 echo "get the full logcat here:";
37 adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com;
38 export EXITVALUE=1;
39 }
40 - for log in app/build/reports/*ests/*/*ml
41 app/build/outputs/*results*/connected/*.xml; do
42 echo "read $log here:";
43 cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com;
44 done
45 # this file changes every time but should not be cached
46 - rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
47 - exit $EXITVALUE
48
49connected24:
50 variables:
51 AVD_SDK: "24"
52 script:
53 - export GRADLE_USER_HOME=$PWD/.gradle
54 - emulator64-x86 -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
55 - ./tools/wait-for-emulator
56 - adb shell input keyevent 82 &
57 - export EXITVALUE=0
58 - ./gradlew connectedCheck || {
59 adb -e logcat -d '*:E';
60 echo "get the full logcat here:";
61 adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com;
62 export EXITVALUE=1;
63 }
64 - for log in app/build/reports/*ests/*/*ml
65 app/build/outputs/*results*/connected/*.xml; do
66 echo "read $log here:";
67 cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com;
68 done
69 # this file changes every time but should not be cached
70 - rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
71 - rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/
72 - exit $EXITVALUE