-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
184 lines (163 loc) · 6 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
language: java
jdk: openjdk8
sudo: required
os: linux
before_cache:
- rm -fr $HOME/.gradle/caches/5.2.1
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
npm: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
# android:
# components:
# - tools
# - platform-tools
# - build-tools-28.0.3
# - android-28
# - android-$API
# - sys-img-$ABI-android-$API
# licenses:
# - 'android-sdk-preview-license-d099d938'
# - 'android-sdk-license-.+'
# - 'google-gdk-license-.+'
env:
global:
- ADB_INSTALL_TIMEOUT=8
matrix:
# - API=29 ABI="google_apis;x86_64" #
# - API=29 ABI="google_apis;x86" #
- API=28 ABI="google_apis;x86" #
# - API=27 ABI="default;x86_64" #
# - API=27 ABI="google_apis;x86" #
# - API=26 ABI="google_apis;x86_64" #
# - API=26 ABI="google_apis;x86" #
# - API=25 ABI="google_apis;x86_64" #
# - API=25 ABI="google_apis;x86" #
# - API=25 ABI="google_apis;armeabi-v7a" #
# - API=25 ABI="google_apis;arm64-v8a" #
# - API=24 ABI="google_apis;x86_64" #
# - API=24 ABI="google_apis;x86" #
# - API=24 ABI="google_apis;armeabi-v7a" #
# - API=24 ABI="google_apis;arm64-v8a" #
# - API=23 ABI="google_apis;x86_64" #
# - API=23 ABI="google_apis;x86" #
# - API=23 ABI="google_apis;armeabi-v7a" #
# - API=22 ABI="google_apis;x86_64" #
# - API=22 ABI="google_apis;x86" #
# - API=22 ABI="google_apis;armeabi-v7a" #
# - API=21 ABI="google_apis;x86_64" #
# - API=21 ABI="google_apis;x86" #
# - API=21 ABI="google_apis;armeabi-v7a" #
# - API=19 ABI="google_apis;x86" #
- API=19 ABI="google_apis;armeabi-v7a" #
# - API=19 ABI="google_apis;armeabi" #
# - API=18 ABI="google_apis;x86" #
# - API=18 ABI="google_apis;armeabi" #
# - API=18 ABI="google_apis;armeabi-v7a" #
# - API=17 ABI="google_apis;x86" #
# - API=17 ABI="google_apis;armeabi" #
# - API=17 ABI="google_apis;armeabi-v7a" #
# - API=16 ABI="google_apis;x86" #
- API=16 ABI="google_apis;armeabi-v7a" #
# - API=16 ABI="google_apis;armeabi" #
branches:
only:
- master
before_install:
- |
if [ $TRAVIS_OS_NAME == "linux" ]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3 # give xvfb some time to start
fi
- ANDROID_TOOLS=4333796 # android-28
- export ANDROID_HOME=~/android-sdk
- wget -q "https://dl.google.com/android/repository/sdk-tools-linux-$ANDROID_TOOLS.zip" -O android-sdk-tools.zip
- unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}
- rm android-sdk-tools.zip
- PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
- export ANDROID_SDK_ROOT=$ANDROID_HOME
# Silence warning.
- mkdir -p ~/.android
- touch ~/.android/repositories.cfg
- yes | sdkmanager --licenses # accept all licenses
- sdkmanager "tools" "platform-tools" > /dev/null # tools + platform-tools
- sdkmanager --list | head -15 # packages list
- sdkmanager "build-tools;28.0.3" "platforms;android-28" > /dev/null # build-tools + compile API version
- sdkmanager --list | head -15 # packages list
- nvm install 11 # for Glide download
install:
- sdkmanager "emulator" > /dev/null # emulator
- sdkmanager "platforms;android-$API" > /dev/null # android platform
- sdkmanager "system-images;android-$API;$ABI" > /dev/null # emulator android system image
- node ./travis_scripts/get-glide.js # Glide
before_script:
- echo no | avdmanager create avd -n test -k "system-images;android-$API;$ABI"
- |
if [[ "${API}${ABI}" == "25google_apis;armeabi-v7a" || "${API}${ABI}" == "24google_apis;armeabi-v7a" ]]; then
EMU_PARAMS="-no-window -gpu swiftshader"
else
EMU_PARAMS="-no-boot-anim -gpu off"
fi
echo $EMU_PARAMS
$ANDROID_HOME/emulator/emulator -avd test -no-accel -no-audio $EMU_PARAMS $EMU_ADDITIONAL_OPTIONS ${EMU_DEBUG} &
- chmod +x ./travis_scripts/android-wait-for-emulator.sh
- ./travis_scripts/android-wait-for-emulator.sh
- adb shell input keyevent 82 &
- chmod +x ./gradlew
script: ./gradlew connectedCheck
jobs:
include:
- stage: deploy
install:
- node ./travis_scripts/get-glide.js # Glide
before_script: chmod +x ./gradlew
script: ./gradlew build jacocoTestReport
before_deploy:
- node ./travis_scripts/deploy.js
- chmod +x ./travis_scripts/appetize_url.sh
- source ./travis_scripts/appetize_url.sh
- echo $APPETIZE_URL
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file:
- "./app/build/outputs/apk/*/*.apk"
- "/home/travis/build/SupinePandora43/Russian/*/build/reports/lint-results.html"
skip_cleanup: true
name: $(date +'%Y.%m.%d.%H:%M.%S')
on:
branch: master
after_success:
- bash <(curl -s https://codecov.io/bash)
# - &test
# stage: testJDK
# jdk:
# - openjdk8
# - <<: *test
# matrix:
# include:
# - jdk: openjdk8
# - jdk: openjdk12
# before_deploy:
# - export TRAVIS_TAG=latest
# - node ./travis_scripts/deploy.js
# - chmod +x ./travis_scripts/appetize_url.sh
# - ./travis_scripts/appetize_url.sh
# - echo $APPETIZE_URL
# deploy:
# provider: releases
# api_key: $GITHUB_TOKEN
# file_glob: true
# file: "./app/build/outputs/apk/*/*.apk"
# skip_cleanup: true
# name: $(date +'%Y.%m.%d.%H:%M.%S')
# on:
# branch: master
# on:
# condition: $TRAVIS_COMMIT_MESSAGE =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$