Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

WIP Reduce CI testing time, add caching #2357

Closed
wants to merge 35 commits into from
Closed
Changes from 13 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
507c44a
Remove pod setup
jmagman Dec 5, 2019
1206251
Remove repo remove
jmagman Dec 6, 2019
e9cd4ef
Rearrange .cirrus script, add cache
jmagman Dec 6, 2019
426532b
Indent
jmagman Dec 6, 2019
5d75a70
{
jmagman Dec 6, 2019
b66e3c8
Remove cache
jmagman Dec 6, 2019
eac5365
Remove cache
jmagman Dec 6, 2019
436aad4
Rename script
jmagman Dec 6, 2019
c95c9d2
BASE_TASK_TEMPLATE
jmagman Dec 6, 2019
3a1ff30
Remove CIRRUS_WORKING_DIR
jmagman Dec 6, 2019
fc3c4ad
Change fingerprint
jmagman Dec 6, 2019
9f35317
single
jmagman Dec 6, 2019
918adf9
fingerprint
jmagman Dec 6, 2019
54e4bbe
FLUTTER_TEMPLATE
jmagman Dec 6, 2019
153db2b
BASE_TASK_TEMPLATE
jmagman Dec 6, 2019
5294d39
Test fingerprint_script outside of template
jmagman Dec 6, 2019
e3ced2a
extension-methods
jmagman Dec 6, 2019
0d18153
**
jmagman Dec 6, 2019
3cf307d
fi
jmagman Dec 6, 2019
860f5a1
Remove format dependency
jmagman Dec 6, 2019
ac73cd0
Swap to master
jmagman Dec 6, 2019
693b1bf
FLUTTER_TEMPLATE
jmagman Dec 6, 2019
1f436b5
Reduce number of templates
jmagman Dec 6, 2019
98423d4
Rearrange matrix
jmagman Dec 6, 2019
fac97be
Try only_if
jmagman Dec 6, 2019
9121781
Rearrange matrix
jmagman Dec 6, 2019
8314d64
Rearrange matrix
jmagman Dec 6, 2019
901cd92
pub_cache
jmagman Dec 6, 2019
d1f2ce4
Well only_if didn't work...
jmagman Dec 6, 2019
c643da5
Cache all the things
jmagman Dec 7, 2019
bf81f69
Add channel to fingerprint
jmagman Dec 7, 2019
773e81f
channel_script
jmagman Dec 7, 2019
672030a
Remove all caches
jmagman Dec 7, 2019
d12b38d
Clear flutter cache
jmagman Dec 7, 2019
41147b0
FLUTTER_HOME is there, rm the cache
jmagman Dec 7, 2019
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
154 changes: 101 additions & 53 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,105 @@
base_task_template: &BASE_TASK_TEMPLATE
upgrade_script:
- date
- git fetch origin master
- date
- pub global activate flutter_plugin_tools
- date

flutter_master_template: &FLUTTER_MASTER_TEMPLATE
environment:
CHANNEL: "master"
setup_script:
- date
- which flutter
- flutter channel $CHANNEL
- flutter upgrade
- date

flutter_stable_template: &FLUTTER_STABLE_TEMPLATE
environment:
CHANNEL: "stable"
pub_cache:
folder: $HOME/.pub-cache
setup_script:
- date
- flutter channel $CHANNEL
- flutter upgrade
- date

flutter_stable_skip_web_template: &FLUTTER_STABLE_SKIP_WEB_TEMPLATE
<< : *FLUTTER_STABLE_TEMPLATE
remove_web_plugins_script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- find . | grep _web$ | xargs rm -rf; fi

task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile
cpu: 8
memory: 16G
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script: pub global activate flutter_plugin_tools
<< : *BASE_TASK_TEMPLATE
matrix:
- name: publishable
<< : *FLUTTER_STABLE_TEMPLATE
script:
- flutter channel stable
- date
- ./script/check_publish.sh
- date
- name: format
<< : *FLUTTER_STABLE_TEMPLATE
install_script:
- date
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
- sudo apt-get update
- sudo apt-get install -y --allow-unauthenticated clang-format-7
format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7
- date
format_script:
- date
- ./script/incremental_build.sh format --travis --clang-format=clang-format-7
- date
- name: test
env:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
matrix:
- name: master
<< : *FLUTTER_MASTER_TEMPLATE
- name: stable
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
test_script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- date
- ./script/incremental_build.sh test
- date
- name: analyze
script: ./script/incremental_build.sh analyze
<< : *FLUTTER_STABLE_TEMPLATE
script:
- date
- ./script/incremental_build.sh analyze
- date
- name: build_all_plugins_apk
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- date
- ./script/build_all_plugins_app.sh apk
- date
depends_on:
- format
- publishable
- name: build-apks+java-test+firebase-test-lab
env:
environment:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
- name: master
<< : *FLUTTER_MASTER_TEMPLATE
- name: stable
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4]
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- date
# 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 @@ -78,49 +120,55 @@ task:
- fi
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
- date
depends_on:
- format
- publishable

task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: mojave-xcode-11.2.1-flutter
setup_script:
- pod repo update
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script: pub global activate flutter_plugin_tools
image: mojave-flutter
<< : *BASE_TASK_TEMPLATE
environment:
COCOAPODS_DISABLE_STATS: true
PATH: $PATH:/usr/local/bin
create_simulator_script:
- date
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-2 | xargs xcrun simctl boot
- date
matrix:
- name: build_all_plugins_ipa
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- date
- ./script/build_all_plugins_app.sh ios --no-codesign
- date
- name: lint_darwin_plugins
script: ./script/lint_darwin_plugins.sh
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
script:
- date
- ./script/lint_darwin_plugins.sh
- date
- name: build-ipas+drive-examples
env:
PATH: $PATH:/usr/local/bin
environment:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
- name: master
<< : *FLUTTER_MASTER_TEMPLATE
- name: stable
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
build_script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
script:
- date
- ./script/incremental_build.sh build-examples --ipa
- ./script/incremental_build.sh drive-examples
- date
depends_on:
- format
- publishable