forked from flutter/assets-for-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
58 lines (53 loc) · 2.24 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
gcp_credentials: ENCRYPTED[!3a93d98d7c95a41f5033834ef30e50928fc5d81239dc632b153c2628200a8187f3811cb01ce338b1ab3b6505a7a65c37!]
env:
CHANNEL: "dev" # Default to dev when not explicitly set by a task.
tool_setup_template: &TOOL_SETUP_TEMPLATE
tool_setup_script:
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
# Pinned version of the plugin tools, to avoid breakage in this repository
# when pushing updates from flutter/plugins.
- dart pub global activate flutter_plugin_tools 0.5.0
flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
upgrade_flutter_script:
# Ensure that the repository has all the branches.
- cd $FLUTTER_HOME
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch origin
# Fetch requested channel
- git fetch origin $CHANNEL
# Switch to the requested branch (and since dev is a local dir, use -- to
# force git to pick the branch)
- git checkout $CHANNEL --
# Reset to upstream branch, rather than using pull, since the base image
# can sometimes be in a state where it has diverged from upstream (!).
- git reset --hard @{u}
# Run doctor to allow auditing of what version of Flutter the run is using.
- flutter doctor -v
<< : *TOOL_SETUP_TEMPLATE
task:
gke_container:
dockerfile: .ci/Dockerfile
builder_image_name: docker-builder # gce vm image
builder_image_project: flutter-cirrus
cluster_name: test-cluster
zone: us-central1-a
namespace: default
cpu: 4
memory: 8G
<< : *FLUTTER_UPGRADE_TEMPLATE
matrix:
- name: analyze+format
always:
format_script: ./ci/tool_runner format --fail-on-change --clang-format=clang-format-12
license_script: dart pub global run flutter_plugin_tools license-check
analyze_script: ./ci/tool_runner analyze --custom-analysis=web_benchmarks/testing/test_app,flutter_lints/example
pubspec_script: ./ci/tool_runner pubspec-check
- name: publishable
version_script: ./ci/tool_runner version-check
publishable_script: ./ci/tool_runner publish-check --allow-pre-release
depends_on:
- analyze+format
- name: tests
script: ./ci/tool_runner test
depends_on:
- analyze+format