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

Commit 9b670a5

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents f118837 + 0892a2d commit 9b670a5

File tree

1,613 files changed

+14743
-6854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,613 files changed

+14743
-6854
lines changed

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN sudo apt-get install -y xvfb libegl1-mesa
3131
# Install Linux desktop build tool requirements.
3232
RUN sudo apt-get install -y clang cmake ninja-build file pkg-config
3333
# Install necessary libraries.
34-
RUN sudo apt-get install -y libgtk-3-dev libblkid-dev liblzma-dev
34+
RUN sudo apt-get install -y libgtk-3-dev libblkid-dev liblzma-dev libgcrypt20-dev
3535

3636
# Add repo for Google Chrome and install it
3737
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

.ci/Dockerfile-LegacyChrome

Lines changed: 0 additions & 29 deletions
This file was deleted.

.cirrus.yml

Lines changed: 101 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,78 @@
1-
# Light-workload tasks.
1+
gcp_credentials: ENCRYPTED[ec898795b6f1b54f9cc2ab4104909f1053651f65fcab96397cfdc33dae6df5fd0fa972e29ba19f4f95125de844ab1641]
2+
3+
# Don't run on release tags since it creates O(n^2) tasks where n is the
4+
# number of plugins
5+
only_if: $CIRRUS_TAG == ''
6+
env:
7+
INTEGRATION_TEST_PATH: "./packages/integration_test"
8+
CHANNEL: "master" # Default to master when not explicitly set by a task.
9+
PLUGIN_TOOLS: "dart run ./script/tool/lib/src/main.dart"
10+
11+
tool_setup_template: &TOOL_SETUP_TEMPLATE
12+
tool_setup_script:
13+
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
14+
- cd script/tool
15+
- pub get
16+
17+
flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
18+
upgrade_flutter_script:
19+
- flutter channel $CHANNEL
20+
- flutter upgrade
21+
<< : *TOOL_SETUP_TEMPLATE
22+
23+
macos_template: &MACOS_TEMPLATE
24+
# Only one macOS task can run in parallel without credits, so use them for
25+
# PRs on macOS.
26+
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
27+
osx_instance:
28+
image: big-sur-xcode-12.3
29+
cocoapod_install_script: sudo gem install cocoapods
30+
31+
# Light-workload Linux tasks.
232
# These use default machines, with fewer CPUs, to reduce pressure on the
333
# concurrency limits.
434
task:
5-
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
6-
only_if: $CIRRUS_TAG == ''
7-
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
8-
container:
35+
<< : *FLUTTER_UPGRADE_TEMPLATE
36+
gke_container:
937
dockerfile: .ci/Dockerfile
10-
env:
11-
INTEGRATION_TEST_PATH: "./packages/integration_test"
12-
upgrade_script:
13-
- flutter channel stable
14-
- flutter upgrade
15-
- flutter channel master
16-
- flutter upgrade
17-
- flutter config --enable-linux-desktop
18-
- git fetch origin master
38+
builder_image_name: docker-builder # gce vm image
39+
builder_image_project: flutter-cirrus
40+
cluster_name: test-cluster
41+
zone: us-central1-a
42+
namespace: default
1943
matrix:
2044
### Platform-agnostic tasks ###
2145
- name: plugin_tools_tests
2246
script:
2347
- cd script/tool
24-
- pub get
2548
- CIRRUS_BUILD_ID=null pub run test
2649
- name: publishable
2750
script:
28-
- flutter channel master
51+
- if [[ "$CIRRUS_BRANCH" == "master" ]]; then
52+
- $PLUGIN_TOOLS version-check
53+
- else
54+
- $PLUGIN_TOOLS version-check --run-on-changed-packages
55+
- fi
2956
- ./script/check_publish.sh
3057
- name: format
3158
format_script: ./script/incremental_build.sh format --fail-on-change
59+
license_script:
60+
- cd script/tool
61+
- pub get
62+
- cd ../..
63+
- dart script/tool/lib/src/main.dart license-check
3264
- name: test
3365
env:
3466
matrix:
3567
CHANNEL: "master"
3668
CHANNEL: "stable"
3769
test_script:
38-
- flutter channel $CHANNEL
3970
- ./script/incremental_build.sh test
4071
- name: analyze_master
4172
env:
4273
matrix:
4374
CHANNEL: "master"
4475
script:
45-
- flutter channel $CHANNEL
4676
- ./script/incremental_build.sh analyze
4777
## TODO(cyanglaz):
4878
## Combing stable and master analyze jobs when integration test null safety is ready on flutter stable.
@@ -51,7 +81,6 @@ task:
5181
matrix:
5282
CHANNEL: "stable"
5383
script:
54-
- flutter channel $CHANNEL
5584
- find . -depth -type d -wholename '*_web/example' -exec rm -rf {} \;
5685
- ./script/incremental_build.sh analyze
5786
### Android tasks ###
@@ -61,7 +90,6 @@ task:
6190
CHANNEL: "master"
6291
CHANNEL: "stable"
6392
script:
64-
- flutter channel $CHANNEL
6593
- ./script/build_all_plugins_app.sh apk
6694
### Web tasks ###
6795
- name: build_all_plugins_web
@@ -70,86 +98,41 @@ task:
7098
CHANNEL: "master"
7199
CHANNEL: "stable"
72100
script:
73-
- flutter channel $CHANNEL
74101
- ./script/build_all_plugins_app.sh web
75-
- name: build-web-examples
76-
env:
77-
matrix:
78-
CHANNEL: "master"
79-
build_script:
80-
- flutter channel $CHANNEL
81-
- ./script/incremental_build.sh build-examples --web
82-
# TODO: Add driving examples (and move to heavy-workload group).
83102
### Linux desktop tasks ###
84103
- name: build_all_plugins_linux
85104
env:
86105
matrix:
87106
CHANNEL: "master"
88107
CHANNEL: "stable"
89108
script:
90-
- flutter channel $CHANNEL
109+
- flutter config --enable-linux-desktop
91110
- ./script/build_all_plugins_app.sh linux
92-
93-
# Legacy Dockerfile configuration for web integration tests.
94-
# https://github.com/flutter/web_installers doesn't yet support the current
95-
# stable version of Chrome, so newly-generated Docker images don't work.
96-
# TODO: Merge this task into the "Web tasks" section of the "Light-workload
97-
# tasks" block above once web_installers has been updated to support Chrome 89
98-
# (which is what the current image generated from .ci/Dockerfile has).
99-
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 == ''
103-
container:
104-
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-
matrix:
115-
- name: integration_web_smoke_test
111+
- name: build-linux+drive-examples
116112
env:
117113
matrix:
118114
CHANNEL: "master"
119115
CHANNEL: "stable"
120-
# Tests integration example test in web.
121-
only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''"
122-
install_script:
123-
- flutter channel $CHANNEL
124-
- git clone https://github.com/flutter/web_installers.git
125-
- cd web_installers/packages/web_drivers/
126-
- pub get
127-
- dart lib/web_driver_installer.dart chromedriver --install-only
128-
- ./chromedriver/chromedriver --port=4444 &
116+
build_script:
117+
- flutter config --enable-linux-desktop
118+
- ./script/incremental_build.sh build-examples --linux
129119
test_script:
130-
- cd $INTEGRATION_TEST_PATH/example/
131-
- flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome
120+
- xvfb-run ./script/incremental_build.sh drive-examples --linux
132121

