Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit fd52de8

Browse files
authored
Skip flutter upgrade for pod linting Cirrus task (#3700)
1 parent d7724ad commit fd52de8

File tree

1 file changed

+40
-32
lines changed

1 file changed

+40
-32
lines changed

.cirrus.yml

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1-
root_task_template: &ROOT_TASK_TEMPLATE
2-
# Don't run on release tags since it creates O(n^2) tasks where n is the
3-
# number of plugins
4-
only_if: $CIRRUS_TAG == ''
5-
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
6-
env:
7-
INTEGRATION_TEST_PATH: "./packages/integration_test"
8-
CHANNEL: "master" # Default to master when not explicitly set by a task.
9-
PLUGIN_TOOLS: "dart run ./script/tool/lib/src/main.dart"
10-
setup_script:
11-
- flutter channel $CHANNEL
12-
- flutter upgrade
1+
# Don't run on release tags since it creates O(n^2) tasks where n is the
2+
# number of plugins
3+
only_if: $CIRRUS_TAG == ''
4+
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
5+
env:
6+
INTEGRATION_TEST_PATH: "./packages/integration_test"
7+
CHANNEL: "master" # Default to master when not explicitly set by a task.
8+
PLUGIN_TOOLS: "dart run ./script/tool/lib/src/main.dart"
9+
10+
tool_setup_template: &TOOL_SETUP_TEMPLATE
11+
tool_setup_script:
1312
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
1413
- cd script/tool
1514
- pub get
1615

16+
flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
17+
upgrade_flutter_script:
18+
- flutter channel $CHANNEL
19+
- flutter upgrade
20+
<< : *TOOL_SETUP_TEMPLATE
21+
22+
macos_template: &MACOS_TEMPLATE
23+
# Only one macOS task can run in parallel without credits, so use them for
24+
# PRs on macOS.
25+
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
26+
osx_instance:
27+
image: big-sur-xcode-12.3
28+
cocoapod_install_script: sudo gem install cocoapods
1729

1830
# Light-workload Linux tasks.
1931
# These use default machines, with fewer CPUs, to reduce pressure on the
2032
# concurrency limits.
2133
task:
22-
<< : *ROOT_TASK_TEMPLATE
34+
<< : *FLUTTER_UPGRADE_TEMPLATE
2335
container:
2436
dockerfile: .ci/Dockerfile
2537
matrix:
@@ -109,7 +121,7 @@ task:
109121
# tasks" block above once web_installers has been updated to support Chrome 89
110122
# (which is what the current image generated from .ci/Dockerfile has).
111123
task:
112-
<< : *ROOT_TASK_TEMPLATE
124+
<< : *FLUTTER_UPGRADE_TEMPLATE
113125
container:
114126
dockerfile: .ci/Dockerfile-LegacyChrome
115127
matrix:
@@ -134,7 +146,7 @@ task:
134146
# These use machines with more CPUs and memory, so will reduce parallelization
135147
# for non-credit runs.
136148
task:
137-
<< : *ROOT_TASK_TEMPLATE
149+
<< : *FLUTTER_UPGRADE_TEMPLATE
138150
container:
139151
dockerfile: .ci/Dockerfile
140152
cpu: 4
@@ -177,24 +189,9 @@ task:
177189

178190
# macOS tasks.
179191
task:
180-
<< : *ROOT_TASK_TEMPLATE
181-
# Only one macOS task can run in parallel without credits, so use them for
182-
# PRs on macOS.
183-
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
184-
osx_instance:
185-
image: big-sur-xcode-12.3
186-
cocoapod_install_script: sudo gem install cocoapods
192+
<< : *MACOS_TEMPLATE
193+
<< : *FLUTTER_UPGRADE_TEMPLATE
187194
matrix:
188-
### Platform-agnostic tasks ###
189-
- name: lint_darwin_plugins
190-
env:
191-
matrix:
192-
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
193-
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
194-
script:
195-
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
196-
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
197-
- ./script/incremental_build.sh podspecs
198195
### iOS tasks ###
199196
- name: build_all_plugins_ipa
200197
env:
@@ -245,3 +242,14 @@ task:
245242
- flutter config --enable-macos-desktop
246243
- ./script/incremental_build.sh build-examples --macos --no-ipa
247244
- ./script/incremental_build.sh drive-examples --macos
245+
246+
task:
247+
# Don't use FLUTTER_UPGRADE_TEMPLATE, Flutter tooling not needed.
248+
<< : *MACOS_TEMPLATE
249+
<< : *TOOL_SETUP_TEMPLATE
250+
matrix:
251+
- name: lint_darwin_plugins
252+
script:
253+
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
254+
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
255+
- ./script/incremental_build.sh podspecs

0 commit comments

Comments
 (0)