forked from mozilla/dump_syms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.taskcluster.yml
153 lines (149 loc) · 5.74 KB
/
.taskcluster.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
version: 1
policy:
pullRequests: public
tasks:
$let:
user: ${event.sender.login}
head_branch:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.ref}
else:
$if: 'tasks_for == "github-push"'
then: ${event.ref}
else: ${event.release.target_commitish}
head_rev:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.sha}
else:
$if: 'tasks_for == "github-push"'
then: ${event.after}
else: ${event.release.tag_name}
repository:
$if: 'tasks_for == "github-pull-request"'
then: ${event.pull_request.head.repo.html_url}
else: ${event.repository.html_url}
in:
$if: 'tasks_for in ["github-pull-request", "github-push"]'
then:
- taskId: {$eval: as_slugid("lint_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
provisionerId: proj-relman
workerType: ci
payload:
maxRunTime: 3600
image: "rust:bullseye"
command:
- "/bin/bash"
- "-cx"
- "rustup toolchain install stable &&
rustup default stable &&
rustup component add clippy &&
rustup component add rustfmt &&
git clone --recursive --quiet ${repository} &&
cd dump_syms &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cargo fmt -- --check &&
cargo clippy --all-features --tests --all --examples -- -D clippy::all"
metadata:
name: dump_syms lint
description: dump_syms lint
owner: cdenizet@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- taskId: {$eval: as_slugid("test_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
provisionerId: proj-relman
workerType: ci
payload:
maxRunTime: 3600
image: "rust:bullseye"
env:
CODECOV_TOKEN: 0951320b-00b4-481a-b38e-2248fe45256b
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests
command:
- "/bin/bash"
- "-cx"
- "apt-get -qq update &&
apt-get -qq install -y zip &&
rustup default nightly &&
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - &&
git clone --recursive --quiet ${repository} &&
cd dump_syms &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cargo test &&
zip -0 ccov.zip `find . -name 'dump_syms*.gc*' -print` &&
../grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore '/*' -o lcov.info &&
bash <(curl -s https://codecov.io/bash) -f lcov.info"
metadata:
name: dump_syms test
description: dump_syms test
owner: cdenizet@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
taskId: {$eval: as_slugid("build_release")}
dependencies:
- {$eval: as_slugid("lint_task")}
- {$eval: as_slugid("test_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '2 hour'}
provisionerId: proj-relman
workerType: ci
payload:
maxRunTime: 3600
image: "rust:bullseye"
env:
PROJECT_NAME: dump_syms
command:
- "/bin/bash"
- "-cx"
- "git clone --recursive --quiet ${repository} &&
cd dump_syms &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cargo build --release &&
cd target/release &&
tar -zvcf /build.tar.gz --transform 's,^,dump_syms-linux-x86_64/,' dump_syms"
artifacts:
public/dump_syms-linux-x86_64.tar.gz:
expires: {$fromNow: '2 weeks'}
path: /build.tar.gz
type: file
metadata:
name: dump_syms release build
description: dump_syms release build
owner: cdenizet@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
$let:
version: {$eval: 'head_branch[10:]'}
in:
taskId: {$eval: as_slugid("deploy_release")}
dependencies:
- {$eval: as_slugid("build_release")}
created: {$fromNow: ''}
deadline: {$fromNow: '2 hour'}
provisionerId: proj-relman
workerType: ci
scopes:
- secrets:get:project/relman/dump_syms/deploy
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
image: "mozilla/taskboot:latest"
env:
TASKCLUSTER_SECRET: project/relman/dump_syms/deploy
command:
- taskboot
- github-release
- mozilla/dump_syms
- "${version}"
- "--asset=dump_syms-linux-x86_64.tar.gz:public/dump_syms-linux-x86_64.tar.gz"
metadata:
name: "dump_syms release publication ${version}"
description: dump_syms release publication on Github
owner: cdenizet@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml