-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathevergreen.yaml
267 lines (254 loc) · 6.8 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
stepback: false
ignore:
- "*.rst"
#######################################
# YAML Templates #
#######################################
variables:
- &run-build
# runs a build operations. The task name in evergreen should
# correspond to a make target for the build operation.
name: test
must_have_test_results: true
commands:
- func: run-make
vars: { target: "${task_name}" }
#######################################
# Functions #
#######################################
functions:
get-project-and-modules:
- command: git.get_project
type: system
params:
directory: cedar
- command: subprocess.exec
type: setup
params:
working_dir: cedar
binary: make
args: ["mod-tidy"]
include_expansions_in_env: ["GOROOT"]
parse-results:
command: gotest.parse_files
type: setup
params:
files:
- "cedar/build/output.*"
run-make:
command: subprocess.exec
type: test
params:
working_dir: cedar
binary: make
args: ["${target}"]
include_expansions_in_env: ["GOROOT", "RACE_DETECTOR"]
env:
AWS_ACCESS_KEY_ID: ${aws_key}
AWS_SECRET_ACCESS_KEY: ${aws_secret}
set-up-mongodb:
- command: subprocess.exec
type: setup
params:
include_expansions_in_env: ["MONGODB_URL"]
working_dir: cedar
command: make get-mongodb
env:
MONGODB_DECOMPRESS: ${MONGODB_DECOMPRESS|*decompress}
- command: subprocess.exec
type: setup
params:
include_expansions_in_env: ["MONGOSH_URL"]
working_dir: cedar
command: make get-mongosh
env:
MONGOSH_DECOMPRESS: ${MONGOSH_DECOMPRESS|*decompress}
- command: subprocess.exec
type: setup
params:
background: true
working_dir: cedar
include_expansions_in_env: ["MONGODB_URL"]
command: make start-mongod
- command: subprocess.exec
type: setup
params:
working_dir: cedar
include_expansions_in_env: ["MONGODB_URL"]
command: make check-mongod
- command: subprocess.exec
type: setup
params:
working_dir: cedar
include_expansions_in_env: ["MONGODB_URL"]
command: make init-rs
set-up-curator:
- command: s3.get
type: setup
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
remote_file: build/curator/curator-dist-${curator_build}-${curator_release|latest}.tar.gz
extract_to: cedar/rpc/internal
bucket: boxes.10gen.com
#######################################
# Tasks #
#######################################
tasks:
- name: dist
tags: ["dist"]
commands:
- func: get-project-and-modules
- func: run-make
vars: { target: "${task_name}" }
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: cedar/build/${task_name}.tar.gz
remote_file: sink/${build_id}/cedar-${task_name}-${revision}.tar.gz
bucket: mciuploads
content_type: application/x-gzip
permissions: public-read
display_name: dist.tar.gz (standard)
- <<: *run-build
tags: ["test"]
name: test-rpc-internal
- <<: *run-build
tags: ["test"]
name: test-operations
- <<: *run-build
tags: ["test"]
name: test-model
- <<: *run-build
tags: ["test"]
name: test-rest-model
- <<: *run-build
tags: ["test"]
name: test-rest-data
- <<: *run-build
tags: ["test"]
name: test-rest
- <<: *run-build
tags: ["test"]
name: test-units
- <<: *run-build
tags: ["test"]
name: test-cedar
- <<: *run-build
tags: ["lint"]
name: lint-rpc-internal
- <<: *run-build
tags: ["lint"]
name: lint-benchmarks
- <<: *run-build
tags: ["lint"]
name: lint-rpc
- <<: *run-build
tags: ["lint"]
name: lint-operations
- <<: *run-build
tags: ["lint"]
name: lint-model
- <<: *run-build
tags: ["lint"]
name: lint-rest-model
- <<: *run-build
tags: ["lint"]
name: lint-rest-data
- <<: *run-build
tags: ["lint"]
name: lint-rest
- <<: *run-build
tags: ["lint"]
name: lint-units
- <<: *run-build
tags: ["lint"]
name: lint-cedar
- name: verify-mod-tidy
tags: ["report"]
commands:
- command: git.get_project
type: system
params:
directory: cedar
- func: run-make
vars: { target: "${task_name}" }
task_groups:
- name: lintGroup
tasks: [".lint"]
max_hosts: 2
setup_group:
- func: get-project-and-modules
setup_task:
- func: run-make
vars: { target: "clean-results" }
teardown_task:
- func: parse-results
- name: testGroup
tasks: [".test"]
max_hosts: 2
setup_group_can_fail_task: true
share_processes: true
setup_group:
- func: get-project-and-modules
- func: set-up-mongodb
- func: set-up-curator
- func: run-make
vars: { target: "cedar" }
setup_task:
- func: run-make
vars: { target: "clean-results" }
teardown_task:
- func: parse-results
teardown_group:
- command: shell.exec
type: setup
params:
script: "rm -rf ~/.aws"
#######################################
# Buildvariants #
#######################################
buildvariants:
- name: lint
display_name: Lint
expansions:
GOROOT: /opt/golang/go1.20
run_on:
- ubuntu2004-small
tasks:
- name: lintGroup
- name: verify-mod-tidy
- name: ubuntu
display_name: Ubuntu 20.04
expansions:
GOROOT: /opt/golang/go1.20
MONGODB_URL: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-7.0.7.tgz
MONGOSH_URL: https://downloads.mongodb.com/compass/mongosh-2.2.2-linux-x64.tgz
RACE_DETECTOR: true
curator_build: linux-amd64
run_on:
- ubuntu2004-small
tasks: [ "dist", "testGroup" ]
- name: macos
display_name: macOS
expansions:
GOROOT: /opt/golang/go1.20
MONGODB_URL: https://fastdl.mongodb.org/osx/mongodb-macos-arm64-7.0.7.tgz
MONGOSH_URL: https://downloads.mongodb.com/compass/mongosh-2.2.2-darwin-arm64.zip
MONGOSH_DECOMPRESS: unzip
curator_build: darwin-amd64
run_on:
- macos-1100-arm64
tasks: [ "testGroup" ]
- name: windows
display_name: Windows
run_on:
- windows-vsCurrent-small
expansions:
MONGODB_URL: https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.7.zip
MONGOSH_URL: https://downloads.mongodb.com/compass/mongosh-2.2.2-win32-x64.zip
GOROOT: C:/golang/go1.20
curator_build: windows-amd64
tasks: [ "testGroup" ]