133-
# Heavy-workload tasks.
122+
# Heavy-workload Linux tasks.
134123
# These use machines with more CPUs and memory, so will reduce parallelization
135124
# for non-credit runs.
136125
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 == ''
140-
container:
126+
<< : *FLUTTER_UPGRADE_TEMPLATE
127+
gke_container:
141128
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
129+
builder_image_name: docker-builder # gce vm image
130+
builder_image_project: flutter-cirrus
131+
cluster_name: test-cluster
132+
zone: us-central1-a
133+
namespace: default
134+
cpu: 4
135+
memory: 12G
153136
matrix:
154137
### Android tasks ###
155138
- name: build-apks+java-test+firebase-test-lab
@@ -165,7 +148,6 @@ task:
165148
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
166149
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4]
167150
script:
168-
- flutter channel $CHANNEL
169151
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
170152
# might include non-ASCII characters which makes Gradle crash.
171153
# See: https://github.com/flutter/flutter/issues/24935
@@ -186,56 +168,40 @@ task:
186168
- fi
187169
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
188170
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
189-
### Linux desktop tasks ###
190-
- name: build-linux+drive-examples
171+
### Web tasks ###
172+
- name: build-web+drive-examples
191173
env:
192174
matrix:
193175
CHANNEL: "master"
194176
CHANNEL: "stable"
177+
install_script:
178+
- git clone https://github.com/flutter/web_installers.git
179+
- cd web_installers/packages/web_drivers/
180+
- pub get
181+
- dart lib/web_driver_installer.dart chromedriver --install-only
182+
- ./chromedriver/chromedriver --port=4444 &
195183
build_script:
196-
- flutter channel $CHANNEL
197-
- ./script/incremental_build.sh build-examples --linux
198-
- xvfb-run ./script/incremental_build.sh drive-examples --linux
184+
- ./script/incremental_build.sh build-examples --web
185+
test_script:
186+
# TODO(stuartmorgan): Eliminate this check once 2.1 reaches stable.
187+
- if [[ "$CHANNEL" == "master" ]]; then
188+
- ./script/incremental_build.sh drive-examples --web
189+
- else
190+
- echo "Requires null-safe integration_test; skipping."
191+
- fi
199192

