-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
190 lines (169 loc) · 6.8 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
language: android
jdk: oraclejdk8
# Choosing faster environment since it's a full VM.
# https://docs.travis-ci.com/user/reference/overview/
sudo: required
dist: trusty
notifications:
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
email:
env:
global:
- SDK_API=28
- ANDROID_API=28
- EMULATOR_API_LEVEL=25
- ANDROID_BUILD_TOOLS=28.0.3
- ADB_INSTALL_TIMEOUT=55 # minutes
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
- ANDROID_ABI=armeabi-v7a
- ANDROID_TAG=google_apis
- CODECOV_TOKEN=9f07b72b-7d4f-4e39-be15-a6f5044b83b7
- TEST_TYPE=unit
android:
components:
- android-$SDK_API
- tools
- platform-tools
- build-tools-$ANDROID_BUILD_TOOLS
- android-$ANDROID_API
- android-$EMULATOR_API_LEVEL
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository # for design library
- addon-google_apis-google-19 # google play services
- sys-img-armeabi-v7a-addon-google_apis-google-$ANDROID_API_LEVEL
- sys-img-armeabi-v7a-addon-google_apis-google-$EMULATOR_API_LEVEL
# Emulator sys img
- sys-img-$ANDROID_ABI-$ANDROID_TAG-$EMULATOR_API_LEVEL
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
- '.+'
install:
- mkdir "$ANDROID_HOME/licenses" || true
- echo y | android update sdk -u -a -t tools
- echo y | android update sdk -u -a -t platform-tools
- echo y | android update sdk -u -a -t build-tools-28.0.3
- echo y | android update sdk -u -a -t android-28
- echo y | android update sdk -u -a -t android-27
- echo y | android update sdk -u -a -t extra-google-m2repository
- echo y | android update sdk -u -a -t extra-android-m2repository
- echo y | android update sdk -u -a -t android-sdk-preview-license
- echo y | android update sdk -u -a -t android-sdk-license
- echo yes | sdkmanager "platforms;android-28" # Latest platform required by SDK tools
#
#install:
## List and delete unnecessary components to free space
#- sdkmanager --list || true
#
#- sdkmanager --uninstall "system-images;android-15;default;armeabi-v7a"
#- sdkmanager --uninstall "system-images;android-16;default;armeabi-v7a"
#- sdkmanager --uninstall "system-images;android-17;default;armeabi-v7a"
#- sdkmanager --uninstall "system-images;android-18;default;armeabi-v7a"
#- sdkmanager --uninstall "system-images;android-19;default;armeabi-v7a"
#- sdkmanager --uninstall "system-images;android-21;default;armeabi-v7a"
#- sdkmanager --uninstall "extras;google;google_play_services"
#- sdkmanager --uninstall "extras;android;support"
#- sdkmanager --uninstall "platforms;android-10"
#- sdkmanager --uninstall "platforms;android-15"
#- sdkmanager --uninstall "platforms;android-16"
#- sdkmanager --uninstall "platforms;android-17"
#- sdkmanager --uninstall "platforms;android-18"
#- sdkmanager --uninstall "platforms;android-19"
#- sdkmanager --uninstall "platforms;android-20"
#- sdkmanager --uninstall "platforms;android-21"
#- sdkmanager --uninstall "build-tools;21.1.2"
#- echo yes | sdkmanager "tools"
#- echo yes | sdkmanager "platforms;android-28" # Latest platform required by SDK tools
#- echo yes | sdkmanager "extras;android;m2repository"
#- echo yes | sdkmanager "extras;google;m2repository"
#- mkdir "$ANDROID_HOME/licenses" || true
#- echo y | android update sdk -u -a -t tools
#- echo y | android update sdk -u -a -t platform-tools
#- echo y | android update sdk -u -a -t build-tools-28.0.2
#- echo y | android update sdk -u -a -t android-28
#- echo y | android update sdk -u -a -t extra-google-m2repository
#- echo y | android update sdk -u -a -t extra-android-m2repository
#- echo y | android update sdk -u -a -t android-sdk-preview-license
#- echo y | android update sdk -u -a -t android-sdk-license
#- echo yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-27"
#- echo yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-28"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -f $HOME/.gradle/caches/4.10/classAnalysis/classAnalysis.lock
- rm -f $HOME/.gradle/caches/4.10/jarSnapshots/jarSnapshots.lock
- rm -f $HOME/.gradle/caches/4.10.1/classAnalysis/classAnalysis.lock
- rm -f $HOME/.gradle/caches/4.10.1/jarSnapshots/jarSnapshots.lock
cache:
directories:
- $HOME/.gradle/daemon
- $HOME/.gradle/native
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
include:
- env: ANDROID_TARGET=android-28 ANDROID_ABI=armeabi-v7a
allow_failures:
- env: ANDROID_TARGET=android-14 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-15 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-16 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-17 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-18 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-20 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-22 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-23 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-24 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-25 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-26 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-27 ANDROID_ABI=armeabi-v7a
- env: ANDROID_TARGET=android-28 ANDROID_ABI=armeabi-v7a
fast_finish: false
before_script:
# Create and start emulator
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- echo PATH $PATH
- android list target
- android list sdk
- which android-update-sdk
- cat `which android-update-sdk`
- android-update-sdk
- android list sdk --all --extended
- uname -a
- df -h
- mount
- cat /proc/cpuinfo
- echo $ANDROID_TARGET
- echo $ANDROID_ABI
- ././config/ci-before-script.sh
- ././config/cp-google-services-json.sh
#- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
#- emulator -avd test -no-skin -no-window &
#- adb wait-for-device
#- cat `which android-wait-for-emulator`
#- android-wait-for-emulator
#- adb shell input keyevent 82 &
- chmod +x gradlew
before_install:
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
- chmod +x gradlew
- ./gradlew dependencies || true
- pip install --user codecov #Install codecov
script:
- echo "***** START SCRIPT *****"
- echo "Travis branch is $TRAVIS_BRANCH"
- uname -a
- adb devices
- adb shell input keyevent 82 &
- "./gradlew clean build lint --stacktrace createDebugUnitTestCoverageReport coveralls"
#- bash ./config/ci-unit-tests.sh
#- travis_wait bash ./config/ci-setup-emulator.sh
#- travis_wait bash ./config/ci-instrumentation-tests.sh
after_success:
- codecov