1
- gcp_credentials : ENCRYPTED[!48cff44dd32e9cc412d4d381c7fe68d373ca04cf2639f8192d21cb1a9ab5e21129651423a1cf88f3fd7fe2125c1cabd9 !]
1
+ gcp_credentials : ENCRYPTED[!ebad0a1f4f7a446b77944c33651460a7ab010b4617273cb016cf354eb8fc22aa92e37a3c58bfa4a0c40a799351e027a6 !]
2
2
3
3
# Don't run on release tags since it creates O(n^2) tasks where n is the
4
- # number of plugins
5
- only_if : $CIRRUS_TAG == ''
4
+ # number of plugins.
5
+ # Don't run on 'master' since it's a mirror of 'main'.
6
+ only_if : $CIRRUS_TAG == '' && $CIRRUS_BRANCH != 'master'
6
7
env :
7
8
CHANNEL : " master" # Default to master when not explicitly set by a task.
8
9
PLUGIN_TOOL : " ./script/tool/bin/flutter_plugin_tools.dart"
9
10
10
11
tool_setup_template : &TOOL_SETUP_TEMPLATE
11
12
tool_setup_script :
12
- - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
13
+ - git fetch origin main # To set FETCH_HEAD for "git merge-base" to work
13
14
- cd script/tool
14
15
- dart pub get
15
16
16
17
flutter_upgrade_template : &FLUTTER_UPGRADE_TEMPLATE
17
18
upgrade_flutter_script :
19
+ # Master uses a pinned, auto-rolled version to prevent out-of-band CI
20
+ # failures due to changes in Flutter.
21
+ # TODO(stuartmorgan): Investigate an autoroller for stable as well.
22
+ - TARGET_TREEISH=$CHANNEL
23
+ - if [[ "$CHANNEL" == "master" ]]; then
24
+ - TARGET_TREEISH=$(< .ci/flutter_$CHANNEL.version)
25
+ - fi
18
26
# Ensure that the repository has all the branches.
19
27
- cd $FLUTTER_HOME
20
28
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
21
29
- git fetch origin
22
- # Switch to the requested branch.
23
- - git checkout $CHANNEL
24
- # Reset to upstream branch, rather than using pull, since the base image
25
- # can sometimes be in a state where it has diverged from upstream (!).
26
- - git reset --hard @{u}
30
+ # Switch to the requested channel.
31
+ - git checkout $TARGET_TREEISH
32
+ # When using a branch rather than a hash or version tag, reset to the
33
+ # upstream branch rather than using pull, since the base image can sometimes
34
+ # be in a state where it has diverged from upstream (!).
35
+ - if [[ "$TARGET_TREEISH" == "$CHANNEL" ]] && [[ "$CHANNEL" != *"."* ]]; then
36
+ - git reset --hard @{u}
37
+ - fi
27
38
# Run doctor to allow auditing of what version of Flutter the run is using.
28
39
- flutter doctor -v
29
40
<< : *TOOL_SETUP_TEMPLATE
@@ -75,22 +86,29 @@ task:
75
86
CHANGE_DESC : " $TMPDIR/change-description.txt"
76
87
version_check_script :
77
88
# For pre-submit, pass the PR description to the script to allow for
78
- # platform version breaking version change justifications .
79
- # For post-submit, ignore platform version breaking version changes.
80
- # The PR description isn't reliably part of the commit message, so using
81
- # the same flags as for presubmit would likely result in false-positive
82
- # post-submit failures.
89
+ # version check overrides .
90
+ # For post-submit, ignore platform version breaking version changes and
91
+ # missing version/CHANGELOG detection; the PR description isn't reliably
92
+ # part of the commit message, so using the same flags as for presubmit
93
+ # would likely result in false-positive post-submit failures.
83
94
- if [[ $CIRRUS_PR == "" ]]; then
84
95
- ./script/tool_runner.sh version-check --ignore-platform-interface-breaks
85
96
- else
86
97
- echo "$CIRRUS_CHANGE_MESSAGE" > "$CHANGE_DESC"
87
- - ./script/tool_runner.sh version-check --change-description-file="$CHANGE_DESC"
98
+ - ./script/tool_runner.sh version-check --check-for-missing-changes -- change-description-file="$CHANGE_DESC"
88
99
- fi
89
100
publish_check_script : ./script/tool_runner.sh publish-check
90
101
- name : format
91
102
always :
92
103
format_script : ./script/tool_runner.sh format --fail-on-change
93
104
pubspec_script : ./script/tool_runner.sh pubspec-check
105
+ readme_script :
106
+ - ./script/tool_runner.sh readme-check
107
+ # Re-run with --require-excerpts, skipping packages that still need
108
+ # to be converted. Once https://github.com/flutter/flutter/issues/102679
109
+ # has been fixed, this can be removed and there can just be a single
110
+ # run with --require-excerpts and no exclusions.
111
+ - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml
94
112
license_script : dart $PLUGIN_TOOL license-check
95
113
- name : federated_safety
96
114
# This check is only meaningful for PRs, as it validates changes
@@ -109,21 +127,44 @@ task:
109
127
matrix :
110
128
CHANNEL : " master"
111
129
CHANNEL : " stable"
112
- tool_script :
130
+ analyze_tool_script :
113
131
- cd script/tool
114
132
- dart analyze --fatal-infos
115
- script :
133
+ analyze_script :
116
134
# DO NOT change the custom-analysis argument here without changing the Dart repo.
117
135
# See the comment in script/configs/custom_analysis.yaml for details.
118
136
- ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
119
- # ## Android tasks ###
120
- - name : android-build_all_plugins
137
+ pathified_analyze_script :
138
+ # Re-run analysis with path-based dependencies to ensure that publishing
139
+ # the changes won't break analysis of other packages in the respository
140
+ # that depend on it.
141
+ - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
142
+ # This uses --run-on-dirty-packages rather than --packages-for-branch
143
+ # since only the packages changed by 'make-deps-path-based' need to be
144
+ # checked.
145
+ - dart $PLUGIN_TOOL analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml
146
+ # Restore the tree to a clean state, to avoid accidental issues if
147
+ # other script steps are added to this task.
148
+ - git checkout .
149
+ # Does a sanity check that plugins at least pass analysis on the N-1 and N-2
150
+ # versions of Flutter stable if the plugin claims to support that version.
151
+ # This is to minimize accidentally making changes that break old versions
152
+ # (which we don't commit to supporting, but don't want to actively break)
153
+ # without updating the constraints.
154
+ # Note: The versions below should be manually updated after a new stable
155
+ # version comes out.
156
+ - name : legacy-version-analyze
157
+ depends_on : analyze
121
158
env :
122
- BUILD_ALL_ARGS : " apk"
123
159
matrix :
124
- CHANNEL : " master"
125
- CHANNEL : " stable"
126
- << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
160
+ CHANNEL : " 2.10.5"
161
+ CHANNEL : " 2.8.1"
162
+ analyze_script :
163
+ - ./script/tool_runner.sh analyze --skip-if-not-supporting-flutter-version="$CHANNEL" --custom-analysis=script/configs/custom_analysis.yaml
164
+ - name : readme_excerpts
165
+ env :
166
+ CIRRUS_CLONE_SUBMODULES : true
167
+ script : ./script/tool_runner.sh update-excerpts --fail-on-change
127
168
# ## Web tasks ###
128
169
- name : web-build_all_plugins
129
170
env :
@@ -183,7 +224,7 @@ task:
183
224
CHANNEL : " master"
184
225
CHANNEL : " stable"
185
226
MAPS_API_KEY : ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
186
- GCLOUD_FIREBASE_TESTLAB_KEY : ENCRYPTED[!c9446a7b11d5520c2ebce3c64ccc82fe6d146272cb06a4a4590e22c389f33153f951347a25422522df1a81fe2f085e9a! ]
227
+ GCLOUD_FIREBASE_TESTLAB_KEY : ENCRYPTED[4c11f1a80a5741d51e92ab609bc7214ab2aa015e68a490e4d6777ebdf84f9c899b97c0ded2f4b2e6adf2c8b5ead1e3c5 ]
187
228
build_script :
188
229
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
189
230
# might include non-ASCII characters which makes Gradle crash.
@@ -226,6 +267,13 @@ task:
226
267
path : " **/reports/lint-results-debug.xml"
227
268
type : text/xml
228
269
format : android-lint
270
+ - name : android-build_all_plugins
271
+ env :
272
+ BUILD_ALL_ARGS : " apk"
273
+ matrix :
274
+ CHANNEL : " master"
275
+ CHANNEL : " stable"
276
+ << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
229
277
# ## Web tasks ###
230
278
- name : web-platform_tests
231
279
env :
@@ -235,13 +283,15 @@ task:
235
283
matrix :
236
284
CHANNEL : " master"
237
285
CHANNEL : " stable"
286
+ CHROME_NO_SANDBOX : true
287
+ CHROME_DIR : /tmp/web_chromium/
288
+ CHROME_EXECUTABLE : $CHROME_DIR/chrome-linux/chrome
238
289
install_script :
239
- - git clone https://github.com/flutter/web_installers.git
240
- - cd web_installers/packages/web_drivers/
241
- - dart pub get
290
+ # Install a pinned version of Chromium and its corresponding ChromeDriver.
291
+ # Setting CHROME_EXECUTABLE above causes this version to be used for tests.
292
+ - ./script/install_chromium.sh "$CHROME_DIR"
242
293
chromedriver_background_script :
243
- - cd web_installers/packages/web_drivers/
244
- - dart lib/web_driver_installer.dart chromedriver --install-only
294
+ - cd "$CHROME_DIR"
245
295
- ./chromedriver/chromedriver --port=4444
246
296
build_script :
247
297
- ./script/tool_runner.sh build-examples --web
@@ -284,8 +334,11 @@ task:
284
334
- ./script/tool_runner.sh build-examples --ios
285
335
xcode_analyze_script :
286
336
- ./script/tool_runner.sh xcode-analyze --ios
337
+ xcode_analyze_deprecation_script :
338
+ # Ensure we don't accidentally introduce deprecated code.
339
+ - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0
287
340
native_test_script :
288
- - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" --exclude=script/configs/exclude_native_ios.yaml
341
+ - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
289
342
drive_script :
290
343
# `drive-examples` contains integration tests, which changes the UI of the application.
291
344
# This UI change sometimes affects `xctest`.
@@ -312,7 +365,10 @@ task:
312
365
- ./script/tool_runner.sh build-examples --macos
313
366
xcode_analyze_script :
314
367
- ./script/tool_runner.sh xcode-analyze --macos
368
+ xcode_analyze_deprecation_script :
369
+ # Ensure we don't accidentally introduce deprecated code.
370
+ - ./script/tool_runner.sh xcode-analyze --macos --macos-min-version=12.3
315
371
native_test_script :
316
- - ./script/tool_runner.sh native-test --macos --exclude=script/configs/exclude_native_macos.yaml
372
+ - ./script/tool_runner.sh native-test --macos
317
373
drive_script :
318
- - ./script/tool_runner.sh drive-examples --macos
374
+ - ./script/tool_runner.sh drive-examples --macos --exclude=script/configs/exclude_integration_macos.yaml
0 commit comments