@@ -4,13 +4,26 @@ gcp_credentials: ENCRYPTED[!f1177d1ddb5330ffaa9ea11c9c9e8e0c542185e895c36071f18c
4
4
only_if : $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main')
5
5
env :
6
6
CHANNEL : " master" # Default to master when not explicitly set by a task.
7
- PLUGIN_TOOL : " ./script/tool/bin/flutter_plugin_tools.dart"
7
+ PLUGIN_TOOL_COMMAND : " dart ./script/tool/bin/flutter_plugin_tools.dart"
8
8
9
9
tool_setup_template : &TOOL_SETUP_TEMPLATE
10
10
tool_setup_script :
11
- - git fetch origin main # To set FETCH_HEAD for "git merge-base" to work
12
- - cd script/tool
13
- - dart pub get
11
+ - .ci/scripts/prepare_tool.sh
12
+
13
+ macos_template : &MACOS_TEMPLATE
14
+ # Only one macOS task can run in parallel without credits, so use them for
15
+ # PRs on macOS.
16
+ use_compute_credits : $CIRRUS_USER_COLLABORATOR == 'true'
17
+
18
+ macos_intel_template : &MACOS_INTEL_TEMPLATE
19
+ << : *MACOS_TEMPLATE
20
+ osx_instance :
21
+ image : big-sur-xcode-13
22
+
23
+ macos_arm_template : &MACOS_ARM_TEMPLATE
24
+ << : *MACOS_TEMPLATE
25
+ macos_instance :
26
+ image : ghcr.io/cirruslabs/macos-ventura-xcode:14
14
27
15
28
flutter_upgrade_template : &FLUTTER_UPGRADE_TEMPLATE
16
29
upgrade_flutter_script :
@@ -39,33 +52,18 @@ flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
39
52
40
53
build_all_plugins_app_template : &BUILD_ALL_PLUGINS_APP_TEMPLATE
41
54
create_all_plugins_app_script :
42
- - dart $PLUGIN_TOOL all-plugins -app --output-dir=. --exclude script/configs/exclude_all_plugins_app.yaml
55
+ - $PLUGIN_TOOL_COMMAND create- all-packages -app --output-dir=. --exclude script/configs/exclude_all_plugins_app.yaml
43
56
build_all_plugins_debug_script :
44
- - cd all_plugins
57
+ - cd all_packages
45
58
- if [[ "$BUILD_ALL_ARGS" == "web" ]]; then
46
59
- echo "Skipping; web does not support debug builds"
47
60
- else
48
61
- flutter build $BUILD_ALL_ARGS --debug
49
62
- fi
50
63
build_all_plugins_release_script :
51
- - cd all_plugins
64
+ - cd all_packages
52
65
- flutter build $BUILD_ALL_ARGS --release
53
66
54
- macos_template : &MACOS_TEMPLATE
55
- # Only one macOS task can run in parallel without credits, so use them for
56
- # PRs on macOS.
57
- use_compute_credits : $CIRRUS_USER_COLLABORATOR == 'true'
58
-
59
- macos_intel_template : &MACOS_INTEL_TEMPLATE
60
- << : *MACOS_TEMPLATE
61
- osx_instance :
62
- image : big-sur-xcode-13
63
-
64
- macos_arm_template : &MACOS_ARM_TEMPLATE
65
- << : *MACOS_TEMPLATE
66
- macos_instance :
67
- image : ghcr.io/cirruslabs/macos-ventura-xcode:14
68
-
69
67
# Light-workload Linux tasks.
70
68
# These use default machines, with fewer CPUs, to reduce pressure on the
71
69
# concurrency limits.
@@ -84,22 +82,13 @@ task:
84
82
script :
85
83
- cd script/tool
86
84
- dart pub run test
87
- - name : publishable
88
- version_check_script :
89
- # For pre-submit, pass the PR labels to the script to allow for version
90
- # check overrides.
91
- # For post-submit, ignore platform version breaking version changes and
92
- # missing version/CHANGELOG detection since the labels aren't
93
- # available outside of the context of the PR.
94
- - if [[ $CIRRUS_PR == "" ]]; then
95
- - ./script/tool_runner.sh version-check --ignore-platform-interface-breaks
96
- - else
97
- - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS"
98
- - fi
99
- publish_check_script : ./script/tool_runner.sh publish-check
100
- - name : format
85
+ # Repository rules and best-practice enforcement.
86
+ # Only channel-agnostic tests should go here since it is only run once
87
+ # (on Flutter master).
88
+ - name : repo_checks
101
89
always :
102
90
format_script : ./script/tool_runner.sh format --fail-on-change
91
+ license_script : $PLUGIN_TOOL_COMMAND license-check
103
92
pubspec_script : ./script/tool_runner.sh pubspec-check
104
93
readme_script :
105
94
- ./script/tool_runner.sh readme-check
@@ -108,19 +97,33 @@ task:
108
97
# has been fixed, this can be removed and there can just be a single
109
98
# run with --require-excerpts and no exclusions.
110
99
- ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml
111
- license_script : dart $PLUGIN_TOOL license-check
112
- dependabot_script : dart $PLUGIN_TOOL dependabot-check
113
- - name : federated_safety
114
- # This check is only meaningful for PRs, as it validates changes
115
- # rather than state.
116
- only_if : $CIRRUS_PR != ""
117
- script : ./script/tool_runner.sh federation-safety-check
100
+ dependabot_script : $PLUGIN_TOOL_COMMAND dependabot-check
101
+ version_script :
102
+ # For pre-submit, pass the PR labels to the script to allow for
103
+ # check overrides.
104
+ # For post-submit, ignore platform version breaking version changes
105
+ # and missing version/CHANGELOG detection since the labels aren't
106
+ # available outside of the context of the PR.
107
+ - if [[ $CIRRUS_PR == "" ]]; then
108
+ - ./script/tool_runner.sh version-check --ignore-platform-interface-breaks
109
+ - else
110
+ - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS"
111
+ - fi
112
+ publishable_script : ./script/tool_runner.sh publish-check --allow-pre-release
113
+ federated_safety_script :
114
+ # This check is only meaningful for PRs, as it validates changes
115
+ # rather than state.
116
+ - if [[ $CIRRUS_PR == "" ]]; then
117
+ - ./script/tool_runner.sh federation-safety-check
118
+ - else
119
+ - echo "Only run in presubmit"
120
+ - fi
118
121
- name : dart_unit_tests
119
122
env :
120
123
matrix :
121
124
CHANNEL : " master"
122
125
CHANNEL : " stable"
123
- test_script :
126
+ unit_test_script :
124
127
- ./script/tool_runner.sh test
125
128
- name : analyze
126
129
env :
@@ -142,39 +145,42 @@ task:
142
145
# This uses --run-on-dirty-packages rather than --packages-for-branch
143
146
# since only the packages changed by 'make-deps-path-based' need to be
144
147
# checked.
145
- - dart $PLUGIN_TOOL analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml
148
+ - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml
146
149
# Restore the tree to a clean state, to avoid accidental issues if
147
150
# other script steps are added to this task.
148
151
- 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.
152
+ # Does a sanity check that packages at least pass analysis on the N-1 and N-2
153
+ # versions of Flutter stable if the package claims to support that version.
151
154
# This is to minimize accidentally making changes that break old versions
152
155
# (which we don't commit to supporting, but don't want to actively break)
153
156
# without updating the constraints.
154
157
# Note: The versions below should be manually updated after a new stable
155
158
# version comes out.
156
- - name : legacy-version-analyze
159
+ - name : legacy_version_analyze
157
160
depends_on : analyze
158
- env :
159
- matrix :
161
+ matrix :
162
+ env :
160
163
CHANNEL : " 3.0.5"
164
+ DART_VERSION : " 2.17.6"
165
+ env :
161
166
CHANNEL : " 2.10.5"
167
+ DART_VERSION : " 2.16.2"
162
168
package_prep_script :
163
- # Allow analyzing plugins that use a Pigeon version with a higher
164
- # minimum Flutter/Dart version than the plugin itself.
169
+ # Allow analyzing packages that use a dev dependency with a higher
170
+ # minimum Flutter/Dart version than the package itself.
165
171
- ./script/tool_runner.sh remove-dev-dependencies
166
172
analyze_script :
167
173
# Only analyze lib/; non-client code doesn't need to work on
168
174
# all supported legacy version.
169
- - ./script/tool_runner.sh analyze --lib-only --skip-if-not-supporting-flutter-version="$CHANNEL" --custom-analysis=script/configs/custom_analysis.yaml
170
- # Does a sanity check that plugins pass analysis with the lowest possible
175
+ - ./script/tool_runner.sh analyze --lib-only --skip-if-not-supporting-flutter-version="$CHANNEL" --skip-if-not-supporting-dart-version="$DART_VERSION" -- custom-analysis=script/configs/custom_analysis.yaml
176
+ # Does a sanity check that packages pass analysis with the lowest possible
171
177
# versions of all dependencies. This is to catch cases where we add use of
172
- # new APIs but forget to update minimum versions of dependencies to when
178
+ # new APIs but forget to update minimum versions of dependencies to where
173
179
# those APIs are introduced.
174
180
- name : downgraded_analyze
175
181
depends_on : analyze
176
182
analyze_script :
177
- - ./script/tool_runner.sh analyze --downgrade
183
+ - ./script/tool_runner.sh analyze --downgrade --custom-analysis=script/configs/custom_analysis.yaml
178
184
- name : readme_excerpts
179
185
env :
180
186
CIRRUS_CLONE_SUBMODULES : true
@@ -194,8 +200,6 @@ task:
194
200
matrix :
195
201
CHANNEL : " master"
196
202
CHANNEL : " stable"
197
- setup_script :
198
- - flutter config --enable-linux-desktop
199
203
<< : *BUILD_ALL_PLUGINS_APP_TEMPLATE
200
204
- name : linux-platform_tests
201
205
# Don't run full platform tests on both channels in pre-submit.
@@ -205,7 +209,6 @@ task:
205
209
CHANNEL : " master"
206
210
CHANNEL : " stable"
207
211
build_script :
208
- - flutter config --enable-linux-desktop
209
212
- ./script/tool_runner.sh build-examples --linux
210
213
native_test_script :
211
214
- xvfb-run ./script/tool_runner.sh native-test --linux --no-integration
@@ -244,38 +247,20 @@ task:
244
247
MAPS_API_KEY : ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
245
248
GCLOUD_FIREBASE_TESTLAB_KEY : ENCRYPTED[30e6cf7189e3ff3868edc25d2e638ef2aec70546456427064bbc74b297d36145364f49f9d26b327787a59df149d69262]
246
249
build_script :
247
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
248
- # might include non-ASCII characters which makes Gradle crash.
249
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
250
- - export CIRRUS_CHANGE_MESSAGE=""
251
- - export CIRRUS_COMMIT_MESSAGE=""
252
250
- ./script/tool_runner.sh build-examples --apk
253
251
lint_script :
254
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
255
- # might include non-ASCII characters which makes Gradle crash.
256
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
257
- - export CIRRUS_CHANGE_MESSAGE=""
258
- - export CIRRUS_COMMIT_MESSAGE=""
259
252
- ./script/tool_runner.sh lint-android # must come after build-examples
260
253
native_unit_test_script :
261
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
262
- # might include non-ASCII characters which makes Gradle crash.
263
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
264
- - export CIRRUS_CHANGE_MESSAGE=""
265
- - export CIRRUS_COMMIT_MESSAGE=""
266
254
# Native integration tests are handled by firebase-test-lab below, so
267
255
# only run unit tests.
268
256
# Must come after build-examples.
269
257
- ./script/tool_runner.sh native-test --android --no-integration --exclude script/configs/exclude_native_unit_android.yaml
270
258
firebase_test_lab_script :
271
- # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
272
- # might include non-ASCII characters which makes Gradle crash.
273
- # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
274
- - export CIRRUS_CHANGE_MESSAGE=""
275
- - export CIRRUS_COMMIT_MESSAGE=""
276
259
- if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
277
260
- echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
278
- - ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
261
+ # (TODO)cyanglaz: add --device model=starqlteue,version=26 back when the device issue is fixed in FTL.
262
+ # https://github.com/flutter/flutter/issues/114535
263
+ - ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --exclude=script/configs/exclude_integration_android.yaml
279
264
- else
280
265
- echo "This user does not have permission to run Firebase Test Lab tests."
281
266
- fi
@@ -339,7 +324,6 @@ task:
339
324
CHANNEL : " stable"
340
325
PATH : $PATH:/usr/local/bin
341
326
build_script :
342
- - flutter config --enable-macos-desktop
343
327
- ./script/tool_runner.sh build-examples --macos
344
328
xcode_analyze_script :
345
329
- ./script/tool_runner.sh xcode-analyze --macos
@@ -408,5 +392,4 @@ task:
408
392
CHANNEL : " master"
409
393
CHANNEL : " stable"
410
394
setup_script :
411
- - flutter config --enable-macos-desktop
412
395
<< : *BUILD_ALL_PLUGINS_APP_TEMPLATE
0 commit comments