forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
133 lines (121 loc) · 5.68 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
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.
# The tests are encountering a flake in Chrome. Increasing the number of shards to decrease race conditions.
# Shard number kept at 8 for the engine since 12 shards exhausted the Cirrus limits.
# https://github.com/flutter/flutter/issues/62510
WEB_SHARD_COUNT: 8
CPU: 4
MEMORY: 16G
CHROME_NO_SANDBOX: true
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
./ui_benchmarks --benchmark_format=json > ui_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
dart bin/parse_and_send.dart ../../../out/host_release/ui_benchmarks.json
# 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
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: build_test
build_script: |
cd $ENGINE_PATH/src/flutter
./ci/build.sh