@@ -6,6 +6,10 @@ only_if: $CIRRUS_TAG == ''
6
6
env :
7
7
CHANNEL : " master" # Default to master when not explicitly set by a task.
8
8
PLUGIN_TOOL : " ./script/tool/bin/flutter_plugin_tools.dart"
9
+ # The base command for most tool invocations, handling:
10
+ # - running the correct set of packages for the current branch
11
+ # - including any sharding that is configured for a task via $PLUGIN_SHARDING
12
+ TOOL_COMMAND_BASE : dart $PLUGIN_TOOL --packages-for-branch $PLUGIN_SHARDING
9
13
10
14
tool_setup_template : &TOOL_SETUP_TEMPLATE
11
15
tool_setup_script :
@@ -68,19 +72,19 @@ task:
68
72
- cd script/tool
69
73
- CIRRUS_BUILD_ID=null pub run test
70
74
- name : publishable
71
- version_check_script : ./script/tool_runner.sh version-check
72
- publish_check_script : ./script/tool_runner.sh publish-check
75
+ version_check_script : $TOOL_COMMAND_BASE version-check
76
+ publish_check_script : $TOOL_COMMAND_BASE publish-check
73
77
- name : format
74
- format_script : ./script/tool_runner.sh format --fail-on-change
75
- pubspec_script : ./script/tool_runner.sh pubspec-check
78
+ format_script : $TOOL_COMMAND_BASE format --fail-on-change
79
+ pubspec_script : $TOOL_COMMAND_BASE pubspec-check
76
80
license_script : dart $PLUGIN_TOOL license-check
77
81
- name : test
78
82
env :
79
83
matrix :
80
84
CHANNEL : " master"
81
85
CHANNEL : " stable"
82
86
test_script :
83
- - ./script/tool_runner.sh test
87
+ - $TOOL_COMMAND_BASE test
84
88
- name : analyze
85
89
env :
86
90
matrix :
92
96
script :
93
97
# DO NOT change the custom-analysis argument here without changing the Dart repo.
94
98
# See the comment in script/configs/custom_analysis.yaml for details.
95
- - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
99
+ - $TOOL_COMMAND_BASE analyze --custom-analysis=script/configs/custom_analysis.yaml
96
100
# ## Android tasks ###
97
101
- name : build_all_plugins_apk
98
102
env :
@@ -126,9 +130,9 @@ task:
126
130
CHANNEL : " stable"
127
131
build_script :
128
132
- flutter config --enable-linux-desktop
129
- - ./script/tool_runner.sh build-examples --linux
133
+ - $TOOL_COMMAND_BASE build-examples --linux
130
134
drive_script :
131
- - xvfb-run ./script/tool_runner.sh drive-examples --linux
135
+ - xvfb-run $TOOL_COMMAND_BASE drive-examples --linux
132
136
133
137
# Heavy-workload Linux tasks.
134
138
# These use machines with more CPUs and memory, so will reduce parallelization
@@ -164,14 +168,14 @@ task:
164
168
# TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
165
169
- export CIRRUS_CHANGE_MESSAGE=""
166
170
- export CIRRUS_COMMIT_MESSAGE=""
167
- - ./script/tool_runner.sh build-examples --apk
171
+ - $TOOL_COMMAND_BASE build-examples --apk
168
172
lint_script :
169
173
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
170
174
# might include non-ASCII characters which makes Gradle crash.
171
175
# TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
172
176
- export CIRRUS_CHANGE_MESSAGE=""
173
177
- export CIRRUS_COMMIT_MESSAGE=""
174
- - ./script/tool_runner.sh lint-android # must come after build-examples
178
+ - $TOOL_COMMAND_BASE lint-android # must come after build-examples
175
179
native_unit_test_script :
176
180
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
177
181
# might include non-ASCII characters which makes Gradle crash.
@@ -180,7 +184,7 @@ task:
180
184
- export CIRRUS_COMMIT_MESSAGE=""
181
185
# Native integration tests are handled by firebase-test-lab below, so
182
186
# only run unit tests.
183
- - ./script/tool_runner.sh native-test --android --no-integration # must come after apk build
187
+ - $TOOL_COMMAND_BASE native-test --android --no-integration # must come after apk build
184
188
firebase_test_lab_script :
185
189
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
186
190
# might include non-ASCII characters which makes Gradle crash.
@@ -189,7 +193,7 @@ task:
189
193
- export CIRRUS_COMMIT_MESSAGE=""
190
194
- if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
191
195
- echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
192
- - ./script/tool_runner.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
196
+ - $TOOL_COMMAND_BASE firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
193
197
- else
194
198
- echo "This user does not have permission to run Firebase Test Lab tests."
195
199
- fi
@@ -212,9 +216,9 @@ task:
212
216
- dart lib/web_driver_installer.dart chromedriver --install-only
213
217
- ./chromedriver/chromedriver --port=4444 &
214
218
build_script :
215
- - ./script/tool_runner.sh build-examples --web
219
+ - $TOOL_COMMAND_BASE build-examples --web
216
220
drive_script :
217
- - ./script/tool_runner.sh drive-examples --web --exclude=script/configs/exclude_integration_web.yaml
221
+ - $TOOL_COMMAND_BASE drive-examples --web --exclude=script/configs/exclude_integration_web.yaml
218
222
219
223
# macOS tasks.
220
224
task :
@@ -224,7 +228,7 @@ task:
224
228
# ## iOS+macOS tasks ***
225
229
- name : lint_darwin_plugins
226
230
script :
227
- - ./script/tool_runner.sh podspecs
231
+ - $TOOL_COMMAND_BASE podspecs
228
232
# ## iOS tasks ###
229
233
- name : build_all_plugins_ipa
230
234
env :
@@ -249,16 +253,16 @@ task:
249
253
- xcrun simctl list
250
254
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-5 | xargs xcrun simctl boot
251
255
build_script :
252
- - ./script/tool_runner.sh build-examples --ios
256
+ - $TOOL_COMMAND_BASE build-examples --ios
253
257
xcode_analyze_script :
254
- - ./script/tool_runner.sh xcode-analyze --ios
258
+ - $TOOL_COMMAND_BASE xcode-analyze --ios
255
259
native_test_script :
256
- - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
260
+ - $TOOL_COMMAND_BASE native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
257
261
drive_script :
258
262
# `drive-examples` contains integration tests, which changes the UI of the application.
259
263
# This UI change sometimes affects `xctest`.
260
264
# So we run `drive-examples` after `native-test`; changing the order will result ci failure.
261
- - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml
265
+ - $TOOL_COMMAND_BASE drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml
262
266
# ## macOS desktop tasks ###
263
267
- name : build_all_plugins_macos
264
268
env :
@@ -277,10 +281,10 @@ task:
277
281
PATH : $PATH:/usr/local/bin
278
282
build_script :
279
283
- flutter config --enable-macos-desktop
280
- - ./script/tool_runner.sh build-examples --macos
284
+ - $TOOL_COMMAND_BASE build-examples --macos
281
285
xcode_analyze_script :
282
- - ./script/tool_runner.sh xcode-analyze --macos
286
+ - $TOOL_COMMAND_BASE xcode-analyze --macos
283
287
native_test_script :
284
- - ./script/tool_runner.sh native-test --macos --exclude=script/configs/exclude_native_macos.yaml
288
+ - $TOOL_COMMAND_BASE native-test --macos --exclude=script/configs/exclude_native_macos.yaml
285
289
drive_script :
286
- - ./script/tool_runner.sh drive-examples --macos
290
+ - $TOOL_COMMAND_BASE drive-examples --macos
0 commit comments