forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
110 lines (102 loc) · 4.43 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
gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def3cf0d380830f06687a89ea69c87344c5ade369700fe]
task:
gke_container:
image: gcr.io/flutter-cirrus/build-engine-image:latest
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_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"
depot_tools_script:
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
gclient_sync_script: |
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" : False, "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_test_host
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized
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
framework_test_script: |
cd $FRAMEWORK_PATH/flutter/packages/flutter
../../bin/flutter test --local-engine=host_debug_unopt
- name: build_and_test_host_profile
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --runtime-mode profile --no-lto
ninja -C out/host_profile
test_host_script: cd $ENGINE_PATH/src && ./flutter/testing/run_tests.sh host_profile
- name: build_and_test_host_release
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --runtime-mode release --no-lto
ninja -C out/host_release
test_host_script: cd $ENGINE_PATH/src && ./flutter/testing/run_tests.sh host_release
- name: build_android
get_android_sdk_script: |
echo 'solutions = [{"managed": False,"name": "src/flutter","url": "[email protected]:flutter/engine.git","deps_file": "DEPS", "custom_vars": {"download_windows_deps" : False,},},]' > $ENGINE_PATH/.gclient
cd $ENGINE_PATH/src
gclient sync
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
- 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
task:
gce_instance:
image_project: flutter-cirrus
image_name: flutter-engine-windows-server-2016-core
zone: us-central1-a
platform: windows
cpu: 32
memory: 32Gb
disk: 50
env:
# Cirrus is somehow not picking up the environment variables set in the VM image.
PATH: "c:/depot_tools;c:/MinGit/cmd;$PATH"
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
GYP_MSVS_OVERRIDE_PATH: "c:/Program Files (x86)/Microsoft Visual Studio/2017/Community"
ENGINE_PATH: "c:/flutter/engine"
# robocopy can return 1 for successful copy; suppress its error code.
# move somehow doesn't work as it complains that the file is being used by another process.
gclient_sync_script: |
robocopy %CIRRUS_WORKING_DIR% %ENGINE_PATH%/src/flutter /MIR || (cmd /s /c exit /b 0)
cd %ENGINE_PATH%/src
gclient sync
matrix:
- name: build_windows_debug
compile_host_script: |
cd %ENGINE_PATH%/src
python flutter/tools/gn --runtime-mode debug --unoptimized
ninja -C out/host_debug_unopt
- name: build_windows_debug_unopt
compile_host_script: |
cd %ENGINE_PATH%/src
python flutter/tools/gn --runtime-mode debug
ninja -C out/host_debug