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

Commit e9cd4ef

Browse files
committed
Rearrange .cirrus script, add cache
1 parent 1206251 commit e9cd4ef

File tree

1 file changed

+102
-52
lines changed

1 file changed

+102
-52
lines changed

.cirrus.yml

+102-52
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,111 @@
1+
pub_cache:
2+
folder: $HOME/.pub-cache
3+
fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
4+
upgrade_script:
5+
- date
6+
- git fetch origin master
7+
- date
8+
activate_script:
9+
- date
10+
- pub global activate flutter_plugin_tools
11+
- date
12+
13+
flutter_master_template: &FLUTTER_MASTER_TEMPLATE
14+
environment:
15+
CHANNEL: "master"
16+
upgrade_script:
17+
- date
18+
- flutter channel $CHANNEL
19+
- flutter upgrade
20+
- date
21+
22+
flutter_stable_template: &FLUTTER_STABLE_TEMPLATE
23+
environment:
24+
CHANNEL: "stable"
25+
flutter_artifacts_cache:
26+
folder: ${FLUTTER_HOME}/bin/cache/artifacts
27+
fingerprint_script: echo $OS; cat ${FLUTTER_HOME}/bin/internal/*.version
28+
flutter_pkg_cache:
29+
folder: ${FLUTTER_HOME}/bin/cache/pkg
30+
fingerprint_script: echo $OS; cat ${FLUTTER_HOME}/bin/internal/*.version
31+
upgrade_script:
32+
- date
33+
- flutter channel $CHANNEL
34+
- flutter upgrade
35+
- date
36+
37+
flutter_stable_skip_web_template: &FLUTTER_STABLE_SKIP_WEB_TEMPLATE
38+
<< : *FLUTTER_STABLE_TEMPLATE
39+
test_script:
40+
# TODO(jackson): Allow web plugins once supported on stable
41+
# https://github.com/flutter/flutter/issues/42864
42+
- find . | grep _web$ | xargs rm -rf; fi
43+
144
task:
245
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
346
container:
447
dockerfile: .ci/Dockerfile
548
cpu: 8
649
memory: 16G
7-
upgrade_script:
8-
- flutter channel stable
9-
- flutter upgrade
10-
- flutter channel master
11-
- flutter upgrade
12-
- git fetch origin master
13-
activate_script: pub global activate flutter_plugin_tools
1450
matrix:
1551
- name: publishable
52+
<< : *FLUTTER_STABLE_TEMPLATE
1653
script:
17-
- flutter channel stable
54+
- date
1855
- ./script/check_publish.sh
56+
- date
1957
- name: format
58+
<< : *FLUTTER_STABLE_TEMPLATE
2059
install_script:
60+
- date
2161
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
2262
- sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
2363
- sudo apt-get update
2464
- sudo apt-get install -y --allow-unauthenticated clang-format-7
25-
format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7
65+
- date
66+
format_script:
67+
- date
68+
- ./script/incremental_build.sh format --travis --clang-format=clang-format-7
69+
- date
2670
- name: test
27-
env:
28-
matrix:
29-
CHANNEL: "master"
30-
CHANNEL: "stable"
71+
matrix:
72+
- name: master
73+
<< : *FLUTTER_MASTER_TEMPLATE
74+
- name: stable
75+
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
3176
test_script:
32-
# TODO(jackson): Allow web plugins once supported on stable
33-
# https://github.com/flutter/flutter/issues/42864
34-
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
35-
- flutter channel $CHANNEL
77+
- date
3678
- ./script/incremental_build.sh test
79+
- date
3780
- name: analyze
38-
script: ./script/incremental_build.sh analyze
81+
<< : *FLUTTER_STABLE_TEMPLATE
82+
script:
83+
- date
84+
- ./script/incremental_build.sh analyze
85+
- date
3986
- name: build_all_plugins_apk
87+
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
4088
script:
41-
# TODO(jackson): Allow web plugins once supported on stable
42-
# https://github.com/flutter/flutter/issues/42864
43-
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
44-
- flutter channel $CHANNEL
89+
- date
4590
- ./script/build_all_plugins_app.sh apk
91+
- date
92+
depends_on:
93+
- format
94+
- publishable
4695
- name: build-apks+java-test+firebase-test-lab
47-
env:
96+
environment:
4897
matrix:
4998
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
5099
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
51100
matrix:
52-
CHANNEL: "master"
53-
CHANNEL: "stable"
101+
- name: master
102+
<< : *FLUTTER_MASTER_TEMPLATE
103+
- name: stable
104+
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
54105
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
55106
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4]
56107
script:
57-
# TODO(jackson): Allow web plugins once supported on stable
58-
# https://github.com/flutter/flutter/issues/42864
59-
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
60-
- flutter channel $CHANNEL
108+
- date
61109
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
62110
# might include non-ASCII characters which makes Gradle crash.
63111
# See: https://github.com/flutter/flutter/issues/24935
@@ -78,6 +126,10 @@ task:
78126
- fi
79127
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
80128
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
129+
- date
130+
depends_on:
131+
- format
132+
- publishable
81133

82134
task:
83135
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
@@ -86,44 +138,42 @@ task:
86138
environment:
87139
COCOAPODS_DISABLE_STATS: true
88140
PATH: $PATH:/usr/local/bin
89-
setup_script:
90-
- pod --version
91-
- sudo gem list cocoapods
92-
upgrade_script:
93-
- flutter channel stable
94-
- flutter upgrade
95-
- flutter channel master
96-
- flutter upgrade
97-
- git fetch origin master
98-
activate_script: pub global activate flutter_plugin_tools
99141
create_simulator_script:
142+
- date
100143
- xcrun simctl list
101144
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-2 | xargs xcrun simctl boot
145+
- date
102146
matrix:
103147
- name: build_all_plugins_ipa
148+
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
104149
script:
105-
# TODO(jackson): Allow web plugins once supported on stable
106-
# https://github.com/flutter/flutter/issues/42864
107-
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
108-
- flutter channel $CHANNEL
150+
- date
109151
- ./script/build_all_plugins_app.sh ios --no-codesign
152+
- date
110153
- name: lint_darwin_plugins
111-
script: ./script/lint_darwin_plugins.sh
154+
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
155+
script:
156+
- date
157+
- ./script/lint_darwin_plugins.sh
158+
- date
112159
- name: build-ipas+drive-examples
113-
env:
160+
environment:
114161
matrix:
115162
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
116163
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
117164
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
118165
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
119166
matrix:
120-
CHANNEL: "master"
121-
CHANNEL: "stable"
167+
- name: master
168+
<< : *FLUTTER_MASTER_TEMPLATE
169+
- name: stable
170+
<< : *FLUTTER_STABLE_SKIP_WEB_TEMPLATE
122171
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
123-
build_script:
124-
# TODO(jackson): Allow web plugins once supported on stable
125-
# https://github.com/flutter/flutter/issues/42864
126-
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
127-
- flutter channel $CHANNEL
172+
script:
173+
- date
128174
- ./script/incremental_build.sh build-examples --ipa
129175
- ./script/incremental_build.sh drive-examples
176+
- date
177+
depends_on:
178+
- format
179+
- publishable

0 commit comments

Comments
 (0)