Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 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
82 changes: 33 additions & 49 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
stuartmorgan-g marked this conversation as resolved.
Outdated
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 ###
Expand All @@ -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 ###
Expand All @@ -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.
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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
Expand All @@ -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:
Expand All @@ -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.
Expand All @@ -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
10 changes: 10 additions & 0 deletions script/set_channel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
Comment thread
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