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

Skip flutter upgrade for pod linting Cirrus task #3700

Merged
merged 3 commits into from
Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 40 additions & 32 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
root_task_template: &ROOT_TASK_TEMPLATE
# Don't run on release tags since it creates O(n^2) tasks where n is the
# number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
env:
INTEGRATION_TEST_PATH: "./packages/integration_test"
CHANNEL: "master" # Default to master when not explicitly set by a task.
PLUGIN_TOOLS: "dart run ./script/tool/lib/src/main.dart"
setup_script:
- flutter channel $CHANNEL
- flutter upgrade
# Don't run on release tags since it creates O(n^2) tasks where n is the
# number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
env:
INTEGRATION_TEST_PATH: "./packages/integration_test"
CHANNEL: "master" # Default to master when not explicitly set by a task.
PLUGIN_TOOLS: "dart run ./script/tool/lib/src/main.dart"

tool_setup_template: &TOOL_SETUP_TEMPLATE
tool_setup_script:
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
- cd script/tool
- pub get

flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
upgrade_flutter_script:
- flutter channel $CHANNEL
- flutter upgrade
<< : *TOOL_SETUP_TEMPLATE

macos_template: &MACOS_TEMPLATE
# Only one macOS task can run in parallel without credits, so use them for
# PRs on macOS.
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: big-sur-xcode-12.3
cocoapod_install_script: sudo gem install cocoapods

# Light-workload Linux tasks.
# These use default machines, with fewer CPUs, to reduce pressure on the
# concurrency limits.
task:
<< : *ROOT_TASK_TEMPLATE
<< : *FLUTTER_UPGRADE_TEMPLATE
container:
dockerfile: .ci/Dockerfile
matrix:
Expand Down Expand Up @@ -109,7 +121,7 @@ task:
# tasks" block above once web_installers has been updated to support Chrome 89
# (which is what the current image generated from .ci/Dockerfile has).
task:
<< : *ROOT_TASK_TEMPLATE
<< : *FLUTTER_UPGRADE_TEMPLATE
container:
dockerfile: .ci/Dockerfile-LegacyChrome
matrix:
Expand All @@ -134,7 +146,7 @@ task:
# These use machines with more CPUs and memory, so will reduce parallelization
# for non-credit runs.
task:
<< : *ROOT_TASK_TEMPLATE
<< : *FLUTTER_UPGRADE_TEMPLATE
container:
dockerfile: .ci/Dockerfile
cpu: 4
Expand Down Expand Up @@ -177,24 +189,9 @@ task:

# macOS tasks.
task:
<< : *ROOT_TASK_TEMPLATE
# Only one macOS task can run in parallel without credits, so use them for
# PRs on macOS.
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: big-sur-xcode-12.3
cocoapod_install_script: sudo gem install cocoapods
<< : *MACOS_TEMPLATE
<< : *FLUTTER_UPGRADE_TEMPLATE
matrix:
### Platform-agnostic tasks ###
- name: lint_darwin_plugins
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
script:
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
- ./script/incremental_build.sh podspecs
### iOS tasks ###
- name: build_all_plugins_ipa
env:
Expand Down Expand Up @@ -245,3 +242,14 @@ task:
- flutter config --enable-macos-desktop
- ./script/incremental_build.sh build-examples --macos --no-ipa
- ./script/incremental_build.sh drive-examples --macos

task:
# Don't use FLUTTER_UPGRADE_TEMPLATE, Flutter tooling not needed.
<< : *MACOS_TEMPLATE
<< : *TOOL_SETUP_TEMPLATE
matrix:
- name: lint_darwin_plugins
script:
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
- ./script/incremental_build.sh podspecs