193+
# macOS tasks.
200194
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 == ''
205-
osx_instance:
206-
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
195+
<< : *MACOS_TEMPLATE
196+
<< : *FLUTTER_UPGRADE_TEMPLATE
218197
matrix:
219-
### Platform-agnostic tasks ###
220-
- name: lint_darwin_plugins
221-
env:
222-
matrix:
223-
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
224-
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
225-
script:
226-
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
227-
- 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-
- ./script/incremental_build.sh podspecs
231198
### iOS tasks ###
232199
- name: build_all_plugins_ipa
233200
env:
234201
matrix:
235202
CHANNEL: "master"
236203
CHANNEL: "stable"
237204
script:
238-
- flutter channel $CHANNEL
239205
- ./script/build_all_plugins_app.sh ios --no-codesign
240206
- name: build-ipas+drive-examples
241207
env:
@@ -250,9 +216,12 @@ task:
250216
CHANNEL: "master"
251217
CHANNEL: "stable"
252218
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
219+
create_simulator_script:
220+
- xcrun simctl list
221+
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
253222
build_script:
254-
- flutter channel $CHANNEL
255223
- ./script/incremental_build.sh build-examples --ipa
224+
test_script:
256225
- ./script/incremental_build.sh xctest --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
257226
# `drive-examples` contains integration tests, which changes the UI of the application.
258227
# This UI change sometimes affects `xctest`.
@@ -265,7 +234,7 @@ task:
265234
CHANNEL: "master"
266235
CHANNEL: "stable"
267236
script:
268-
- flutter channel $CHANNEL
237+
- flutter config --enable-macos-desktop
269238
- ./script/build_all_plugins_app.sh macos
270239
- name: build-macos+drive-examples
271240
env:
@@ -274,6 +243,18 @@ task:
274243
CHANNEL: "stable"
275244
PATH: $PATH:/usr/local/bin
276245
build_script:
277-
- flutter channel $CHANNEL
246+
- flutter config --enable-macos-desktop
278247
- ./script/incremental_build.sh build-examples --macos --no-ipa
248+
test_script:
279249
- ./script/incremental_build.sh drive-examples --macos
250+
251+
task:
252+
# Don't use FLUTTER_UPGRADE_TEMPLATE, Flutter tooling not needed.
253+
<< : *MACOS_TEMPLATE
254+
<< : *TOOL_SETUP_TEMPLATE
255+
matrix:
256+
- name: lint_darwin_plugins
257+
script:
258+
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
259+
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
260+
- ./script/incremental_build.sh podspecs

0 commit comments

Comments
 (0)