@@ -4,13 +4,26 @@ gcp_credentials: ENCRYPTED[!f1177d1ddb5330ffaa9ea11c9c9e8e0c542185e895c36071f18c
44only_if : $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main')
55env :
66 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"
88
99tool_setup_template : &TOOL_SETUP_TEMPLATE
1010 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
1427
1528flutter_upgrade_template : &FLUTTER_UPGRADE_TEMPLATE
1629 upgrade_flutter_script :
@@ -39,33 +52,18 @@ flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
3952
4053build_all_plugins_app_template : &BUILD_ALL_PLUGINS_APP_TEMPLATE
4154 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
4356 build_all_plugins_debug_script :
44- - cd all_plugins
57+ - cd all_packages
4558 - if [[ "$BUILD_ALL_ARGS" == "web" ]]; then
4659 - echo "Skipping; web does not support debug builds"
4760 - else
4861 - flutter build $BUILD_ALL_ARGS --debug
4962 - fi
5063 build_all_plugins_release_script :
51- - cd all_plugins
64+ - cd all_packages
5265 - flutter build $BUILD_ALL_ARGS --release
5366
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-
6967# Light-workload Linux tasks.
7068# These use default machines, with fewer CPUs, to reduce pressure on the
7169# concurrency limits.
@@ -84,22 +82,13 @@ task:
8482 script :
8583 - cd script/tool
8684 - 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
10189 always :
10290 format_script : ./script/tool_runner.sh format --fail-on-change
91+ license_script : $PLUGIN_TOOL_COMMAND license-check
10392 pubspec_script : ./script/tool_runner.sh pubspec-check
10493 readme_script :
10594 - ./script/tool_runner.sh readme-check
@@ -108,19 +97,33 @@ task:
10897 # has been fixed, this can be removed and there can just be a single
10998 # run with --require-excerpts and no exclusions.
11099 - ./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
118121 - name : dart_unit_tests
119122 env :
120123 matrix :
121124 CHANNEL : " master"
122125 CHANNEL : " stable"
123- test_script :
126+ unit_test_script :
124127 - ./script/tool_runner.sh test
125128 - name : analyze
126129 env :
@@ -142,39 +145,42 @@ task:
142145 # This uses --run-on-dirty-packages rather than --packages-for-branch
143146 # since only the packages changed by 'make-deps-path-based' need to be
144147 # 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
146149 # Restore the tree to a clean state, to avoid accidental issues if
147150 # other script steps are added to this task.
148151 - 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.
151154 # This is to minimize accidentally making changes that break old versions
152155 # (which we don't commit to supporting, but don't want to actively break)
153156 # without updating the constraints.
154157 # Note: The versions below should be manually updated after a new stable
155158 # version comes out.
156- - name : legacy-version-analyze
159+ - name : legacy_version_analyze
157160 depends_on : analyze
158- env :
159- matrix :
161+ matrix :
162+ env :
160163 CHANNEL : " 3.0.5"
164+ DART_VERSION : " 2.17.6"
165+ env :
161166 CHANNEL : " 2.10.5"
167+ DART_VERSION : " 2.16.2"
162168 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.
165171 - ./script/tool_runner.sh remove-dev-dependencies
166172 analyze_script :
167173 # Only analyze lib/; non-client code doesn't need to work on
168174 # 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
171177 # 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
173179 # those APIs are introduced.
174180 - name : downgraded_analyze
175181 depends_on : analyze
176182 analyze_script :
177- - ./script/tool_runner.sh analyze --downgrade
183+ - ./script/tool_runner.sh analyze --downgrade --custom-analysis=script/configs/custom_analysis.yaml
178184 - name : readme_excerpts
179185 env :
180186 CIRRUS_CLONE_SUBMODULES : true
@@ -194,8 +200,6 @@ task:
194200 matrix :
195201 CHANNEL : " master"
196202 CHANNEL : " stable"
197- setup_script :
198- - flutter config --enable-linux-desktop
199203 << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
200204 - name : linux-platform_tests
201205 # Don't run full platform tests on both channels in pre-submit.
@@ -205,7 +209,6 @@ task:
205209 CHANNEL : " master"
206210 CHANNEL : " stable"
207211 build_script :
208- - flutter config --enable-linux-desktop
209212 - ./script/tool_runner.sh build-examples --linux
210213 native_test_script :
211214 - xvfb-run ./script/tool_runner.sh native-test --linux --no-integration
@@ -244,38 +247,20 @@ task:
244247 MAPS_API_KEY : ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
245248 GCLOUD_FIREBASE_TESTLAB_KEY : ENCRYPTED[30e6cf7189e3ff3868edc25d2e638ef2aec70546456427064bbc74b297d36145364f49f9d26b327787a59df149d69262]
246249 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=""
252250 - ./script/tool_runner.sh build-examples --apk
253251 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=""
259252 - ./script/tool_runner.sh lint-android # must come after build-examples
260253 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=""
266254 # Native integration tests are handled by firebase-test-lab below, so
267255 # only run unit tests.
268256 # Must come after build-examples.
269257 - ./script/tool_runner.sh native-test --android --no-integration --exclude script/configs/exclude_native_unit_android.yaml
270258 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=""
276259 - if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
277260 - 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
279264 - else
280265 - echo "This user does not have permission to run Firebase Test Lab tests."
281266 - fi
@@ -339,7 +324,6 @@ task:
339324 CHANNEL : " stable"
340325 PATH : $PATH:/usr/local/bin
341326 build_script :
342- - flutter config --enable-macos-desktop
343327 - ./script/tool_runner.sh build-examples --macos
344328 xcode_analyze_script :
345329 - ./script/tool_runner.sh xcode-analyze --macos
@@ -408,5 +392,4 @@ task:
408392 CHANNEL : " master"
409393 CHANNEL : " stable"
410394 setup_script :
411- - flutter config --enable-macos-desktop
412395 << : *BUILD_ALL_PLUGINS_APP_TEMPLATE
0 commit comments