This repository was archived by the owner on Jul 8, 2026. It is now read-only.
forked from flutter-team-archive/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cirrus.yml
More file actions
279 lines (276 loc) · 10.7 KB
/
Copy path.cirrus.yml
File metadata and controls
279 lines (276 loc) · 10.7 KB
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# Light-workload tasks.
# These use default machines, with fewer CPUs, to reduce pressure on the
# concurrency limits.
task:
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile
env:
INTEGRATION_TEST_PATH: "./packages/integration_test"
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- flutter config --enable-linux-desktop
- git fetch origin master
matrix:
### Platform-agnostic tasks ###
- name: plugin_tools_tests
script:
- cd script/tool
- pub get
- CIRRUS_BUILD_ID=null pub run test
- name: publishable
script:
- flutter channel master
- ./script/check_publish.sh
- name: format
format_script: ./script/incremental_build.sh format --fail-on-change
- name: test
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
test_script:
- flutter channel $CHANNEL
- ./script/incremental_build.sh test
- name: analyze_master
env:
matrix:
CHANNEL: "master"
script:
- flutter channel $CHANNEL
- ./script/incremental_build.sh analyze
## TODO(cyanglaz):
## Combing stable and master analyze jobs when integration test null safety is ready on flutter stable.
- name: analyze_stable
env:
matrix:
CHANNEL: "stable"
script:
- flutter channel $CHANNEL
- find . -depth -type d -wholename '*_web/example' -exec rm -rf {} \;
- ./script/incremental_build.sh analyze
### Android tasks ###
- name: build_all_plugins_apk
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script:
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh apk
### Web tasks ###
- name: build_all_plugins_web
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script:
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh web
- name: build-web-examples
env:
matrix:
CHANNEL: "master"
build_script:
- flutter channel $CHANNEL
- ./script/incremental_build.sh build-examples --web
# TODO: Add driving examples (and move to heavy-workload group).
### Linux desktop tasks ###
- name: build_all_plugins_linux
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script:
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh linux
# Legacy Dockerfile configuration for web integration tests.
# https://github.com/flutter/web_installers doesn't yet support the current
# stable version of Chrome, so newly-generated Docker images don't work.
# TODO: Merge this task into the "Web tasks" section of the "Light-workload
# tasks" block above once web_installers has been updated to support Chrome 89
# (which is what the current image generated from .ci/Dockerfile has).
task:
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile-LegacyChrome
env:
INTEGRATION_TEST_PATH: "./packages/integration_test"
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- flutter config --enable-linux-desktop
- git fetch origin master
matrix:
- name: integration_web_smoke_test
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
# Tests integration example test in web.
only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''"
install_script:
- flutter channel $CHANNEL
- git clone https://github.com/flutter/web_installers.git
- cd web_installers/packages/web_drivers/
- pub get
- dart lib/web_driver_installer.dart chromedriver --install-only
- ./chromedriver/chromedriver --port=4444 &
test_script:
- cd $INTEGRATION_TEST_PATH/example/
- flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome
# Heavy-workload tasks.
# These use machines with more CPUs and memory, so will reduce parallelization
# for non-credit runs.
task:
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile
cpu: 8
memory: 16G
env:
INTEGRATION_TEST_PATH: "./packages/integration_test"
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- flutter config --enable-linux-desktop
- git fetch origin master
matrix:
### Android tasks ###
- name: build-apks+java-test+firebase-test-lab
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4]
script:
- flutter channel $CHANNEL
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
# See: https://github.com/flutter/flutter/issues/24935
# This is a temporary workaround until we figure how to properly configure
# a UTF8 locale on Cirrus (or until the Gradle bug is fixed).
# TODO(amirh): Set the locale to UTF8.
- echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt
- echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt
- export CIRRUS_CHANGE_MESSAGE=""
- export CIRRUS_COMMIT_MESSAGE=""
- ./script/incremental_build.sh build-examples --apk
- ./script/incremental_build.sh java-test # must come after apk build
- if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
- echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
- ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26
- else
- echo "This user does not have permission to run Firebase Test Lab tests."
- fi
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
### Linux desktop tasks ###
- name: build-linux+drive-examples
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
build_script:
- flutter channel $CHANNEL
- ./script/incremental_build.sh build-examples --linux
- xvfb-run ./script/incremental_build.sh drive-examples --linux
task:
# Xcode 12 task
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
osx_instance:
image: big-sur-xcode-12.3
upgrade_script:
- sudo gem install cocoapods
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- flutter config --enable-macos-desktop
- git fetch origin master
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
matrix:
### Platform-agnostic tasks ###
- name: lint_darwin_plugins
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
script:
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
# Skip the dummy podspecs used to placate the tool.
- find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm
- ./script/incremental_build.sh podspecs
### iOS tasks ###
- name: build_all_plugins_ipa
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script:
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh ios --no-codesign
- name: build-ipas+drive-examples
env:
PATH: $PATH:/usr/local/bin
PLUGINS_TO_SKIP_XCTESTS: "integration_test"
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
build_script:
- flutter channel $CHANNEL
- ./script/incremental_build.sh build-examples --ipa
- ./script/incremental_build.sh xctest --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
# `drive-examples` contains integration tests, which changes the UI of the application.
# This UI change sometimes affects `xctest`.
# So we run `drive-examples` after `xctest`, changing the order will result ci failure.
- ./script/incremental_build.sh drive-examples --ios
### macOS desktop tasks ###
- name: build_all_plugins_macos
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
script:
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh macos
- name: build-macos+drive-examples
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
PATH: $PATH:/usr/local/bin
build_script:
- flutter channel $CHANNEL
- ./script/incremental_build.sh build-examples --macos --no-ipa
- ./script/incremental_build.sh drive-examples --macos