From 99f3b379f9d2b55839bcddf2bb917e577d61bffa Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 10:57:51 -0400 Subject: [PATCH 01/17] Extract a command alias for easy updating once tooling moves --- .cirrus.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 73b27908e88..e8ff0d9cd6e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,6 +4,7 @@ gcp_credentials: ENCRYPTED[!f1177d1ddb5330ffaa9ea11c9c9e8e0c542185e895c36071f18c only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main') env: CHANNEL: "master" # Default to master when not explicitly set by a task. + PLUGIN_TOOL_COMMAND: "dart pub global run flutter_plugin_tools" install_chrome_linux_template: &INSTALL_CHROME_LINUX env: @@ -69,7 +70,7 @@ task: - name: format+analyze always: format_script: ./script/tool_runner.sh format --fail-on-change - license_script: dart pub global run flutter_plugin_tools license-check + license_script: $PLUGIN_TOOL_COMMAND license-check analyze_script: - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml pathified_analyze_script: @@ -80,7 +81,7 @@ task: # This uses --run-on-dirty-packages rather than --packages-for-branch # since only the packages changed by 'make-deps-path-based' need to be # checked. - - dart pub global run flutter_plugin_tools analyze --run-on-dirty-packages --custom-analysis=script/configs/custom_analysis.yaml + - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --custom-analysis=script/configs/custom_analysis.yaml # Restore the tree to a clean state - git checkout . pubspec_script: ./script/tool_runner.sh pubspec-check @@ -153,7 +154,7 @@ task: # the changes won't break tests of other packages in the respository # that depend on it. - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates - - dart pub global run flutter_plugin_tools test --run-on-dirty-packages --exclude=script/configs/dart_unit_tests_exceptions.yaml + - $PLUGIN_TOOL_COMMAND test --run-on-dirty-packages --exclude=script/configs/dart_unit_tests_exceptions.yaml depends_on: - format+analyze - name: linux-custom_package_tests From 32b10182981304b9c11ee032f7c19df121c67933 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 11:03:10 -0400 Subject: [PATCH 02/17] macos template update --- .cirrus.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index e8ff0d9cd6e..c548106326f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -26,6 +26,14 @@ 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' + +macos_intel_template: &MACOS_INTEL_TEMPLATE + << : *MACOS_TEMPLATE + osx_instance: + image: big-sur-xcode-13 + +macos_arm_template: &MACOS_ARM_TEMPLATE + << : *MACOS_TEMPLATE macos_instance: image: ghcr.io/cirruslabs/macos-ventura-xcode:14 @@ -230,7 +238,7 @@ task: task: << : *FLUTTER_UPGRADE_TEMPLATE - << : *MACOS_TEMPLATE + << : *MACOS_ARM_TEMPLATE matrix: ### iOS tasks ### - name: ios-platform_tests From cc482a38c77ef7771fc762bc1ade859ddf3172d6 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 13:11:14 -0400 Subject: [PATCH 03/17] Initial split out of light-weight tasks --- .cirrus.yml | 52 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c548106326f..2a03d035e42 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -62,7 +62,42 @@ flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE - flutter doctor -v << : *TOOL_SETUP_TEMPLATE +# Light-workload Linux tasks. +# These use default machines, with fewer CPUs, to reduce pressure on the +# concurrency limits. task: + << : *FLUTTER_UPGRADE_TEMPLATE + gke_container: + dockerfile: .ci/Dockerfile + builder_image_name: docker-builder-linux # gce vm image + builder_image_project: flutter-cirrus + cluster_name: test-cluster + zone: us-central1-a + namespace: default + matrix: + ### Platform-agnostic tasks ### + - name: publishable + version_script: + # For pre-submit, pass the PR description to the script to allow for + # version check overrides. + # For post-submit, ignore missing version/CHANGELOG detection; the PR + # description isn't reliably part of the commit message, so using the + # same flags as for presubmit would likely result in false-positive + # post-submit failures. + - if [[ $CIRRUS_PR == "" ]]; then + - ./script/tool_runner.sh version-check + - else + - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" + - fi + publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release + depends_on: + - format+analyze + +# Heavy-workload Linux tasks. +# These use machines with more CPUs and memory, so will reduce parallelization +# for non-credit runs. +task: + << : *FLUTTER_UPGRADE_TEMPLATE gke_container: dockerfile: .ci/Dockerfile builder_image_name: docker-builder-linux # gce vm image @@ -72,7 +107,6 @@ task: namespace: default cpu: 4 memory: 12G - << : *FLUTTER_UPGRADE_TEMPLATE matrix: ### Platform-agnostic tasks ### - name: format+analyze @@ -134,22 +168,6 @@ task: depends_on: format+analyze analyze_script: - ./script/tool_runner.sh analyze --downgrade --custom-analysis=script/configs/custom_analysis.yaml - - name: publishable - version_script: - # For pre-submit, pass the PR description to the script to allow for - # version check overrides. - # For post-submit, ignore missing version/CHANGELOG detection; the PR - # description isn't reliably part of the commit message, so using the - # same flags as for presubmit would likely result in false-positive - # post-submit failures. - - if [[ $CIRRUS_PR == "" ]]; then - - ./script/tool_runner.sh version-check - - else - - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" - - fi - publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release - depends_on: - - format+analyze - name: dart_unit_tests env: matrix: From efdca3378f5b1c0e2538bc6d2953bcdd8c582b4e Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 13:19:53 -0400 Subject: [PATCH 04/17] Move format/analyze to light, reorder steps --- .cirrus.yml | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2a03d035e42..3844056f02b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -92,27 +92,18 @@ task: publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release depends_on: - format+analyze - -# Heavy-workload Linux tasks. -# These use machines with more CPUs and memory, so will reduce parallelization -# for non-credit runs. -task: - << : *FLUTTER_UPGRADE_TEMPLATE - gke_container: - dockerfile: .ci/Dockerfile - builder_image_name: docker-builder-linux # gce vm image - builder_image_project: flutter-cirrus - cluster_name: test-cluster - zone: us-central1-a - namespace: default - cpu: 4 - memory: 12G - matrix: - ### Platform-agnostic tasks ### - name: format+analyze always: format_script: ./script/tool_runner.sh format --fail-on-change license_script: $PLUGIN_TOOL_COMMAND license-check + pubspec_script: ./script/tool_runner.sh pubspec-check + readme_script: + - ./script/tool_runner.sh readme-check + # Re-run with --require-excerpts, skipping packages that still need + # to be converted. Once https://github.com/flutter/flutter/issues/102679 + # has been fixed, this can be removed and there can just be a single + # run with --require-excerpts and no exclusions. + - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml analyze_script: - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml pathified_analyze_script: @@ -126,14 +117,23 @@ task: - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --custom-analysis=script/configs/custom_analysis.yaml # Restore the tree to a clean state - git checkout . - pubspec_script: ./script/tool_runner.sh pubspec-check - readme_script: - - ./script/tool_runner.sh readme-check - # Re-run with --require-excerpts, skipping packages that still need - # to be converted. Once https://github.com/flutter/flutter/issues/102679 - # has been fixed, this can be removed and there can just be a single - # run with --require-excerpts and no exclusions. - - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml + +# Heavy-workload Linux tasks. +# These use machines with more CPUs and memory, so will reduce parallelization +# for non-credit runs. +task: + << : *FLUTTER_UPGRADE_TEMPLATE + gke_container: + dockerfile: .ci/Dockerfile + builder_image_name: docker-builder-linux # gce vm image + builder_image_project: flutter-cirrus + cluster_name: test-cluster + zone: us-central1-a + namespace: default + cpu: 4 + memory: 12G + matrix: + ### Platform-agnostic tasks ### - name: readme_excerpts env: CIRRUS_CLONE_SUBMODULES: true From a64123822b9d1ec1e4449303c7666be45283d892 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 13:24:13 -0400 Subject: [PATCH 05/17] Move pathified analysis out of the always --- .cirrus.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3844056f02b..6ece496de93 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -106,17 +106,19 @@ task: - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml analyze_script: - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml - pathified_analyze_script: - # Run analysis with path-based dependencies to ensure that publishing - # the changes won't break analysis of other packages in the respository - # that depend on it. - - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates - # This uses --run-on-dirty-packages rather than --packages-for-branch - # since only the packages changed by 'make-deps-path-based' need to be - # checked. - - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --custom-analysis=script/configs/custom_analysis.yaml - # Restore the tree to a clean state - - git checkout . + # This is not part of the 'always' since there's no reason to run + # pathified analysis unless analysis passed. + pathified_analyze_script: + # Run analysis with path-based dependencies to ensure that publishing + # the changes won't break analysis of other packages in the respository + # that depend on it. + - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates + # This uses --run-on-dirty-packages rather than --packages-for-branch + # since only the packages changed by 'make-deps-path-based' need to be + # checked. + - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --custom-analysis=script/configs/custom_analysis.yaml + # Restore the tree to a clean state + - git checkout . # Heavy-workload Linux tasks. # These use machines with more CPUs and memory, so will reduce parallelization From 72c4ac4e3a55c7ac29855d6f22caaf030658a0f9 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 14:03:53 -0400 Subject: [PATCH 06/17] Split analyze out, combine others into repo_checks --- .cirrus.yml | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6ece496de93..57d02e71fc1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -76,23 +76,10 @@ task: namespace: default matrix: ### Platform-agnostic tasks ### - - name: publishable - version_script: - # For pre-submit, pass the PR description to the script to allow for - # version check overrides. - # For post-submit, ignore missing version/CHANGELOG detection; the PR - # description isn't reliably part of the commit message, so using the - # same flags as for presubmit would likely result in false-positive - # post-submit failures. - - if [[ $CIRRUS_PR == "" ]]; then - - ./script/tool_runner.sh version-check - - else - - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" - - fi - publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release - depends_on: - - format+analyze - - name: format+analyze + # Repository rules and best-practice enforcement. + # Only channel-agnostic tests should go here since it is only run once + # (on Flutter master). + - name: repo_checks always: format_script: ./script/tool_runner.sh format --fail-on-change license_script: $PLUGIN_TOOL_COMMAND license-check @@ -104,10 +91,22 @@ task: # has been fixed, this can be removed and there can just be a single # run with --require-excerpts and no exclusions. - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml - analyze_script: + version_script: + # For pre-submit, pass the PR description to the script to allow for + # version check overrides. + # For post-submit, ignore missing version/CHANGELOG detection; the PR + # description isn't reliably part of the commit message, so using the + # same flags as for presubmit would likely result in false-positive + # post-submit failures. + - if [[ $CIRRUS_PR == "" ]]; then + - ./script/tool_runner.sh version-check + - else + - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" + - fi + publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release + - name: analyze + analyze_script: - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml - # This is not part of the 'always' since there's no reason to run - # pathified analysis unless analysis passed. pathified_analyze_script: # Run analysis with path-based dependencies to ensure that publishing # the changes won't break analysis of other packages in the respository @@ -148,7 +147,7 @@ task: # Note: The versions below should be manually updated after a new stable # version comes out. - name: legacy-version-analyze - depends_on: format+analyze + depends_on: analyze matrix: env: CHANNEL: "3.0.5" @@ -167,7 +166,7 @@ task: # new APIs but forget to update minimum versions of dependencies to where # those APIs are introduced. - name: downgraded_analyze - depends_on: format+analyze + depends_on: analyze analyze_script: - ./script/tool_runner.sh analyze --downgrade --custom-analysis=script/configs/custom_analysis.yaml - name: dart_unit_tests @@ -183,8 +182,6 @@ task: # that depend on it. - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates - $PLUGIN_TOOL_COMMAND test --run-on-dirty-packages --exclude=script/configs/dart_unit_tests_exceptions.yaml - depends_on: - - format+analyze - name: linux-custom_package_tests env: PATH: $PATH:/usr/local/bin @@ -217,8 +214,6 @@ task: - ./script/tool_runner.sh build-examples --apk --exclude=extension_google_sign_in_as_googleapis_auth native_unit_test_scipt: - ./script/tool_runner.sh native-test --android --no-integration - depends_on: - - format+analyze ### Web tasks ### - name: web-platform_tests env: From e44b15c9c385b1c290267e40c2a17ccadd13a069 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 14:04:28 -0400 Subject: [PATCH 07/17] Minor name fix --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 57d02e71fc1..19088fc10a0 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -146,7 +146,7 @@ task: # without updating the constraints. # Note: The versions below should be manually updated after a new stable # version comes out. - - name: legacy-version-analyze + - name: legacy_version_analyze depends_on: analyze matrix: env: From b54349e14b4c53618b57d50fd19a202452d5bfcc Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 14:18:45 -0400 Subject: [PATCH 08/17] Remove obsolete desktop enable flags --- .cirrus.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 19088fc10a0..bcc11c9071e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -246,7 +246,6 @@ task: CHANNEL: "master" CHANNEL: "stable" build_script: - - flutter config --enable-linux-desktop - ./script/tool_runner.sh build-examples --linux native_test_script: - ./script/tool_runner.sh native-test --linux --no-integration @@ -294,7 +293,6 @@ task: CHANNEL: "stable" PATH: $PATH:/usr/local/bin build_script: - - flutter config --enable-macos-desktop - ./script/tool_runner.sh build-examples --macos native_test_script: - ./script/tool_runner.sh native-test --macos From d258c397bf40f84db42d99f05ce960cc0bcb7448 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 14:36:10 -0400 Subject: [PATCH 09/17] Minor changes to version_script to align with plugins --- .cirrus.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index bcc11c9071e..e3260fe0f40 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -92,14 +92,13 @@ task: # run with --require-excerpts and no exclusions. - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml version_script: - # For pre-submit, pass the PR description to the script to allow for - # version check overrides. - # For post-submit, ignore missing version/CHANGELOG detection; the PR - # description isn't reliably part of the commit message, so using the - # same flags as for presubmit would likely result in false-positive - # post-submit failures. + # For pre-submit, pass the PR labels to the script to allow for + # check overrides. + # For post-submit, ignore platform version breaking version changes + # and missing version/CHANGELOG detection since the labels aren't + # available outside of the context of the PR. - if [[ $CIRRUS_PR == "" ]]; then - - ./script/tool_runner.sh version-check + - ./script/tool_runner.sh version-check --ignore-platform-interface-breaks - else - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" - fi From cd1efc81783e4693a5fd6e61fc5c0cf4fef5c04b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 14:39:53 -0400 Subject: [PATCH 10/17] Enable analysis on stable. Oops --- .cirrus.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index e3260fe0f40..4c287731c7d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -104,8 +104,12 @@ task: - fi publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release - name: analyze + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" analyze_script: - - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml + - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml pathified_analyze_script: # Run analysis with path-based dependencies to ensure that publishing # the changes won't break analysis of other packages in the respository From 6def92c528e6f1fa729c7d4e04a4c20f62879b1a Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 14:49:38 -0400 Subject: [PATCH 11/17] Minor diffs --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 4c287731c7d..71ee8eda2eb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -111,10 +111,10 @@ task: analyze_script: - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml pathified_analyze_script: - # Run analysis with path-based dependencies to ensure that publishing + # Re-run analysis with path-based dependencies to ensure that publishing # the changes won't break analysis of other packages in the respository # that depend on it. - - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates + - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates # This uses --run-on-dirty-packages rather than --packages-for-branch # since only the packages changed by 'make-deps-path-based' need to be # checked. From 4c6faac81a11e11a9b931f02f2f894e6c00907ca Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 14:52:29 -0400 Subject: [PATCH 12/17] Minor sync --- .cirrus.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 71ee8eda2eb..9c14e6511e6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -118,8 +118,9 @@ task: # This uses --run-on-dirty-packages rather than --packages-for-branch # since only the packages changed by 'make-deps-path-based' need to be # checked. - - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --custom-analysis=script/configs/custom_analysis.yaml - # Restore the tree to a clean state + - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml + # Restore the tree to a clean state, to avoid accidental issues if + # other script steps are added to this task. - git checkout . # Heavy-workload Linux tasks. From 214a400a4d4cda9e5b857c183a4f8fc2380eba5b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 15:16:45 -0400 Subject: [PATCH 13/17] Move more things up to light workload --- .cirrus.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9c14e6511e6..b2ad4345554 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -122,27 +122,6 @@ task: # Restore the tree to a clean state, to avoid accidental issues if # other script steps are added to this task. - git checkout . - -# Heavy-workload Linux tasks. -# These use machines with more CPUs and memory, so will reduce parallelization -# for non-credit runs. -task: - << : *FLUTTER_UPGRADE_TEMPLATE - gke_container: - dockerfile: .ci/Dockerfile - builder_image_name: docker-builder-linux # gce vm image - builder_image_project: flutter-cirrus - cluster_name: test-cluster - zone: us-central1-a - namespace: default - cpu: 4 - memory: 12G - matrix: - ### Platform-agnostic tasks ### - - name: readme_excerpts - env: - CIRRUS_CLONE_SUBMODULES: true - script: ./script/tool_runner.sh update-excerpts --fail-on-change # Does a sanity check that packages at least pass analysis on the N-1 and N-2 # versions of Flutter stable if the package claims to support that version. # This is to minimize accidentally making changes that break old versions @@ -173,6 +152,27 @@ task: depends_on: analyze analyze_script: - ./script/tool_runner.sh analyze --downgrade --custom-analysis=script/configs/custom_analysis.yaml + - name: readme_excerpts + env: + CIRRUS_CLONE_SUBMODULES: true + script: ./script/tool_runner.sh update-excerpts --fail-on-change + +# Heavy-workload Linux tasks. +# These use machines with more CPUs and memory, so will reduce parallelization +# for non-credit runs. +task: + << : *FLUTTER_UPGRADE_TEMPLATE + gke_container: + dockerfile: .ci/Dockerfile + builder_image_name: docker-builder-linux # gce vm image + builder_image_project: flutter-cirrus + cluster_name: test-cluster + zone: us-central1-a + namespace: default + cpu: 4 + memory: 12G + matrix: + ### Platform-agnostic tasks ### - name: dart_unit_tests env: matrix: From a640e36bb75056e92d8e4d61ca86694987b4cc7b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 15:21:30 -0400 Subject: [PATCH 14/17] Comment sync --- .cirrus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index b2ad4345554..42d9470a0df 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -143,6 +143,8 @@ task: # minimum Flutter/Dart version than the package itself. - ./script/tool_runner.sh remove-dev-dependencies analyze_script: + # Only analyze lib/; non-client code doesn't need to work on + # all supported legacy version. - ./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 # Does a sanity check that packages pass analysis with the lowest possible # versions of all dependencies. This is to catch cases where we add use of From b1e4cb3b55538769ab83857f54e85e0c0d67ae23 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 15:26:50 -0400 Subject: [PATCH 15/17] Move more things up to light workload --- .cirrus.yml | 59 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 42d9470a0df..4b4667f6943 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -103,6 +103,19 @@ task: - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" - fi publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release + - name: dart_unit_tests + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" + unit_test_script: + - ./script/tool_runner.sh test --exclude=script/configs/dart_unit_tests_exceptions.yaml + pathified_unit_test_script: + # Run tests with path-based dependencies to ensure that publishing + # the changes won't break tests of other packages in the respository + # that depend on it. + - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates + - $PLUGIN_TOOL_COMMAND test --run-on-dirty-packages --exclude=script/configs/dart_unit_tests_exceptions.yaml - name: analyze env: matrix: @@ -158,36 +171,6 @@ task: env: CIRRUS_CLONE_SUBMODULES: true script: ./script/tool_runner.sh update-excerpts --fail-on-change - -# Heavy-workload Linux tasks. -# These use machines with more CPUs and memory, so will reduce parallelization -# for non-credit runs. -task: - << : *FLUTTER_UPGRADE_TEMPLATE - gke_container: - dockerfile: .ci/Dockerfile - builder_image_name: docker-builder-linux # gce vm image - builder_image_project: flutter-cirrus - cluster_name: test-cluster - zone: us-central1-a - namespace: default - cpu: 4 - memory: 12G - matrix: - ### Platform-agnostic tasks ### - - name: dart_unit_tests - env: - matrix: - CHANNEL: "master" - CHANNEL: "stable" - unit_test_script: - - ./script/tool_runner.sh test --exclude=script/configs/dart_unit_tests_exceptions.yaml - pathified_unit_test_script: - # Run tests with path-based dependencies to ensure that publishing - # the changes won't break tests of other packages in the respository - # that depend on it. - - ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates - - $PLUGIN_TOOL_COMMAND test --run-on-dirty-packages --exclude=script/configs/dart_unit_tests_exceptions.yaml - name: linux-custom_package_tests env: PATH: $PATH:/usr/local/bin @@ -205,6 +188,22 @@ task: - else - ./script/tool_runner.sh custom-test --exclude=pigeon,flutter_image - fi + +# Heavy-workload Linux tasks. +# These use machines with more CPUs and memory, so will reduce parallelization +# for non-credit runs. +task: + << : *FLUTTER_UPGRADE_TEMPLATE + gke_container: + dockerfile: .ci/Dockerfile + builder_image_name: docker-builder-linux # gce vm image + builder_image_project: flutter-cirrus + cluster_name: test-cluster + zone: us-central1-a + namespace: default + cpu: 4 + memory: 12G + matrix: ### Android tasks ### - name: android-platform_tests env: From 8e4a4b9ea18383de400a43d32ac5e9023afb3222 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 15:40:33 -0400 Subject: [PATCH 16/17] Skip platform tests on stable --- .cirrus.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 4b4667f6943..9067fbbc77a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -206,6 +206,8 @@ task: matrix: ### Android tasks ### - name: android-platform_tests + # Don't run full platform tests on both channels in pre-submit. + skip: $CIRRUS_PR != '' && $CHANNEL == 'stable' env: matrix: PACKAGE_SHARDING: "--shardIndex 0 --shardCount 2" @@ -246,6 +248,8 @@ task: - dart testing/web_benchmarks_test.dart ### Linux desktop tasks ### - name: linux-platform_tests + # Don't run full platform tests on both channels in pre-submit. + skip: $CIRRUS_PR != '' && $CHANNEL == 'stable' env: matrix: CHANNEL: "master" @@ -261,6 +265,8 @@ task: matrix: ### iOS tasks ### - name: ios-platform_tests + # Don't run full platform tests on both channels in pre-submit. + skip: $CIRRUS_PR != '' && $CHANNEL == 'stable' env: PATH: $PATH:/usr/local/bin matrix: @@ -292,6 +298,8 @@ task: - fi ### macOS desktop tasks ### - name: macos-platform_tests + # Don't run full platform tests on both channels in pre-submit. + skip: $CIRRUS_PR != '' && $CHANNEL == 'stable' env: matrix: CHANNEL: "master" From 2d1cf98c8dad83e4e0eccdd11e4ce07544d42c8d Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Oct 2022 15:53:31 -0400 Subject: [PATCH 17/17] Temporarily disable an option that's not on stable yet --- analysis_options.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index faa1b8bf6f1..a3b07481aec 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -77,7 +77,7 @@ linter: # - cascade_invocations # doesn't match the typical style of this repo - cast_nullable_to_non_nullable # - close_sinks # not reliable enough - - combinators_ordering + # - combinators_ordering # DIFFERENT FROM FLUTTER/FLUTTER: This isn't available on stable yet. # - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142 - conditional_uri_does_not_exist # - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204