From 4b9d17b4e1ff57ce2021871b7b30d77f0ea76100 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 11:44:26 -0500 Subject: [PATCH 1/8] Don't always get both channels; only make simulators when necessary --- .cirrus.yml | 78 ++++++++++++++++++------------------------- script/set_channel.sh | 15 +++++++++ 2 files changed, 47 insertions(+), 46 deletions(-) create mode 100755 script/set_channel.sh diff --git a/.cirrus.yml b/.cirrus.yml index eac32d114269..361f9e1c8d08 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,40 +9,37 @@ task: dockerfile: .ci/Dockerfile env: INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - flutter config --enable-linux-desktop - - git fetch origin master + setup_script: + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work matrix: ### Platform-agnostic tasks ### - name: plugin_tools_tests + upgrade_script: ./script/set_channel.sh master script: - cd script/tool - pub get - CIRRUS_BUILD_ID=null pub run test - name: publishable + upgrade_script: ./script/set_channel.sh master script: - - flutter channel master - ./script/check_publish.sh - name: format + upgrade_script: ./script/set_channel.sh master format_script: ./script/incremental_build.sh format --fail-on-change - name: test env: matrix: CHANNEL: "master" CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL test_script: - - flutter channel $CHANNEL - ./script/incremental_build.sh test - name: analyze_master env: matrix: CHANNEL: "master" + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL - ./script/incremental_build.sh analyze ## TODO(cyanglaz): ## Combing stable and master analyze jobs when integration test null safety is ready on flutter stable. @@ -50,8 +47,8 @@ task: env: matrix: CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL - find . -depth -type d -wholename '*_web/example' -exec rm -rf {} \; - ./script/incremental_build.sh analyze ### Android tasks ### @@ -60,8 +57,8 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL - ./script/build_all_plugins_app.sh apk ### Web tasks ### - name: build_all_plugins_web @@ -69,15 +66,15 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL - ./script/build_all_plugins_app.sh web - name: build-web-examples env: matrix: CHANNEL: "master" + upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - - flutter channel $CHANNEL - ./script/incremental_build.sh build-examples --web # TODO: Add driving examples (and move to heavy-workload group). ### Linux desktop tasks ### @@ -86,8 +83,9 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL + - flutter config --enable-linux-desktop - ./script/build_all_plugins_app.sh linux # Legacy Dockerfile configuration for web integration tests. @@ -104,13 +102,8 @@ task: dockerfile: .ci/Dockerfile-LegacyChrome env: INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - flutter config --enable-linux-desktop - - git fetch origin master + setup_script: + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work matrix: - name: integration_web_smoke_test env: @@ -119,8 +112,8 @@ task: CHANNEL: "stable" # Tests integration example test in web. only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" + upgrade_script: ./script/set_channel.sh $CHANNEL install_script: - - flutter channel $CHANNEL - git clone https://github.com/flutter/web_installers.git - cd web_installers/packages/web_drivers/ - pub get @@ -143,13 +136,8 @@ task: memory: 16G env: INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - flutter config --enable-linux-desktop - - git fetch origin master + setup_script: + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work matrix: ### Android tasks ### - name: build-apks+java-test+firebase-test-lab @@ -164,8 +152,8 @@ task: CHANNEL: "stable" MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they # might include non-ASCII characters which makes Gradle crash. # See: https://github.com/flutter/flutter/issues/24935 @@ -192,8 +180,9 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - - flutter channel $CHANNEL + - flutter config --enable-linux-desktop - ./script/incremental_build.sh build-examples --linux - xvfb-run ./script/incremental_build.sh drive-examples --linux @@ -204,17 +193,9 @@ task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' osx_instance: image: big-sur-xcode-12.3 - upgrade_script: + setup_script: + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work - sudo gem install cocoapods - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - flutter config --enable-macos-desktop - - git fetch origin master - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot matrix: ### Platform-agnostic tasks ### - name: lint_darwin_plugins @@ -234,8 +215,8 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL - ./script/build_all_plugins_app.sh ios --no-codesign - name: build-ipas+drive-examples env: @@ -250,8 +231,11 @@ task: CHANNEL: "master" CHANNEL: "stable" SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot + upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - - flutter channel $CHANNEL - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh xctest --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" # `drive-examples` contains integration tests, which changes the UI of the application. @@ -264,8 +248,9 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL script: - - flutter channel $CHANNEL + - flutter config --enable-macos-desktop - ./script/build_all_plugins_app.sh macos - name: build-macos+drive-examples env: @@ -273,7 +258,8 @@ task: CHANNEL: "master" CHANNEL: "stable" PATH: $PATH:/usr/local/bin + upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - - flutter channel $CHANNEL + - flutter config --enable-macos-desktop - ./script/incremental_build.sh build-examples --macos --no-ipa - ./script/incremental_build.sh drive-examples --macos diff --git a/script/set_channel.sh b/script/set_channel.sh new file mode 100755 index 000000000000..51f59aa14cdd --- /dev/null +++ b/script/set_channel.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright 202 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +# Set up the repository to the right channel before doing any Flutter operations +# to ensure the upgrade doesn't start off by downloading the wrong Dart SDK +# version. +git co $@ +git pull +# Run the normal channel-switch code to ensure that all the state is correct. +flutter channel $@ +flutter upgrade From 973ef882846f454d3e5fb1e6e2108eb80b328e34 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 11:49:28 -0500 Subject: [PATCH 2/8] Re-enable credits for macOS --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 361f9e1c8d08..026b9ee0ce49 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -190,7 +190,7 @@ task: # Xcode 12 task # 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 == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: image: big-sur-xcode-12.3 setup_script: From 272f8522257775cf87eb2fa94741aa447df147c6 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 11:52:25 -0500 Subject: [PATCH 3/8] Remove obsolete script step related to dummy iOS folders --- .cirrus.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 026b9ee0ce49..0864f39459f1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -206,8 +206,6 @@ task: script: # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm - # Skip the dummy podspecs used to placate the tool. - - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm - ./script/incremental_build.sh podspecs ### iOS tasks ### - name: build_all_plugins_ipa From a06debcc3997c08882d17f898b04b58373a7c0e9 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 11:59:11 -0500 Subject: [PATCH 4/8] Remove unnecessary git steps; some Flutter version is already cached --- script/set_channel.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/script/set_channel.sh b/script/set_channel.sh index 51f59aa14cdd..cf0ae5de2606 100755 --- a/script/set_channel.sh +++ b/script/set_channel.sh @@ -5,11 +5,6 @@ set -e -# Set up the repository to the right channel before doing any Flutter operations -# to ensure the upgrade doesn't start off by downloading the wrong Dart SDK -# version. -git co $@ -git pull # Run the normal channel-switch code to ensure that all the state is correct. flutter channel $@ flutter upgrade From 35513e26a9ebf7b9ace7dac23945c6837a028eee Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 13:03:35 -0500 Subject: [PATCH 5/8] Adjust Linux tasks to improve concurrency --- .cirrus.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 0864f39459f1..ce1a3538b9aa 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -87,6 +87,16 @@ task: script: - flutter config --enable-linux-desktop - ./script/build_all_plugins_app.sh linux + - name: build-linux+drive-examples + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" + upgrade_script: ./script/set_channel.sh $CHANNEL + build_script: + - flutter config --enable-linux-desktop + - ./script/incremental_build.sh build-examples --linux + - xvfb-run ./script/incremental_build.sh drive-examples --linux # Legacy Dockerfile configuration for web integration tests. # https://github.com/flutter/web_installers doesn't yet support the current @@ -132,8 +142,8 @@ task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' container: dockerfile: .ci/Dockerfile - cpu: 8 - memory: 16G + cpu: 4 + memory: 12G env: INTEGRATION_TEST_PATH: "./packages/integration_test" setup_script: @@ -174,17 +184,6 @@ task: - fi - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` - ### Linux desktop tasks ### - - name: build-linux+drive-examples - env: - matrix: - CHANNEL: "master" - CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL - build_script: - - flutter config --enable-linux-desktop - - ./script/incremental_build.sh build-examples --linux - - xvfb-run ./script/incremental_build.sh drive-examples --linux task: # Xcode 12 task From 07a13edebe05a211a03c72f354cc188cb5feaa9b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 13:57:59 -0500 Subject: [PATCH 6/8] Try re-consolidated upgrade script --- .cirrus.yml | 30 +++++++++++++----------------- script/set_channel.sh | 10 ---------- 2 files changed, 13 insertions(+), 27 deletions(-) delete mode 100755 script/set_channel.sh diff --git a/.cirrus.yml b/.cirrus.yml index ce1a3538b9aa..eb3666449d94 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,36 +9,34 @@ task: dockerfile: .ci/Dockerfile env: INTEGRATION_TEST_PATH: "./packages/integration_test" + CHANNEL: "master" # Default to master when not explicitly set by a task. setup_script: + - flutter channel $CHANNEL + - flutter upgrade - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work matrix: ### Platform-agnostic tasks ### - name: plugin_tools_tests - upgrade_script: ./script/set_channel.sh master script: - cd script/tool - pub get - CIRRUS_BUILD_ID=null pub run test - name: publishable - upgrade_script: ./script/set_channel.sh master script: - ./script/check_publish.sh - name: format - upgrade_script: ./script/set_channel.sh master format_script: ./script/incremental_build.sh format --fail-on-change - name: test env: matrix: CHANNEL: "master" CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL test_script: - ./script/incremental_build.sh test - name: analyze_master env: matrix: CHANNEL: "master" - upgrade_script: ./script/set_channel.sh $CHANNEL script: - ./script/incremental_build.sh analyze ## TODO(cyanglaz): @@ -47,7 +45,6 @@ task: env: matrix: CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL script: - find . -depth -type d -wholename '*_web/example' -exec rm -rf {} \; - ./script/incremental_build.sh analyze @@ -57,7 +54,6 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL script: - ./script/build_all_plugins_app.sh apk ### Web tasks ### @@ -66,14 +62,12 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL script: - ./script/build_all_plugins_app.sh web - name: build-web-examples env: matrix: CHANNEL: "master" - upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - ./script/incremental_build.sh build-examples --web # TODO: Add driving examples (and move to heavy-workload group). @@ -83,7 +77,6 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL script: - flutter config --enable-linux-desktop - ./script/build_all_plugins_app.sh linux @@ -92,7 +85,6 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - flutter config --enable-linux-desktop - ./script/incremental_build.sh build-examples --linux @@ -112,7 +104,10 @@ task: dockerfile: .ci/Dockerfile-LegacyChrome env: INTEGRATION_TEST_PATH: "./packages/integration_test" + CHANNEL: "master" # Default to master when not explicitly set by a task. setup_script: + - flutter channel $CHANNEL + - flutter upgrade - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work matrix: - name: integration_web_smoke_test @@ -122,7 +117,6 @@ task: CHANNEL: "stable" # Tests integration example test in web. only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" - upgrade_script: ./script/set_channel.sh $CHANNEL install_script: - git clone https://github.com/flutter/web_installers.git - cd web_installers/packages/web_drivers/ @@ -146,7 +140,10 @@ task: memory: 12G env: INTEGRATION_TEST_PATH: "./packages/integration_test" + CHANNEL: "master" # Default to master when not explicitly set by a task. setup_script: + - flutter channel $CHANNEL + - flutter upgrade - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work matrix: ### Android tasks ### @@ -162,7 +159,6 @@ task: CHANNEL: "stable" MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] - upgrade_script: ./script/set_channel.sh $CHANNEL script: # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they # might include non-ASCII characters which makes Gradle crash. @@ -192,7 +188,11 @@ task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: image: big-sur-xcode-12.3 + env: + CHANNEL: "master" # Default to master when not explicitly set by a task. setup_script: + - flutter channel $CHANNEL + - flutter upgrade - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work - sudo gem install cocoapods matrix: @@ -212,7 +212,6 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL script: - ./script/build_all_plugins_app.sh ios --no-codesign - name: build-ipas+drive-examples @@ -231,7 +230,6 @@ task: create_simulator_script: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot - upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh xctest --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" @@ -245,7 +243,6 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - upgrade_script: ./script/set_channel.sh $CHANNEL script: - flutter config --enable-macos-desktop - ./script/build_all_plugins_app.sh macos @@ -255,7 +252,6 @@ task: CHANNEL: "master" CHANNEL: "stable" PATH: $PATH:/usr/local/bin - upgrade_script: ./script/set_channel.sh $CHANNEL build_script: - flutter config --enable-macos-desktop - ./script/incremental_build.sh build-examples --macos --no-ipa diff --git a/script/set_channel.sh b/script/set_channel.sh deleted file mode 100755 index cf0ae5de2606..000000000000 --- a/script/set_channel.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Copyright 202 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -e - -# Run the normal channel-switch code to ensure that all the state is correct. -flutter channel $@ -flutter upgrade From 2f3f08114e41576b24063743f8372f2145b1488a Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 14:12:54 -0500 Subject: [PATCH 7/8] Use a shared template for setup --- .cirrus.yml | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index eb3666449d94..a64ff3a93fba 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,3 +1,13 @@ +root_task_template: &ROOT_TASK_TEMPLATE + env: + INTEGRATION_TEST_PATH: "./packages/integration_test" + CHANNEL: "master" # Default to master when not explicitly set by a task. + setup_script: + - flutter channel $CHANNEL + - flutter upgrade + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work + + # Light-workload tasks. # These use default machines, with fewer CPUs, to reduce pressure on the # concurrency limits. @@ -7,13 +17,7 @@ task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' container: dockerfile: .ci/Dockerfile - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - CHANNEL: "master" # Default to master when not explicitly set by a task. - setup_script: - - flutter channel $CHANNEL - - flutter upgrade - - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work + << : *ROOT_TASK_TEMPLATE matrix: ### Platform-agnostic tasks ### - name: plugin_tools_tests @@ -102,13 +106,7 @@ task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' container: dockerfile: .ci/Dockerfile-LegacyChrome - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - CHANNEL: "master" # Default to master when not explicitly set by a task. - setup_script: - - flutter channel $CHANNEL - - flutter upgrade - - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work + << : *ROOT_TASK_TEMPLATE matrix: - name: integration_web_smoke_test env: @@ -138,13 +136,7 @@ task: dockerfile: .ci/Dockerfile cpu: 4 memory: 12G - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - CHANNEL: "master" # Default to master when not explicitly set by a task. - setup_script: - - flutter channel $CHANNEL - - flutter upgrade - - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work + << : *ROOT_TASK_TEMPLATE matrix: ### Android tasks ### - name: build-apks+java-test+firebase-test-lab @@ -188,13 +180,8 @@ task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: image: big-sur-xcode-12.3 - env: - CHANNEL: "master" # Default to master when not explicitly set by a task. - setup_script: - - flutter channel $CHANNEL - - flutter upgrade - - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work - - sudo gem install cocoapods + << : *ROOT_TASK_TEMPLATE + cocoapod_install_script: sudo gem install cocoapods matrix: ### Platform-agnostic tasks ### - name: lint_darwin_plugins From bfeb38b2dadec0c5489758395619a459c19f83be Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 10 Mar 2021 14:48:49 -0500 Subject: [PATCH 8/8] More minor cleanup --- .cirrus.yml | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index a64ff3a93fba..8d992d5cbbd1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,4 +1,8 @@ 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. @@ -8,16 +12,13 @@ root_task_template: &ROOT_TASK_TEMPLATE - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work -# Light-workload tasks. +# Light-workload Linux tasks. # These use default machines, with fewer CPUs, to reduce pressure on the # concurrency limits. task: - # 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 == '' + << : *ROOT_TASK_TEMPLATE container: dockerfile: .ci/Dockerfile - << : *ROOT_TASK_TEMPLATE matrix: ### Platform-agnostic tasks ### - name: plugin_tools_tests @@ -101,12 +102,9 @@ 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: - # 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 == '' + << : *ROOT_TASK_TEMPLATE container: dockerfile: .ci/Dockerfile-LegacyChrome - << : *ROOT_TASK_TEMPLATE matrix: - name: integration_web_smoke_test env: @@ -125,18 +123,15 @@ task: - cd $INTEGRATION_TEST_PATH/example/ - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome -# Heavy-workload tasks. +# Heavy-workload Linux tasks. # These use machines with more CPUs and memory, so will reduce parallelization # for non-credit runs. task: - # 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 == '' + << : *ROOT_TASK_TEMPLATE container: dockerfile: .ci/Dockerfile cpu: 4 memory: 12G - << : *ROOT_TASK_TEMPLATE matrix: ### Android tasks ### - name: build-apks+java-test+firebase-test-lab @@ -173,14 +168,14 @@ task: - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` +# macOS tasks. task: - # Xcode 12 task - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' + << : *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 - << : *ROOT_TASK_TEMPLATE cocoapod_install_script: sudo gem install cocoapods matrix: ### Platform-agnostic tasks ###