-
Notifications
You must be signed in to change notification settings - Fork 7
/
.cirrus.yml
188 lines (184 loc) · 8.53 KB
/
.cirrus.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
# Run android emulator on accelerated intel CPU
# or on emulated ARM CPU.
# Includes test.
# +-----------+--------------------+--------------------+
# | API Level | Code Name | Android OS version |
# +-----------+--------------------+--------------------+
# | 29 | 10 | 10 |
# | 28 | Pie | 9 |
# | 27 | Oreo | 8.1 |
# | 26 | Oreo | (dropped ARM) 8.0 |
# | 25 | Nougat | 7.1 |
# | 24 | Nougat | 7.0 |
# | 23 | Marshmallow | 6.0 |
# | 22 | Lollipop | 5.1 |
# | 21 | Lollipop | 5.0 |
# | 20 | Not released | |
# | 19 | Kitkat | 4.4 |
# | 18 | Jellybean | 4.3 |
# | 17 | Jellybean | 4.2 |
# | 16 | Jellybean | 4.1 |
# | 15 | Ice Cream Sandwich | 4.0 |
# | 14 | Not Released | |
# | 13 | Not Released | |
# | 12 | Not Released | |
# | 11 | Not Released | |
# | 10 | Gingerbread | 2.3 |
# +-----------+--------------------+--------------------+
# "https://en.wikipedia.org/wiki/Android_(operating_system)#Platform_information"
# Note: Flutter supports down to API 16
timeout_in: 15m
# matrix of APIxABIxGOO
# (see "sdkmanager --list --verbose| grep ^system-images" for full list)
task:
matrix:
- name: accel, playstore, 29-25
container:
image: cirrusci/flutter:latest
cpu: 4
memory: 10G
kvm: true
env:
matrix:
- API: 29
- API: 28
- API: 27
- API: 26
- API: 25
matrix:
- ABI: x86_64
- ABI: x86
matrix:
- GOO: default
- GOO: google_apis
- GOO: google_apis_playstore
- name: accel, no playstore, 24-21
container:
image: cirrusci/flutter:latest
cpu: 4
memory: 10G
kvm: true
env:
matrix:
- API: 24
- API: 23
- API: 22
- API: 21
matrix:
- ABI: x86_64
- ABI: x86
matrix:
- GOO: default
- GOO: google_apis
- name: accel, x86, 19-16
container:
image: cirrusci/flutter:latest
cpu: 4
memory: 10G
kvm: true
env:
matrix:
- API: 19
- API: 18
- API: 17
- API: 16
ABI: x86
matrix:
- GOO: default
- GOO: google_apis
- name: no accel, ARM, 25-24
container:
image: cirrusci/flutter:latest
cpu: 4
memory: 10G
env:
matrix:
- API: 25
- API: 24
matrix:
- ABI: armeabi-v7a
- ABI: arm64-v8a
matrix:
- GOO: default
- GOO: google_apis
- name: no accel, ARM, 23-16
container:
image: cirrusci/flutter:latest
cpu: 4
memory: 10G
env:
matrix:
- API: 23
- API: 22
- API: 21
- API: 19
- API: 18
- API: 17
- API: 16
ABI: armeabi-v7a
matrix:
- GOO: default
- GOO: google_apis
# remove unsupported jobs from job matrix
only_if: ($API != "27" || $ABI != "x86_64" || $GOO != "google_apis_playstore") && ($API != "27" || $ABI != "x86_64" || $GOO != "google_apis") && ($API != "26" || $ABI != "x86_64" || $GOO != "google_apis_playstore") && ($API != "25" || $ABI != "x86_64" || $GOO != "google_apis_playstore") && ($API != "24" || $ABI != "x86_64" || $GOO != "google_apis_playstore") && ($API != "24" || $ABI != "x86" || $GOO != "google_apis_playstore") && ($API != "25" || $ABI != "armeabi-v7a" || $GOO != "default") && ($API != "25" || $ABI != "arm64-v8a" || $GOO != "default")
# jobs that are flaky or fail consistently
allow_failures: ($API == "29" && $ABI == "x86_64" && $GOO == "google_apis_playstore") || ($API == "29" && $ABI == "x86" && $GOO == "google_apis_playstore") || ($API == "29" && $ABI == "x86" && $GOO == "google_apis") || ($API == "29" && $ABI == "x86_64" && $GOO == "google_apis") || ($API == "29" && $ABI == "x86_64" && $GOO == "default") || ($API == "29" && $ABI == "x86" && $GOO == "default") || ($API == "28" && $ABI == "x86_64" && $GOO == "google_apis_playstore") || ($API == "28" && $ABI == "x86" && $GOO == "google_apis_playstore") || ($API == "28" && $ABI == "x86" && $GOO == "google_apis") || ($API == "26" && $ABI == "x86" && $GOO == "default") || ($API == "25" && $ABI == "x86" && $GOO == "google_apis_playstore") || ($API == "25" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "25" && $ABI == "arm64-v8a" && $GOO == "google_apis") || ($API == "24" && $ABI == "x86" && $GOO == "google_apis") || ($API == "24" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "24" && $ABI == "arm64-v8a" && $GOO == "google_apis") || ($API == "24" && $ABI == "armeabi-v7a" && $GOO == "default") || ($API == "24" && $ABI == "arm64-v8a" && $GOO == "default") || ($API == "23" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "23" && $ABI == "armeabi-v7a" && $GOO == "default") || ($API == "22" && $ABI == "x86_64" && $GOO == "default") || ($API == "22" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "21" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "19" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "19" && $ABI == "armeabi-v7a" && $GOO == "default") || ($API == "18" && $ABI == "x86" && $GOO == "google_apis") || ($API == "18" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "17" && $ABI == "x86" && $GOO == "google_apis") || ($API == "17" && $ABI == "x86" && $GOO == "default") || ($API == "16" && $ABI == "x86" && $GOO == "google_apis") || ($API == "16" && $ABI == "x86" && $GOO == "default") || ($API == "16" && $ABI == "armeabi-v7a" && $GOO == "google_apis") || ($API == "16" && $ABI == "armeabi-v7a" && $GOO == "default")
fix_kvm_script:
- |
if [[ $ABI =~ "x86" ]]; then
sudo chown cirrus:cirrus /dev/kvm
fi
# set_timezone_script:
# set timezone to avoid emulator warning
# - date
# - echo "US/Pacific" | sudo tee /etc/timezone
# - sudo dpkg-reconfigure --frontend noninteractive tzdata
# - export DEBIAN_FRONTEND=noninteractive
# - sudo ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
# - sudo apt-get install -y tzdata
# - sudo dpkg-reconfigure --frontend noninteractive tzdata
# - date
install_emulator_script:
- sdkmanager "system-images;android-$API;$GOO;$ABI" > /dev/null
create_emulator_script:
- echo no | avdmanager --verbose create avd --force -n test -k "system-images;android-$API;$GOO;$ABI"
pin_arm_emulator_script:
- |
if [[ $ABI =~ "arm" ]]; then
# Download a pinned version of the emulator since default version can cause issues
${ANDROID_HOME}/emulator/emulator -version
emulator_version=5264690 # 29.2.1.0 (build_id 5889189) ==> 28.0.23.0 (build_id 5264690)
# sudo apt-get install -y libunwind8 libc++1
curl -fo emulator.zip "https://dl.google.com/android/repository/emulator-linux-$emulator_version.zip"
rm -rf "${ANDROID_HOME}/emulator"
unzip -q emulator.zip -d "${ANDROID_HOME}"
rm -f emulator.zip
# install build tools and platforms for arm (to allow emulator to run)
sdkmanager "build-tools;25.0.2" "platforms;android-25" > /dev/null
fi
- ${ANDROID_HOME}/emulator/emulator -version
start_emulator_background_script:
- EMU_PARAMS="
-avd test
-verbose
-no-window
-no-audio
"
- |
EMU_COMMAND=emulator
if [[ $ABI =~ "x86" ]]; then
EMU_COMMAND="emulator-headless"
else
# emulate graphics if running on ARM
EMU_PARAMS="${EMU_PARAMS} -gpu swiftshader"
fi
- ${ANDROID_HOME}/emulator/${EMU_COMMAND} ${EMU_PARAMS}
wait_for_emulator_script:
- ./script/android-wait-for-emulator.sh
doctor_script: flutter doctor -v
test_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- cd flutter_app
- flutter drive lib/main.dart || flutter drive lib/main.dart
pub_cache:
folder: ~/.pub-cache