forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
214 lines (200 loc) · 9.84 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def3cf0d380830f06687a89ea69c87344c5ade369700fe]
web_shard_template: &WEB_SHARD_TEMPLATE
only_if: "changesInclude('.cirrus.yml', 'DEPS', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''"
environment:
# As of March 2020, the Web shards needed 16G of RAM and 4 CPUs to run all framework tests with goldens without flaking.
CPU: 4
MEMORY: 16G
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
fetch_framework_script: |
cd $ENGINE_PATH/src/flutter/tools
./clone_flutter.sh
cd $FRAMEWORK_PATH/flutter
bin/flutter update-packages --local-engine=host_debug_unopt
script:
- dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt
# LINUX
task:
gke_container:
dockerfile: "ci/docker/build/Dockerfile"
builder_image_name: docker-builder # gce vm image
cluster_name: build-32-cluster
zone: us-central1-a
namespace: default
cpu: 30 # can't use all 30-cores; system pods needs cores too
memory: 100Gb # similarly, can't use all 100Gb memory
env:
CIRRUS_DOCKER_CONTEXT: "ci/docker/build"
CIRRUS_WORKING_DIR: "/tmp/github_repo"
ENGINE_PATH: "/tmp/clean_engine"
DEPOT_TOOLS: "/tmp/depot_tools"
FLUTTER_ENGINE: "/tmp/clean_engine/src"
FRAMEWORK_PATH: "/tmp/master_framework"
PATH: "$FLUTTER_ENGINE/third_party/dart/tools/sdks/dart-sdk/bin:$DEPOT_TOOLS:$PATH"
USE_ANDROID: "False"
# TODO(liyuqian): currently we're using flutter-cirrus GCP project. Migrate
# to flutter-infra project once the metrics_center service is stabilized,
BENCHMARK_GCP_CREDENTIALS: ENCRYPTED[da76d2b7b39894de70fae1fc9182c97cc41400adc93f0f1c49bc7442f15fb933da8d756ed88523810a9a77c34f51a693]
setup_script: |
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
mkdir -p $ENGINE_PATH/src
echo 'solutions = [{"managed": False,"name": "src/flutter","url": "[email protected]:flutter/engine.git","deps_file": "DEPS", "custom_vars": {"download_android_deps" : ' $USE_ANDROID ', "download_windows_deps" : False,},},]' > $ENGINE_PATH/.gclient
cd $ENGINE_PATH/src
rm -rf flutter
rm -rf out
mv $CIRRUS_WORKING_DIR flutter
gclient sync
matrix:
- name: build_and_benchmark_linux_release
only_if: $CIRRUS_BRANCH == 'master' # Only run for post-submit commits.
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --runtime-mode=release
ninja -C out/host_release
benchmark_host_script: |
cd $ENGINE_PATH/src/out/host_release/
./txt_benchmarks --benchmark_format=json > txt_benchmarks.json
./fml_benchmarks --benchmark_format=json > fml_benchmarks.json
./shell_benchmarks --benchmark_format=json > shell_benchmarks.json
cd $ENGINE_PATH/src/flutter/testing/benchmark
pub get
dart bin/parse_and_send.dart ../../../out/host_release/txt_benchmarks.json
dart bin/parse_and_send.dart ../../../out/host_release/fml_benchmarks.json
dart bin/parse_and_send.dart ../../../out/host_release/shell_benchmarks.json
- name: build_and_test_linux_release
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --runtime-mode=release
ninja -C out/host_release
test_host_script: |
cd $ENGINE_PATH/src
./flutter/testing/run_tests.sh host_release
# The following test depends on Flutter framework repo. It may fail if the
# framework repo is currently broken.
- name: build_and_test_linux_unopt_debug
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
test_host_script: |
cd $ENGINE_PATH/src
./flutter/testing/run_tests.sh host_debug_unopt
test_web_engine_script: |
cd $ENGINE_PATH/src/flutter/web_sdk/web_engine_tester
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
cd $ENGINE_PATH/src/flutter/lib/web_ui
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
export FELT="$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dart dev/felt.dart"
$FELT check-licenses
CHROME_NO_SANDBOX=true $FELT test
always:
web_engine_test_artifacts:
path: test_results/*
fetch_framework_script: |
mkdir -p $FRAMEWORK_PATH
cd $FRAMEWORK_PATH
git clone https://github.com/flutter/flutter.git
test_web_script: |
cd $FRAMEWORK_PATH/flutter/dev/integration_tests/web
../../../bin/flutter config --local-engine=host_debug_unopt --no-analytics --enable-web
../../../bin/flutter --local-engine=host_debug_unopt build web -v
analyze_framework_script: |
cd $FRAMEWORK_PATH/flutter
rm -rf bin/cache/pkg/sky_engine
cp -r $ENGINE_PATH/src/out/host_debug_unopt/gen/dart-pkg/sky_engine bin/cache/pkg/
bin/flutter update-packages --local-engine=host_debug_unopt
bin/flutter analyze --dartdocs --flutter-repo --local-engine=host_debug_unopt
test_framework_script: |
cd $FRAMEWORK_PATH/flutter/packages/flutter
../../bin/flutter test --local-engine=host_debug_unopt
# PLEASE KEEP THESE WEB TEST SHARDS IN SYNC WITH THEIR COUNTERPARTS IN flutter/flutter's CIRRUS CONFIG.
- name: web_tests-0-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-1-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-2-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-3-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-4-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-5-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-6-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-7_last-linux # last Web shard must end with _last
<< : *WEB_SHARD_TEMPLATE
- name: web_engine_analysis
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
script:
- cd $ENGINE_PATH/src/flutter/lib/web_ui
- $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
- $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dartanalyzer --fatal-warnings --fatal-hints dev/ lib/ test/ tool/
- name: web_engine_integration_test_linux
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
fetch_framework_script: |
cd $ENGINE_PATH/src/flutter/tools
./clone_flutter.sh
cd $FRAMEWORK_PATH/flutter
bin/flutter update-packages --local-engine=host_debug_unopt
script:
- git clone https://github.com/flutter/web_installers.git
- cd web_installers/packages/web_drivers/
- $ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/pub get
- $ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/dart lib/web_driver_installer.dart chromedriver --install-only
- ./chromedriver/chromedriver --port=4444 &
- cd $ENGINE_PATH/src/flutter/e2etests/web/regular_integration_tests
- $FRAMEWORK_PATH/flutter/bin/flutter config --local-engine=host_debug_unopt --no-analytics --enable-web
- $FRAMEWORK_PATH/flutter/bin/flutter pub get --local-engine=host_debug_unopt
- $FRAMEWORK_PATH/flutter/bin/flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt
- $FRAMEWORK_PATH/flutter/bin/flutter drive -v --target=test_driver/platform_messages_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt
- $FRAMEWORK_PATH/flutter/bin/flutter drive -v --target=test_driver/treeshaking_e2e.dart -d web-server --profile --browser-name=chrome --local-engine=host_debug_unopt
- $FRAMEWORK_PATH/flutter/bin/flutter drive -v --target=test_driver/image_loading_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt
- name: build_and_test_web_linux_firefox
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
test_web_engine_firefox_script: |
cd $ENGINE_PATH/src/flutter/web_sdk/web_engine_tester
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
cd $ENGINE_PATH/src/flutter/lib/web_ui
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
export FELT="$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dart dev/felt.dart"
$FELT test --browser=firefox
- name: build_and_test_android_unopt_debug
env:
USE_ANDROID: "True"
ANDROID_HOME: $ENGINE_PATH/src/third_party/android_tools/sdk
lint_host_script: |
cd $ENGINE_PATH/src/flutter/tools/android_lint
$ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/pub get
$ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/dart bin/main.dart
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --android --unoptimized
ninja -C out/android_debug_unopt
mkdir javadoc_tmp
./flutter/tools/gen_javadoc.py --out-dir javadoc_tmp
test_android_script: cd $ENGINE_PATH/src && python ./flutter/testing/run_tests.py --type=java
- name: format_and_dart_test
format_script: |
cd $ENGINE_PATH/src/flutter
./ci/format.sh
build_script: |
cd $ENGINE_PATH/src/flutter
./ci/build.sh
- name: build_fuchsia_artifacts
compile_fuchsia_script: |
cd $ENGINE_PATH/src
./flutter/tools/fuchsia/build_fuchsia_artifacts.py --engine-version HEAD --runtime-mode debug --no-lto --archs x64
cd $ENGINE_PATH/src/flutter