80
80
namespace : default
81
81
matrix :
82
82
# ## Platform-agnostic tasks ###
83
- - name : Linux plugin_tools_tests
84
- script :
85
- - cd script/tool
86
- - dart pub run test
87
- - name : publishable
88
- env :
89
- CHANGE_DESC : " $TMPDIR/change-description.txt"
90
- version_check_script :
91
- # For pre-submit, pass the PR label, as well as the PR description or
92
- # incremental commit message (for Dependabot checks), to the script to
93
- # allow for version check overrides.
94
- # For post-submit, ignore platform version breaking version changes and
95
- # missing version/CHANGELOG detection since the overrides aren't
96
- # available outside of the context of the PR.
97
- - if [[ $CIRRUS_PR == "" ]]; then
98
- - ./script/tool_runner.sh version-check --ignore-platform-interface-breaks
99
- - else
100
- - echo "$CIRRUS_CHANGE_MESSAGE" > "$CHANGE_DESC"
101
- - ./script/tool_runner.sh version-check --check-for-missing-changes --change-description-file="$CHANGE_DESC" --pr-labels="$CIRRUS_PR_LABELS"
102
- - fi
103
- publish_check_script : ./script/tool_runner.sh publish-check
104
83
- name : format
105
84
always :
106
85
format_script : ./script/tool_runner.sh format --fail-on-change
@@ -114,303 +93,3 @@ task:
114
93
- ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml
115
94
license_script : dart $PLUGIN_TOOL license-check
116
95
dependabot_script : dart $PLUGIN_TOOL dependabot-check
117
- - name : federated_safety
118
- # This check is only meaningful for PRs, as it validates changes
119
- # rather than state.
120
- only_if : $CIRRUS_PR != ""
121
- script : ./script/tool_runner.sh federation-safety-check
122
- - name : dart_unit_tests
123
- env :
124
- matrix :
125
- CHANNEL : " master"
126
- CHANNEL : " stable"
127
- test_script :
128
- - ./script/tool_runner.sh test
129
- - name : analyze
130
- env :
131
- matrix :
132
- CHANNEL : " master"
133
- CHANNEL : " stable"
134
- analyze_tool_script :
135
- - cd script/tool
136
- - dart analyze --fatal-infos
137
- analyze_script :
138
- # DO NOT change the custom-analysis argument here without changing the Dart repo.
139
- # See the comment in script/configs/custom_analysis.yaml for details.
140
- - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
141
- pathified_analyze_script :
142
- # Re-run analysis with path-based dependencies to ensure that publishing
143
- # the changes won't break analysis of other packages in the respository
144
- # that depend on it.
145
- - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
146
- # This uses --run-on-dirty-packages rather than --packages-for-branch
147
- # since only the packages changed by 'make-deps-path-based' need to be
148
- # checked.
149
- - dart $PLUGIN_TOOL analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml
150
- # Restore the tree to a clean state, to avoid accidental issues if
151
- # other script steps are added to this task.
152
- - git checkout .
153
- # Does a sanity check that plugins at least pass analysis on the N-1 and N-2
154
- # versions of Flutter stable if the plugin claims to support that version.
155
- # This is to minimize accidentally making changes that break old versions
156
- # (which we don't commit to supporting, but don't want to actively break)
157
- # without updating the constraints.
158
- # Note: The versions below should be manually updated after a new stable
159
- # version comes out.
160
- - name : legacy-version-analyze
161
- depends_on : analyze
162
- env :
163
- matrix :
164
- CHANNEL : " 2.10.5"
165
- CHANNEL : " 2.8.1"
166
- package_prep_script :
167
- # Allow analyzing plugins that use a Pigeon version with a higher
168
- # minimum Flutter/Dart version than the plugin itself.
169
- - ./script/tool_runner.sh remove-dev-dependencies
170
- analyze_script :
171
- # Only analyze lib/; non-client code doesn't need to work on
172
- # all supported legacy version.
173
- - ./script/tool_runner.sh analyze --lib-only --skip-if-not-supporting-flutter-version="$CHANNEL" --custom-analysis=script/configs/custom_analysis.yaml
174
- # Does a sanity check that plugins pass analysis with the lowest possible
175
- # versions of all dependencies. This is to catch cases where we add use of
176
- # new APIs but forget to update minimum versions of dependencies to when
177
- # those APIs are introduced.
178
- - name : downgraded_analyze
179
- depends_on : analyze
180
- analyze_script :
181
- - ./script/tool_runner.sh analyze --downgrade
182
- - name : readme_excerpts
183
- env :
184
- CIRRUS_CLONE_SUBMODULES : true
185
- script : ./script/tool_runner.sh update-excerpts --fail-on-change
186
- # ## Web tasks ###
187
- - name : web-build_all_plugins
188
- env :
189
- BUILD_ALL_ARGS : " web"
190
- matrix :
191
- CHANNEL : " master"
192
- CHANNEL : " stable"
193
- << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
194
- # ## Linux desktop tasks ###
195
- - name : linux-build_all_plugins
196
- env :
197
- BUILD_ALL_ARGS : " linux"
198
- matrix :
199
- CHANNEL : " master"
200
- CHANNEL : " stable"
201
- setup_script :
202
- - flutter config --enable-linux-desktop
203
- << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
204
- - name : linux-platform_tests
205
- # Don't run full platform tests on both channels in pre-submit.
206
- skip : $CIRRUS_PR != '' && $CHANNEL == 'stable'
207
- env :
208
- matrix :
209
- CHANNEL : " master"
210
- CHANNEL : " stable"
211
- build_script :
212
- - flutter config --enable-linux-desktop
213
- - ./script/tool_runner.sh build-examples --linux
214
- native_test_script :
215
- - ./script/tool_runner.sh native-test --linux --no-integration
216
- drive_script :
217
- - xvfb-run ./script/tool_runner.sh drive-examples --linux
218
-
219
- # Heavy-workload Linux tasks.
220
- # These use machines with more CPUs and memory, so will reduce parallelization
221
- # for non-credit runs.
222
- task :
223
- << : *FLUTTER_UPGRADE_TEMPLATE
224
- gke_container :
225
- dockerfile : .ci/Dockerfile
226
- builder_image_name : docker-builder-linux # gce vm image
227
- builder_image_project : flutter-cirrus
228
- cluster_name : test-cluster
229
- zone : us-central1-a
230
- namespace : default
231
- cpu : 4
232
- memory : 12G
233
- matrix :
234
- # ## Android tasks ###
235
- - name : android-platform_tests
236
- # Don't run full platform tests on both channels in pre-submit.
237
- skip : $CIRRUS_PR != '' && $CHANNEL == 'stable'
238
- env :
239
- matrix :
240
- PLUGIN_SHARDING : " --shardIndex 0 --shardCount 5"
241
- PLUGIN_SHARDING : " --shardIndex 1 --shardCount 5"
242
- PLUGIN_SHARDING : " --shardIndex 2 --shardCount 5"
243
- PLUGIN_SHARDING : " --shardIndex 3 --shardCount 5"
244
- PLUGIN_SHARDING : " --shardIndex 4 --shardCount 5"
245
- matrix :
246
- CHANNEL : " master"
247
- CHANNEL : " stable"
248
- MAPS_API_KEY : ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
249
- GCLOUD_FIREBASE_TESTLAB_KEY : ENCRYPTED[c84a06b85f9c906705732aea6142ef6f63ff1a6f07372dc36880a9d0c2c4b9cb35b2e35cd19edc6285167c2a5cc075ec]
250
- build_script :
251
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
252
- # might include non-ASCII characters which makes Gradle crash.
253
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
254
- - export CIRRUS_CHANGE_MESSAGE=""
255
- - export CIRRUS_COMMIT_MESSAGE=""
256
- - ./script/tool_runner.sh build-examples --apk
257
- lint_script :
258
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
259
- # might include non-ASCII characters which makes Gradle crash.
260
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
261
- - export CIRRUS_CHANGE_MESSAGE=""
262
- - export CIRRUS_COMMIT_MESSAGE=""
263
- - ./script/tool_runner.sh lint-android # must come after build-examples
264
- native_unit_test_script :
265
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
266
- # might include non-ASCII characters which makes Gradle crash.
267
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
268
- - export CIRRUS_CHANGE_MESSAGE=""
269
- - export CIRRUS_COMMIT_MESSAGE=""
270
- # Native integration tests are handled by firebase-test-lab below, so
271
- # only run unit tests.
272
- # Must come after build-examples.
273
- - ./script/tool_runner.sh native-test --android --no-integration --exclude script/configs/exclude_native_unit_android.yaml
274
- firebase_test_lab_script :
275
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
276
- # might include non-ASCII characters which makes Gradle crash.
277
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
278
- - export CIRRUS_CHANGE_MESSAGE=""
279
- - export CIRRUS_COMMIT_MESSAGE=""
280
- - if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
281
- - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
282
- - ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
283
- - else
284
- - echo "This user does not have permission to run Firebase Test Lab tests."
285
- - fi
286
- # Upload the full lint results to Cirrus to display in the results UI.
287
- always :
288
- android-lint_artifacts :
289
- path : " **/reports/lint-results-debug.xml"
290
- type : text/xml
291
- format : android-lint
292
- - name : android-build_all_plugins
293
- env :
294
- BUILD_ALL_ARGS : " apk"
295
- matrix :
296
- CHANNEL : " master"
297
- CHANNEL : " stable"
298
- << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
299
- # ## Web tasks ###
300
- - name : web-platform_tests
301
- env :
302
- matrix :
303
- PLUGIN_SHARDING : " --shardIndex 0 --shardCount 2"
304
- PLUGIN_SHARDING : " --shardIndex 1 --shardCount 2"
305
- matrix :
306
- CHANNEL : " master"
307
- CHANNEL : " stable"
308
- CHROME_NO_SANDBOX : true
309
- CHROME_DIR : /tmp/web_chromium/
310
- CHROME_EXECUTABLE : $CHROME_DIR/chrome-linux/chrome
311
- install_script :
312
- # Install a pinned version of Chromium and its corresponding ChromeDriver.
313
- # Setting CHROME_EXECUTABLE above causes this version to be used for tests.
314
- - ./script/install_chromium.sh "$CHROME_DIR"
315
- chromedriver_background_script :
316
- - cd "$CHROME_DIR"
317
- - ./chromedriver/chromedriver --port=4444
318
- build_script :
319
- - ./script/tool_runner.sh build-examples --web
320
- drive_script :
321
- - ./script/tool_runner.sh drive-examples --web --exclude=script/configs/exclude_integration_web.yaml
322
-
323
- # ARM macOS tasks.
324
- task :
325
- << : *MACOS_ARM_TEMPLATE
326
- << : *FLUTTER_UPGRADE_TEMPLATE
327
- matrix :
328
- # ## iOS tasks ###
329
- - name : ios-build_all_plugins
330
- env :
331
- BUILD_ALL_ARGS : " ios --no-codesign"
332
- matrix :
333
- CHANNEL : " master"
334
- CHANNEL : " stable"
335
- << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
336
- # ## macOS desktop tasks ###
337
- - name : macos-platform_tests
338
- # Don't run full platform tests on both channels in pre-submit.
339
- skip : $CIRRUS_PR != '' && $CHANNEL == 'stable'
340
- env :
341
- matrix :
342
- CHANNEL : " master"
343
- CHANNEL : " stable"
344
- PATH : $PATH:/usr/local/bin
345
- build_script :
346
- - flutter config --enable-macos-desktop
347
- - ./script/tool_runner.sh build-examples --macos
348
- xcode_analyze_script :
349
- - ./script/tool_runner.sh xcode-analyze --macos
350
- xcode_analyze_deprecation_script :
351
- # Ensure we don't accidentally introduce deprecated code.
352
- - ./script/tool_runner.sh xcode-analyze --macos --macos-min-version=12.3
353
- native_test_script :
354
- - ./script/tool_runner.sh native-test --macos
355
- drive_script :
356
- - ./script/tool_runner.sh drive-examples --macos --exclude=script/configs/exclude_integration_macos.yaml
357
-
358
- # Intel macOS tasks.
359
- task :
360
- << : *MACOS_INTEL_TEMPLATE
361
- << : *FLUTTER_UPGRADE_TEMPLATE
362
- matrix :
363
- # ## iOS+macOS tasks ***
364
- # TODO(stuartmorgan): Move this to ARM once google_maps_flutter has ARM
365
- # support. `pod lint` makes a synthetic target that doesn't respect the
366
- # pod's arch exclusions, so fails to build.
367
- - name : darwin-lint_podspecs
368
- script :
369
- - ./script/tool_runner.sh podspecs
370
- # ## iOS tasks ###
371
- # TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator
372
- # tests are reliable on the ARM infrastructure. See discussion at
373
- # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089
374
- - name : ios-platform_tests
375
- # Don't run full platform tests on both channels in pre-submit.
376
- skip : $CIRRUS_PR != '' && $CHANNEL == 'stable'
377
- env :
378
- PATH : $PATH:/usr/local/bin
379
- matrix :
380
- PLUGIN_SHARDING : " --shardIndex 0 --shardCount 4"
381
- PLUGIN_SHARDING : " --shardIndex 1 --shardCount 4"
382
- PLUGIN_SHARDING : " --shardIndex 2 --shardCount 4"
383
- PLUGIN_SHARDING : " --shardIndex 3 --shardCount 4"
384
- matrix :
385
- CHANNEL : " master"
386
- CHANNEL : " stable"
387
- SIMCTL_CHILD_MAPS_API_KEY : ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
388
- create_simulator_script :
389
- - xcrun simctl list
390
- - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot
391
- build_script :
392
- - ./script/tool_runner.sh build-examples --ios
393
- xcode_analyze_script :
394
- - ./script/tool_runner.sh xcode-analyze --ios
395
- xcode_analyze_deprecation_script :
396
- # Ensure we don't accidentally introduce deprecated code.
397
- - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0
398
- native_test_script :
399
- - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
400
- drive_script :
401
- # `drive-examples` contains integration tests, which changes the UI of the application.
402
- # This UI change sometimes affects `xctest`.
403
- # So we run `drive-examples` after `native-test`; changing the order will result ci failure.
404
- - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml
405
- # ## macOS desktop tasks ###
406
- # macos-platform_tests builds all the plugins on M1, so this build is run
407
- # on Intel to give us build coverage of both host types.
408
- - name : macos-build_all_plugins
409
- env :
410
- BUILD_ALL_ARGS : " macos"
411
- matrix :
412
- CHANNEL : " master"
413
- CHANNEL : " stable"
414
- setup_script :
415
- - flutter config --enable-macos-desktop
416
- << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
0 commit comments