1
- # Light-workload tasks.
2
- # These use default machines, with fewer CPUs, to reduce pressure on the
3
- # concurrency limits.
4
- task :
5
- # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
1
+ root_task_template : &ROOT_TASK_TEMPLATE
2
+ # Don't run on release tags since it creates O(n^2) tasks where n is the
3
+ # number of plugins
6
4
only_if : $CIRRUS_TAG == ''
7
5
use_compute_credits : $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
8
- container :
9
- dockerfile : .ci/Dockerfile
10
6
env :
11
7
INTEGRATION_TEST_PATH : " ./packages/integration_test"
12
- upgrade_script :
13
- - flutter channel stable
14
- - flutter upgrade
15
- - flutter channel master
8
+ CHANNEL : " master" # Default to master when not explicitly set by a task.
9
+ setup_script :
10
+ - flutter channel $CHANNEL
16
11
- flutter upgrade
17
- - flutter config --enable-linux-desktop
18
- - git fetch origin master
12
+ - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
13
+
14
+
15
+ # Light-workload Linux tasks.
16
+ # These use default machines, with fewer CPUs, to reduce pressure on the
17
+ # concurrency limits.
18
+ task :
19
+ << : *ROOT_TASK_TEMPLATE
20
+ container :
21
+ dockerfile : .ci/Dockerfile
19
22
matrix :
20
23
# ## Platform-agnostic tasks ###
21
24
- name : plugin_tools_tests
25
28
- CIRRUS_BUILD_ID=null pub run test
26
29
- name : publishable
27
30
script :
28
- - flutter channel master
29
31
- ./script/check_publish.sh
30
32
- name : format
31
33
format_script : ./script/incremental_build.sh format --fail-on-change
@@ -35,14 +37,12 @@ task:
35
37
CHANNEL : " master"
36
38
CHANNEL : " stable"
37
39
test_script :
38
- - flutter channel $CHANNEL
39
40
- ./script/incremental_build.sh test
40
41
- name : analyze_master
41
42
env :
42
43
matrix :
43
44
CHANNEL : " master"
44
45
script :
45
- - flutter channel $CHANNEL
46
46
- ./script/incremental_build.sh analyze
47
47
# # TODO(cyanglaz):
48
48
# # Combing stable and master analyze jobs when integration test null safety is ready on flutter stable.
51
51
matrix :
52
52
CHANNEL : " stable"
53
53
script :
54
- - flutter channel $CHANNEL
55
54
- find . -depth -type d -wholename '*_web/example' -exec rm -rf {} \;
56
55
- ./script/incremental_build.sh analyze
57
56
# ## Android tasks ###
61
60
CHANNEL : " master"
62
61
CHANNEL : " stable"
63
62
script :
64
- - flutter channel $CHANNEL
65
63
- ./script/build_all_plugins_app.sh apk
66
64
# ## Web tasks ###
67
65
- name : build_all_plugins_web
@@ -70,14 +68,12 @@ task:
70
68
CHANNEL : " master"
71
69
CHANNEL : " stable"
72
70
script :
73
- - flutter channel $CHANNEL
74
71
- ./script/build_all_plugins_app.sh web
75
72
- name : build-web-examples
76
73
env :
77
74
matrix :
78
75
CHANNEL : " master"
79
76
build_script :
80
- - flutter channel $CHANNEL
81
77
- ./script/incremental_build.sh build-examples --web
82
78
# TODO: Add driving examples (and move to heavy-workload group).
83
79
# ## Linux desktop tasks ###
87
83
CHANNEL : " master"
88
84
CHANNEL : " stable"
89
85
script :
90
- - flutter channel $CHANNEL
86
+ - flutter config --enable-linux-desktop
91
87
- ./script/build_all_plugins_app.sh linux
88
+ - name : build-linux+drive-examples
89
+ env :
90
+ matrix :
91
+ CHANNEL : " master"
92
+ CHANNEL : " stable"
93
+ build_script :
94
+ - flutter config --enable-linux-desktop
95
+ - ./script/incremental_build.sh build-examples --linux
96
+ - xvfb-run ./script/incremental_build.sh drive-examples --linux
92
97
93
98
# Legacy Dockerfile configuration for web integration tests.
94
99
# https://github.com/flutter/web_installers doesn't yet support the current
@@ -97,20 +102,9 @@ task:
97
102
# tasks" block above once web_installers has been updated to support Chrome 89
98
103
# (which is what the current image generated from .ci/Dockerfile has).
99
104
task :
100
- # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
101
- only_if : $CIRRUS_TAG == ''
102
- use_compute_credits : $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
105
+ << : *ROOT_TASK_TEMPLATE
103
106
container :
104
107
dockerfile : .ci/Dockerfile-LegacyChrome
105
- env :
106
- INTEGRATION_TEST_PATH : " ./packages/integration_test"
107
- upgrade_script :
108
- - flutter channel stable
109
- - flutter upgrade
110
- - flutter channel master
111
- - flutter upgrade
112
- - flutter config --enable-linux-desktop
113
- - git fetch origin master
114
108
matrix :
115
109
- name : integration_web_smoke_test
116
110
env :
@@ -120,7 +114,6 @@ task:
120
114
# Tests integration example test in web.
121
115
only_if : " changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''"
122
116
install_script :
123
- - flutter channel $CHANNEL
124
117
- git clone https://github.com/flutter/web_installers.git
125
118
- cd web_installers/packages/web_drivers/
126
119
- pub get
@@ -130,26 +123,15 @@ task:
130
123
- cd $INTEGRATION_TEST_PATH/example/
131
124
- flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome
132
125
133
- # Heavy-workload tasks.
126
+ # Heavy-workload Linux tasks.
134
127
# These use machines with more CPUs and memory, so will reduce parallelization
135
128
# for non-credit runs.
136
129
task :
137
- # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
138
- only_if : $CIRRUS_TAG == ''
139
- use_compute_credits : $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
130
+ << : *ROOT_TASK_TEMPLATE
140
131
container :
141
132
dockerfile : .ci/Dockerfile
142
- cpu : 8
143
- memory : 16G
144
- env :
145
- INTEGRATION_TEST_PATH : " ./packages/integration_test"
146
- upgrade_script :
147
- - flutter channel stable
148
- - flutter upgrade
149
- - flutter channel master
150
- - flutter upgrade
151
- - flutter config --enable-linux-desktop
152
- - git fetch origin master
133
+ cpu : 4
134
+ memory : 12G
153
135
matrix :
154
136
# ## Android tasks ###
155
137
- name : build-apks+java-test+firebase-test-lab
@@ -165,7 +147,6 @@ task:
165
147
MAPS_API_KEY : ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
166
148
GCLOUD_FIREBASE_TESTLAB_KEY : ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4]
167
149
script :
168
- - flutter channel $CHANNEL
169
150
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
170
151
# might include non-ASCII characters which makes Gradle crash.
171
152
# See: https://github.com/flutter/flutter/issues/24935
@@ -186,35 +167,16 @@ task:
186
167
- fi
187
168
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
188
169
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
189
- # ## Linux desktop tasks ###
190
- - name : build-linux+drive-examples
191
- env :
192
- matrix :
193
- CHANNEL : " master"
194
- CHANNEL : " stable"
195
- build_script :
196
- - flutter channel $CHANNEL
197
- - ./script/incremental_build.sh build-examples --linux
198
- - xvfb-run ./script/incremental_build.sh drive-examples --linux
199
170
171
+ # macOS tasks.
200
172
task :
201
- # Xcode 12 task
202
- # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
203
- only_if : $CIRRUS_TAG == ''
204
- use_compute_credits : $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
173
+ << : *ROOT_TASK_TEMPLATE
174
+ # Only one macOS task can run in parallel without credits, so use them for
175
+ # PRs on macOS.
176
+ use_compute_credits : $CIRRUS_USER_COLLABORATOR == 'true'
205
177
osx_instance :
206
178
image : big-sur-xcode-12.3
207
- upgrade_script :
208
- - sudo gem install cocoapods
209
- - flutter channel stable
210
- - flutter upgrade
211
- - flutter channel master
212
- - flutter upgrade
213
- - flutter config --enable-macos-desktop
214
- - git fetch origin master
215
- create_simulator_script :
216
- - xcrun simctl list
217
- - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
179
+ cocoapod_install_script : sudo gem install cocoapods
218
180
matrix :
219
181
# ## Platform-agnostic tasks ###
220
182
- name : lint_darwin_plugins
@@ -225,8 +187,6 @@ task:
225
187
script :
226
188
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
227
189
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
228
- # Skip the dummy podspecs used to placate the tool.
229
- - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm
230
190
- ./script/incremental_build.sh podspecs
231
191
# ## iOS tasks ###
232
192
- name : build_all_plugins_ipa
@@ -235,7 +195,6 @@ task:
235
195
CHANNEL : " master"
236
196
CHANNEL : " stable"
237
197
script :
238
- - flutter channel $CHANNEL
239
198
- ./script/build_all_plugins_app.sh ios --no-codesign
240
199
- name : build-ipas+drive-examples
241
200
env :
@@ -250,8 +209,10 @@ task:
250
209
CHANNEL : " master"
251
210
CHANNEL : " stable"
252
211
SIMCTL_CHILD_MAPS_API_KEY : ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
212
+ create_simulator_script :
213
+ - xcrun simctl list
214
+ - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
253
215
build_script :
254
- - flutter channel $CHANNEL
255
216
- ./script/incremental_build.sh build-examples --ipa
256
217
- ./script/incremental_build.sh xctest --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
257
218
# `drive-examples` contains integration tests, which changes the UI of the application.
@@ -265,7 +226,7 @@ task:
265
226
CHANNEL : " master"
266
227
CHANNEL : " stable"
267
228
script :
268
- - flutter channel $CHANNEL
229
+ - flutter config --enable-macos-desktop
269
230
- ./script/build_all_plugins_app.sh macos
270
231
- name : build-macos+drive-examples
271
232
env :
@@ -274,6 +235,6 @@ task:
274
235
CHANNEL : " stable"
275
236
PATH : $PATH:/usr/local/bin
276
237
build_script :
277
- - flutter channel $CHANNEL
238
+ - flutter config --enable-macos-desktop
278
239
- ./script/incremental_build.sh build-examples --macos --no-ipa
279
240
- ./script/incremental_build.sh drive-examples --macos
0 commit comments