From cae638106865bab1d36b302ed2b61618caee09c7 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Fri, 30 Apr 2021 11:34:16 -0700 Subject: [PATCH] Minor adjustments to Cirrus configuration (#336) - Use a specific version of the plugin tools, in preparation for publishing an updated version out of flutter/plugins. - Use templates the same way we do in flutter/plugins for consistency and ease of maintenance. - Separate some setup steps into their own script steps for better inspectability in the UI. - Enable build tests on stable --- .cirrus.yml | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 11473478d4..06d7500ec4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,5 +1,22 @@ gcp_credentials: ENCRYPTED[1816835da1e936dabb469b51501856ec8468676e35e967bd0fd720a815498e5ee6c8a6a79219ce273f67bcb8f1aa948a] +env: + CHANNEL: "master" # Default to master when not explicitly set by a task. + +tool_setup_template: &TOOL_SETUP_TEMPLATE + tool_setup_script: + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work + # Pinned version of the plugin tools, to avoid breakage in this repository + # when pushing updates from flutter/plugins. + - pub global activate flutter_plugin_tools 0.0.45+3 + +flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE + upgrade_flutter_script: + - flutter channel $CHANNEL + - flutter upgrade + - flutter doctor + << : *TOOL_SETUP_TEMPLATE + task: gke_container: dockerfile: .ci/Dockerfile @@ -10,12 +27,7 @@ task: namespace: default cpu: 4 memory: 8G - upgrade_script: - - flutter channel master - - flutter upgrade - - flutter doctor - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools + << : *FLUTTER_UPGRADE_TEMPLATE matrix: - name: analyze script: ./script/incremental_build.sh analyze --custom-analysis=web_benchmarks/testing/test_app @@ -30,6 +42,9 @@ task: - analyze - name: build-apks+java-test env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" matrix: BUILD_SHARDING: "--shardIndex 0 --shardCount 2" BUILD_SHARDING: "--shardIndex 1 --shardCount 2" @@ -39,10 +54,10 @@ task: depends_on: - analyze - name: web_benchmarks_test - script: + install_chromium_script: - ./script/install_chromium.sh + script: - export CHROME_EXECUTABLE=$(pwd)/.chromium/chrome-linux/chrome - - flutter config --enable-web - cd packages/web_benchmarks/testing/test_app - flutter packages get - cd ../.. @@ -56,15 +71,13 @@ task: image: big-sur-xcode-12.4 env: PATH: $PATH:/usr/local/bin + matrix: + CHANNEL: "master" + CHANNEL: "stable" matrix: BUILD_SHARDING: "--shardIndex 0 --shardCount 2" BUILD_SHARDING: "--shardIndex 1 --shardCount 2" - setup_script: - - flutter channel master - - flutter upgrade - - flutter doctor - - git fetch origin master - - pub global activate flutter_plugin_tools + << : *FLUTTER_UPGRADE_TEMPLATE build_script: - ./script/incremental_build.sh build-examples --ipa @@ -78,13 +91,8 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - setup_script: - - git fetch origin master - - pub global activate flutter_plugin_tools + << : *FLUTTER_UPGRADE_TEMPLATE + clang_format_setup_script: - brew install clang-format - upgrade_script: - - flutter channel $CHANNEL - - flutter upgrade - - flutter doctor build_script: - ./script/local_tests.sh