This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Streamline CI setup, and reenable macOS credits #3697
Merged
stuartmorgan-g
merged 8 commits into
flutter-team-archive:master
from
stuartmorgan-g:ci-streamlining
Mar 10, 2021
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4b9d17b
Don't always get both channels; only make simulators when necessary
stuartmorgan-g 973ef88
Re-enable credits for macOS
stuartmorgan-g 272f852
Remove obsolete script step related to dummy iOS folders
stuartmorgan-g a06debc
Remove unnecessary git steps; some Flutter version is already cached
stuartmorgan-g 35513e2
Adjust Linux tasks to improve concurrency
stuartmorgan-g 07a13ed
Try re-consolidated upgrade script
stuartmorgan-g 2f3f081
Use a shared template for setup
stuartmorgan-g bfeb38b
More minor cleanup
stuartmorgan-g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,49 +9,46 @@ 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. | ||
| - name: analyze_stable | ||
| 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,24 +57,24 @@ 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 | ||
| env: | ||
| 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,29 +180,22 @@ 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 | ||
|
|
||
| task: | ||
| # Xcode 12 task | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you mind removing this comment while you're here? I should have removed it with #3653.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| # 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 | ||
| 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 | ||
|
|
@@ -225,17 +206,15 @@ 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 | ||
| env: | ||
| 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 +229,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,16 +246,18 @@ 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: | ||
| matrix: | ||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
|
stuartmorgan-g marked this conversation as resolved.
Outdated
|
||
| # 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 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.