@@ -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,7 +52,7 @@ 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 all-plugins-app --output-dir=. --exclude script/configs/exclude_all_plugins_app.yaml
43
56
build_all_plugins_debug_script :
44
57
- cd all_plugins
45
58
- if [[ "$BUILD_ALL_ARGS" == "web" ]]; then
@@ -51,21 +64,6 @@ build_all_plugins_app_template: &BUILD_ALL_PLUGINS_APP_TEMPLATE
51
64
- cd all_plugins
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
@@ -339,7 +342,6 @@ task:
339
342
CHANNEL : " stable"
340
343
PATH : $PATH:/usr/local/bin
341
344
build_script :
342
- - flutter config --enable-macos-desktop
343
345
- ./script/tool_runner.sh build-examples --macos
344
346
xcode_analyze_script :
345
347
- ./script/tool_runner.sh xcode-analyze --macos
@@ -408,5 +410,4 @@ task:
408
410
CHANNEL : " master"
409
411
CHANNEL : " stable"
410
412
setup_script :
411
- - flutter config --enable-macos-desktop
412
413
<< : *BUILD_ALL_PLUGINS_APP_TEMPLATE
0 commit comments