-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
71 lines (56 loc) · 2.06 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
67
68
69
70
71
sudo: required
language: android
jdk: oraclejdk8
env:
global:
- ANDROID_TARGET1=android-21
- ANDROID_TARGET2=android-15
- ANDROID_ABI=armeabi-v7a
android:
components:
- tools
- tools
- platform-tools
- build-tools-24.0.1
- android-24
before_install:
- chmod +x gradlew
script:
# Create two emulator avds.
- echo no | android create avd --force -n test1 -t ${ANDROID_TARGET1} --abi ${ANDROID_ABI}
- echo no | android create avd --force -n test2 -t ${ANDROID_TARGET2} --abi ${ANDROID_ABI}
# Start the first emulator.
- emulator -avd test1 -no-skin -no-audio -no-window &
# Wait for the second emulator to start.
- sh scripts/wait-for-first-emulator.sh
# Just to check whether the device is seen by ADB.
- "adb devices"
# Start the second emulator.
- emulator -avd test2 -no-skin -no-audio -no-window &
# Wait for the second emulator to start.
- sh scripts/wait-for-second-emulator.sh
# Just to check whether the device is seen by ADB.
- "adb devices"
# Unlock the emulators.
- adb -s emulator-5554 shell input keyevent 82
- adb -s emulator-5556 shell input keyevent 82
# Run the main script.
- sh scripts/script.sh
notifications:
email: true
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
after_failure:
# Print all lint output if the build failed.
- "cat /home/travis/build/zsavely/TravisMultipleEmulators/app/build/outputs/lint-results-debug.html"
- "cat /home/travis/build/zsavely/TravisMultipleEmulators/app/build/outputs/lint-results-debug.xml"
- "cat /home/travis/build/zsavely/TravisMultipleEmulators/app/build/outputs/lint-results-release.html"
- "cat /home/travis/build/zsavely/TravisMultipleEmulators/app/build/outputs/lint-results-release.xml"
- "cat /home/travis/build/zsavely/TravisMultipleEmulators/app/build/outputs/lint-results-release-fatal.html"
- "cat /home/travis/build/zsavely/TravisMultipleEmulators/app/build/outputs/lint-results-release-fatal.xml"
cache:
directories:
- "$HOME/.m2"
- "$HOME/.gradle"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"