-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
113 lines (90 loc) · 2.61 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
language: android
sudo: required
env:
global:
- BUILD_TOOLS=25.0.2
matrix:
include:
- env:
- DESC="Basic PR verification"
- CMD="./.ci/travis/check_pr.sh;./.ci/validate-codecov.sh"
- CMD_AFTER_SUCCESS='echo "PR validation successful"'
- CMD_AFTER_FAILURE='echo "PR validation failed"'
- env:
- DESC="API 21"
- EMULATOR_API=21
- IMAGE=sys-img-armeabi-v7a-android-$EMULATOR_API
- CMD="./gradlew clean build coverage;killall adb"
- CMD_BEFORE=".ci/travis/startEmulator.sh"
- CMD_AFTER_SUCCESS="bash <(curl -s https://codecov.io/bash);.ci/travis/apkHost.sh"
- CMD_AFTER_FAILURE=".ci/travis/pastebinit.sh"
- env:
- DESC="API 22"
- EMULATOR_API=22
- IMAGE=sys-img-armeabi-v7a-android-$EMULATOR_API
- CMD="./gradlew clean build coverage;killall adb"
- CMD_BEFORE=".ci/travis/startEmulator.sh"
- CMD_AFTER_SUCCESS="bash <(curl -s https://codecov.io/bash);.ci/travis/apkHost.sh"
- CMD_AFTER_FAILURE=".ci/travis/pastebinit.sh"
android:
components:
- tools
- tools
- platform-tools
- build-tools-${BUILD_TOOLS}
- extra-google-google_play_services
- extra-google-m2repository
- addon-google_apis-google-$EMULATOR_API
- extra-android-m2repository
- extra-android-support
#- extra-google-android-support
- android-$EMULATOR_API
- $IMAGE
jdk:
- oraclejdk8
os:
- linux
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
- ~/.m2
addons:
apt:
packages:
- pastebinit
- jq
licenses:
- '.+'
before_install:
- android list targets
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
# Emulator Management: Create, Start and Wait
before_script:
- |
set -e
eval $CMD_BEFORE;
script:
- |
set -e
eval $CMD;
after_failure:
- |
set -e
eval $CMD_AFTER_FAILURE;
after_success:
- |
set -e
eval $CMD_AFTER_SUCCESS;
notifications:
slack: macbitsgoa:ll3YNWLieRUgdN3RNSwkOoeW
#If you don’t want to run a build for a particular commit for any reason,
# add [ci skip] or [skip ci] to the git commit message.
#Commits that have [ci skip] or [skip ci] anywhere in the commit messages
#are ignored by Travis CI.