forked from WorldBank-Transport/DRIVER-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (50 loc) · 1.84 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
language: android
dist: precise
sudo: required
addons:
apt:
packages:
- oracle-java8-installer
jdk:
- oraclejdk8
android:
licenses:
- '.*intel.+'
- 'android-sdk-license-.+'
components:
- platform-tools
- tools
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
- android-24
- sys-img-armeabi-v7a-android-17
- addon-google_apis-google-17
- android-17
- build-tools-24.0.2
before_install:
- free -m # show available memory on VM
- cp templates/configurables.xml.template app/src/main/res/values/configurables.xml
- ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui -a --filter android-24,tools,platform-tools,addon-google_apis-google-17,extra-android-m2repository,extra-google-m2repository,extra-android-support --force > /dev/null
- ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui -a --filter "build-tools-24.0.2" --force > /dev/null
before_script:
- ulimit -c unlimited -S # increase stack size
- android list targets # to debug
- echo no | android create avd --force -n test -t "Google Inc.:Google APIs:17" --abi armeabi-v7a --skin HVGA
- sleep 5
- emulator -avd test -no-skin -no-audio -no-window -no-boot-anim -dpi-device 480 &
- sleep 10
- android-wait-for-emulator
- adb shell input keyevent 82 &
- sleep 5 && adb shell input keyevent 82 &
# NB: necessary to perform build step first and separately from test run
- ./gradlew build --stacktrace
env:
global:
- ADB_INSTALL_TIMEOUT=8 # in minutes (defaults to 2)
- TERM=dumb
- MALLOC_ARENA_MAX=2
- GRADLE_OPTS='-Dorg.gradle.jvmargs="-Xmx4608m -XX:+HeapDumpOnOutOfMemoryError"'
script:
- ./gradlew connectedCheck --stacktrace