-
Notifications
You must be signed in to change notification settings - Fork 22
/
evergreen.yaml
324 lines (303 loc) · 8.15 KB
/
evergreen.yaml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
ignore:
- "*.md"
- "*.rst"
#######################################
# YAML Templates #
#######################################
variables:
- &run-go-test-suite
# runs a make target and then uploads gotest output to
# evergreen. The test name should correspond to a make target for
# that suite
name: test
must_have_test_results: true
commands:
- func: get-project-and-modules
- func: run-make
vars: { target: "${task_name}" }
#######################################
# Functions #
#######################################
functions:
get-project-and-modules:
- command: git.get_project
type: system
params:
directory: curator
- command: subprocess.exec
type: setup
params:
working_dir: curator
binary: make
args: ["mod-tidy"]
include_expansions_in_env: ["GOROOT"]
run-make:
command: subprocess.exec
type: test
params:
working_dir: curator
binary: make
args: ["${target}"]
include_expansions_in_env: ["GOROOT", "RACE_DETECTOR"]
env:
GOOS: ${goos}
GOARCH: ${goarch}
#######################################
# Tasks #
#######################################
tasks:
- name: build
tags: ["dist"]
commands:
- func: get-project-and-modules
- func: run-make
vars: { target: "dist" }
- command: s3.put
type: setup
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: curator/build/dist.tar.gz
remote_file: curator/${build_id}-${build_variant}/curator-dist-${revision}.tar.gz
bucket: mciuploads
content_type: application/x-gzip
permissions: public-read
display_name: dist.tar.gz
- <<: *run-go-test-suite
tags: ["report"]
name: lint-curator
- <<: *run-go-test-suite
tags: ["report"]
name: lint-barquesubmit
- <<: *run-go-test-suite
tags: ["report"]
name: lint-greenbay
- <<: *run-go-test-suite
tags: ["report"]
name: lint-greenbay-check
- <<: *run-go-test-suite
tags: ["report"]
name: lint-operations
- <<: *run-go-test-suite
tags: ["report"]
name: lint-repobuilder
- name: verify-mod-tidy
tags: ["report"]
commands:
- command: git.get_project
type: system
params:
directory: curator
- func: run-make
vars: { target: "${task_name}" }
- <<: *run-go-test-suite
tags: ["report"]
name: html-coverage
# define tasks for all test suites (modules)
- <<: *run-go-test-suite
tags: ["test"]
name: test-greenbay
- <<: *run-go-test-suite
tags: ["test"]
name: test-greenbay-check
- <<: *run-go-test-suite
tags: ["test"]
name: test-operations
- <<: *run-go-test-suite
tags: ["test"]
name: test-repobuilder
- name: push
patchable: false
stepback: false
depends_on:
- name: "*"
commands:
- command: s3Copy.copy
type: test
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
s3_copy_files:
- {'source': { 'path': 'curator/${build_id}-${build_variant}/curator-dist-${revision}.tar.gz', 'bucket': 'mciuploads' },
'destination': { 'path': 'build/curator/curator-dist-${build_variant}-${revision}.tar.gz', 'bucket': 'boxes.10gen.com' } }
- {'source': { 'path': 'curator/${build_id}-${build_variant}/curator-dist-${revision}.tar.gz', 'bucket': 'mciuploads' },
'destination': { 'path': 'build/curator/curator-dist-${build_variant}-latest.tar.gz', 'bucket': 'boxes.10gen.com' } }
- {'source': { 'path': 'curator/${build_id}-${build_variant}/curator-dist-${revision}.tar.gz', 'bucket': 'mciuploads' },
'destination': { 'path': 'build/curator/curator-dist-${goos}-${goarch}-${revision}.tar.gz', 'bucket': 'boxes.10gen.com' } }
- {'source': { 'path': 'curator/${build_id}-${build_variant}/curator-dist-${revision}.tar.gz', 'bucket': 'mciuploads' },
'destination': { 'path': 'build/curator/curator-dist-${goos}-${goarch}-latest.tar.gz', 'bucket': 'boxes.10gen.com' } }
post:
- command: gotest.parse_files
type: setup
params:
files:
- "curator/build/output.*"
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter: ["curator/build/output.*.coverage.html"]
remote_file: curator/${task_id}/
bucket: mciuploads
content_type: text/html
permissions: public-read
display_name: "(html) coverage:"
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter: ["curator/build/output.*.coverage"]
remote_file: curator/${task_id}/
bucket: mciuploads
content_type: text/plain
permissions: public-read
display_name: "(txt) coverage:"
#######################################
# Buildvariants #
#######################################
buildvariants:
- name: lint
display_name: Lint
expansions:
GOROOT: /opt/golang/go1.20
run_on:
- ubuntu2204-small
tasks:
- name: ".report"
- name: rhel70
display_name: RHEL 7.0
expansions:
GOROOT: /opt/golang/go1.20
goarch: amd64
goos: linux
run_on:
- rhel70-small
- rhel70
tasks:
- ".dist"
- ".test"
- name: "push"
- name: ubuntu
display_name: Ubuntu 22.04
run_on:
- ubuntu2204-small
expansions:
GOROOT: /opt/golang/go1.20
RACE_DETECTOR: true
goarch: amd64
goos: linux
tasks:
- ".dist"
- ".test"
- name: "push"
- name: macos
display_name: macOS 11.00
expansions:
GOROOT: /opt/golang/go1.20
goarch: amd64
goos: darwin
run_on:
- macos-1100
tasks:
- ".dist"
- ".test"
- name: "push"
- name: macos-arm64
display_name: macOS 11.00 ARM64
expansions:
GOROOT: /opt/golang/go1.20
goarch: arm64
goos: darwin
run_on:
- macos-1100-arm64
tasks:
- ".dist"
- ".test"
- name: "push"
# the following targets *just* cross compile the binary for different architectures.
- name: s390x
display_name: "zLinux (cross-compile)"
expansions:
GOROOT: /opt/golang/go1.20
goarch: s390x
goos: linux
run_on:
- ubuntu2204-small
tasks:
- name: ".dist"
depends_on:
- name: ".test"
variant: "rhel70"
- name: "push"
- name: power
display_name: "Linux POWER (cross-compile)"
expansions:
GOROOT: /opt/golang/go1.20
goarch: ppc64le
goos: linux
run_on:
- ubuntu2204-small
tasks:
- name: ".dist"
depends_on:
- name: ".test"
variant: "rhel70"
- name: "push"
- name: arm
display_name: "Linux ARM64 (cross-compile)"
expansions:
GOROOT: /opt/golang/go1.20
goarch: arm64
goos: linux
run_on:
- ubuntu2204-small
tasks:
- name: ".dist"
depends_on:
- name: ".test"
variant: "rhel70"
- name: "push"
- name: linux-32
display_name: "Linux 32-bit (cross-compile)"
expansions:
GOROOT: /opt/golang/go1.20
goarch: 386
goos: linux
run_on:
- ubuntu2204-small
tasks:
- name: ".dist"
depends_on:
- name: ".test"
variant: "rhel70"
- name: "push"
- name: windows-64
display_name: "Windows 64-bit (cross-compile)"
expansions:
GOROOT: /opt/golang/go1.20
goarch: amd64
goos: windows
run_on:
- ubuntu2204-small
tasks:
- name: ".dist"
depends_on:
- name: ".test"
variant: "rhel70"
- name: "push"
- name: windows-32
display_name: "Windows 32-bit (cross-compile)"
expansions:
GOROOT: /opt/golang/go1.20
goarch: 386
goos: windows
run_on:
- ubuntu2204-small
tasks:
- name: ".dist"
depends_on:
- name: ".test"
variant: "rhel70"
- name: "push"