-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy path.taskcluster.yml
More file actions
117 lines (117 loc) · 4.06 KB
/
.taskcluster.yml
File metadata and controls
117 lines (117 loc) · 4.06 KB
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
version: 1
tasks:
$if: 'tasks_for == "github-push"'
then:
$let:
e:
repo_name: ${event.repository.name}
repo_url: ${event.repository.html_url}
base_repo_url: ${event.repository.html_url}
login: ${event.pusher.name}
commit: ${event.after}
branch:
$if: 'event.ref[:11] == "refs/heads/"'
then: ${event.ref[11:]}
base_repo_name: ${event.repository.name}
base_login: ${event.repository.owner.name}
decision_id:
$if: 'event.ref[:10] == "refs/tags/"'
then: ${event.ref[10:]}
else: ${event.after}
taskGroupId: {$eval: as_slugid("decision")}
in:
$flatten:
- taskId: ${taskGroupId}
taskGroupId: ${taskGroupId}
schedulerId: taskcluster-github
provisionerId: proj-git-cinnabar
workerType: linux
retries: 5
scopes:
- secrets:get:project/git-cinnabar/gha
payload:
maxRunTime: 3600
features:
taskclusterProxy: true
env:
TC_DATA: {$json: {$eval: e}}
command:
- - sh
- '-c'
- >-
git clone -n ${e.base_repo_url} repo &&
git -C repo remote add head ${e.repo_url} &&
git -C repo remote update head &&
git -c advice.detachedHead=false -C repo checkout ${e.commit} &&
python3 repo/CI/wait.py
artifacts:
- name: public/run_id
path: run_id
type: file
created: {$fromNow: ''}
deadline: {$fromNow: '2 hours'}
expires: {$fromNow: '24 hours'}
metadata:
name: wait
description: wait for GHA completion
owner: ${e.login}@users.noreply.github.com
source: ${e.repo_url}
- $map:
- linux.arm64
- linux.x86_64
- linux.x86_64.asan
- linux.x86_64.coverage
- macos.arm64
- macos.x86_64
- windows.x86_64
each(variant):
taskId: {$eval: as_slugid(variant)}
taskGroupId: ${taskGroupId}
schedulerId: taskcluster-github
provisionerId: proj-git-cinnabar
workerType: linux
retries: 5
scopes:
- secrets:get:project/git-cinnabar/gha
routes:
- index.project.git-cinnabar.build.${e.commit}.${variant}
payload:
maxRunTime: 3600
features:
taskclusterProxy: true
mounts:
- file: run_id
content:
taskId: ${taskGroupId}
artifact: public/run_id
env:
TC_DATA: {$json: {$eval: e}}
command:
- - sh
- '-c'
- >-
git clone -n ${e.base_repo_url} repo &&
git -C repo remote add head ${e.repo_url} &&
git -C repo remote update head &&
git -c advice.detachedHead=false -C repo checkout ${e.commit} &&
python3 repo/CI/get_artifact.py --run-id $(cat run_id) index.project.git-cinnabar.build.${variant}.${e.commit}
artifacts:
$if: '"windows" in variant'
then:
- name: public/git-cinnabar.exe
path: artifacts/git-cinnabar.exe
type: file
else:
- name: public/git-cinnabar
path: artifacts/git-cinnabar
type: file
created: {$fromNow: ''}
deadline: {$fromNow: '2 hours'}
expires: {$fromNow: '26 weeks'}
metadata:
name: build ${variant}
description: build ${variant}
owner: ${e.login}@users.noreply.github.com
source: ${e.repo_url}
dependencies:
- ${taskGroupId}