-
-
Notifications
You must be signed in to change notification settings - Fork 187
/
.travis.yml
66 lines (60 loc) · 2.2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
language: android
env:
global:
- EMULATOR_API_LEVEL=24
# switch glibc to a memory conserving mode
- MALLOC_ARENA_MAX=2
# wait 5 minutes for adb to connect to emulator. Travis-ci cancels a
# stalled build after 10 minutes, so this should be shorter than that so
# there is time for the build to report the error.
- ADB_INSTALL_TIMEOUT=5
jdk:
- oraclejdk8
#
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
android:
components:
- tools
- platform-tools
- build-tools-23.0.3
- build-tools-27.0.3
- extra-android-m2repository
- android-23
- android-24
- android-$EMULATOR_API_LEVEL
- sys-img-armeabi-v7a-android-$EMULATOR_API_LEVEL
licenses:
# only approve the non-Google licenses
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
script:
# print lint errors/warnings to build log
- sed -i 's,\s*textReport .*,\ttextReport true,g' */build.gradle
# 'assemble' everything and run all checks that do not require a device/emulator
- ./gradlew build -PdisablePreDex
# test release process
- ./gradlew jarRelease -PdisablePreDex
- for f in *netcipher*/build/libs/netcipher*.*; do sha256sum $f; done
# start the emulator after the build to conserve memory
- echo no | android create avd --force -n test --abi default/armeabi-v7a -t android-$EMULATOR_API_LEVEL
- emulator -avd test -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
# install Orbot to test against
- curl --silent https://guardianproject.info/fdroid/archive/Orbot-v15.1.2.apk > orbot.apk
- adb -e install -r orbot.apk
# temp workaround: start Orbot manually, it has a bug that is preventing auto-start
- adb shell am broadcast -a org.torproject.android.intent.action.START -n org.torproject.android/.service.StartTorReceiver
- sleep 5
# now run the tests that require a device/emulator
- ./gradlew connectedCheck -PdisablePreDex
after_failure:
- find * -name lint-results.xml | xargs cat
- adb -e logcat -d '*:E';
- echo "get the full logcat here:";
- adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com;