-
Notifications
You must be signed in to change notification settings - Fork 468
/
pipeline.template.yml
667 lines (608 loc) · 16.8 KB
/
pipeline.template.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
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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.
# This file is processed by mkpipeline.py to trim unnecessary steps in PR
# builds. The inputs for steps using the `mzcompose` plugin are computed
# automatically. Inputs for other steps need to be manually listed in the
# `inputs` key.
dag: true
env:
CI_BUILDER_SCCACHE: 1
steps:
- id: build-x86_64
label: Build x86_64
command: bin/ci-builder run stable bin/pyactivate -m ci.test.build
inputs:
- "*"
timeout_in_minutes: 60
priority: 1
agents:
queue: builder-linux-x86_64
- id: build-aarch64
label: Build aarch64
command: bin/ci-builder run stable bin/pyactivate -m ci.test.build
inputs:
- "*"
timeout_in_minutes: 60
priority: 1
agents:
queue: builder-linux-aarch64
coverage: skip
- id: check-merge-with-target
label: Merge skew cargo check
command: ci/test/check-merge-with-target.sh
inputs:
- Cargo.lock
- "**/Cargo.toml"
- "**/*.rs"
timeout_in_minutes: 30
agents:
queue: linux-x86_64
if: "build.pull_request.id != null"
coverage: skip
- id: devel-docker-tags
label: Tag development docker images
command: bin/ci-builder run stable bin/pyactivate -m ci.test.dev_tag
inputs:
- "*"
depends_on:
- build-x86_64
- build-aarch64
timeout_in_minutes: 10
agents:
queue: linux-x86_64
coverage: skip
- id: lint-fast
label: Lint and rustfmt
command: bin/ci-builder run stable ci/test/lint-fast.sh
inputs:
- "*"
timeout_in_minutes: 10
agents:
queue: linux-x86_64
coverage: skip
- id: lint-slow
label: Clippy and doctests
command: bin/ci-builder run stable ci/test/lint-slow.sh
inputs:
- Cargo.lock
- "**/Cargo.toml"
- "**/*.rs"
timeout_in_minutes: 30
agents:
queue: builder-linux-x86_64
coverage: skip
- id: lint-macos
label: macOS Clippy
command: cargo clippy --all-targets -- -D warnings
env:
CARGO_INCREMENTAL: "0"
RUSTUP_TOOLCHAIN: $RUST_VERSION
inputs:
- Cargo.lock
- "**/Cargo.toml"
- "**/*.rs"
timeout_in_minutes: 30
agents:
queue: mac
coverage: skip
- id: lint-deps
label: Lint dependencies
command: bin/ci-builder run stable ci/test/lint-deps.sh
inputs:
- Cargo.lock
- "**/Cargo.toml"
- "**/*.rs"
timeout_in_minutes: 30
agents:
queue: linux-x86_64
coverage: skip
- id: lint-docs
label: Lint docs
command: bin/ci-builder run stable ci/test/lint-docs.sh
inputs: [doc/user]
timeout_in_minutes: 30
agents:
queue: linux-x86_64
coverage: skip
- id: preview-docs
label: Preview docs
command: bin/ci-builder run stable ci/test/preview-docs.sh
inputs: [doc/user]
timeout_in_minutes: 30
agents:
queue: linux-x86_64
coverage: skip
- id: cargo-test
label: Cargo test
timeout_in_minutes: 30
artifact_paths: [junit_*.xml, target/nextest/ci/junit_cargo-test.xml]
inputs:
- Cargo.lock
- "**/Cargo.toml"
- "**/*.rs"
- "**/*.proto"
- "**/testdata/**"
env:
AWS_DEFAULT_REGION: "us-east-2"
plugins:
- ./ci/plugins/scratch-aws-access: ~
- ./ci/plugins/mzcompose:
composition: cargo-test
agents:
queue: builder-linux-x86_64
coverage: skip
- id: miri-test
label: Miri test
command: bin/ci-builder run nightly ci/test/cargo-test-miri.sh
inputs: [src]
timeout_in_minutes: 30
agents:
queue: builder-linux-x86_64
coverage: skip
- id: testdrive
label: Testdrive %n
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/testdrive]
parallelism: 4
# Don't need the junit_mzcompose_*.xml for this
artifact_paths: [junit_testdrive_*.xml, test/testdrive/junit_testdrive_*.xml]
plugins:
- ./ci/plugins/scratch-aws-access: ~
- ./ci/plugins/mzcompose:
composition: testdrive
args: [--aws-region=us-east-2]
agents:
queue: linux-x86_64
- id: kafka-persistence
label: Kafka persistence
depends_on: build-x86_64
timeout_in_minutes: 30
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: persistence
run: kafka-sources
agents:
queue: linux-x86_64
- id: table-persistence
label: Table persistence
depends_on: build-x86_64
timeout_in_minutes: 30
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: persistence
run: user-tables
agents:
queue: linux-x86_64
- id: cluster-tests
label: Cluster tests
depends_on: build-x86_64
timeout_in_minutes: 20
artifact_paths: junit_*.xml
inputs: [test/cluster]
plugins:
- ./ci/plugins/mzcompose:
composition: cluster
agents:
queue: linux-x86_64
- id: cluster-isolation
label: Cluster isolation test
depends_on: build-x86_64
timeout_in_minutes: 10
inputs: [test/cluster-isolation]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: cluster-isolation
agents:
queue: linux-x86_64
- id: replica-isolation
label: Replica isolation
depends_on: build-x86_64
timeout_in_minutes: 20
inputs: [test/replica-isolation]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: replica-isolation
agents:
queue: linux-x86_64
- id: kafka-ssl
label: Kafka SSL smoke test
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/kafka-ssl/smoketest.td]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: kafka-ssl
agents:
queue: linux-x86_64
- id: kafka-sasl-plain
label: Kafka SASL PLAIN smoke test
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/kafka-sasl-plain/smoketest.td]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: kafka-sasl-plain
agents:
queue: linux-x86_64
- id: sqllogictest-fast
label: Fast SQL logic tests
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/sqllogictest]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: sqllogictest
agents:
queue: linux-x86_64
- id: chbench-demo
label: chbench smoke test
depends_on: build-x86_64
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: chbench
args: [--run-seconds=10, --wait]
timeout_in_minutes: 30
agents:
queue: linux-x86_64
- id: restarts
label: Restart test
depends_on: build-x86_64
timeout_in_minutes: 30
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: restart
agents:
queue: linux-x86_64
- id: legacy-upgrade
label: Legacy upgrade tests
depends_on: build-x86_64
timeout_in_minutes: 60
artifact_paths: junit_*.xml
inputs: [doc/user/content/releases]
plugins:
- ./ci/plugins/mzcompose:
composition: upgrade
agents:
queue: linux-x86_64
- id: metabase-demo
label: Metabase smoke test
depends_on: build-x86_64
timeout_in_minutes: 10
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: metabase
agents:
queue: linux-x86_64
- id: dbt-materialize
label: dbt-materialize tests
depends_on: build-x86_64
timeout_in_minutes: 10
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: dbt-materialize
agents:
queue: linux-x86_64
- id: debezium-postgres
label: Debezium Postgres tests
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/debezium]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: debezium
run: postgres
agents:
queue: linux-x86_64
- id: debezium-sql-server
label: Debezium SQL Server tests
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/debezium]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: debezium
run: sql-server
agents:
queue: linux-x86_64
- id: debezium-mysql
label: Debezium MySQL tests
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/debezium]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: debezium
run: mysql
agents:
queue: linux-x86_64
- id: pg-cdc
label: Postgres CDC tests
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/pg-cdc]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: pg-cdc
agents:
queue: linux-x86_64
- id: pg-cdc-resumption
label: Postgres CDC resumption tests
depends_on: build-x86_64
timeout_in_minutes: 30
inputs: [test/pg-cdc-resumption]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: pg-cdc-resumption
agents:
queue: linux-x86_64
- id: ssh-connection
label: SSH connection tests
depends_on: build-x86_64
timeout_in_minutes: 10
inputs: [test/ssh-connection]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: ssh-connection
agents:
queue: linux-x86_64
- id: kafka-resumption
label: Kafka resumption tests
depends_on: build-x86_64
timeout_in_minutes: 30
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: kafka-resumption
agents:
queue: linux-x86_64
- id: zippy-kafka-sources-short
label: "Short Zippy"
depends_on: build-x86_64
inputs: [misc/python/materialize/zippy]
timeout_in_minutes: 30
artifact_paths: junit_*.xml
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: zippy
args: [--scenario=KafkaSources, --actions=200]
- id: kafka-exactly-once
label: Kafka exactly-once tests
depends_on: build-x86_64
timeout_in_minutes: 30
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: kafka-exactly-once
agents:
queue: linux-x86_64
- id: persist-maelstrom
label: Maelstrom coverage of persist
depends_on: build-x86_64
timeout_in_minutes: 10
inputs: [test/persist]
artifact_paths: [test/persist/maelstrom/**/*.log, junit_*.xml]
plugins:
- ./ci/plugins/mzcompose:
composition: persist
args: [--consensus=mem, --blob=mem]
agents:
queue: linux-x86_64
coverage: skip # TODO(def-): Should we support coverage for persist-maelstrom?
- id: checks-drop-create-default-replica
label: "Checks + DROP/CREATE replica"
depends_on: build-x86_64
inputs: [misc/python/materialize/checks]
timeout_in_minutes: 30
artifact_paths: junit_*.xml
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: platform-checks
args: [--scenario=DropCreateDefaultReplica, "--seed=$BUILDKITE_JOB_ID"]
- id: checks-restart-clusterd-compute
label: "Checks + restart clusterd compute"
depends_on: build-x86_64
inputs: [misc/python/materialize/checks]
timeout_in_minutes: 30
artifact_paths: junit_*.xml
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: platform-checks
args: [--scenario=RestartClusterdCompute, "--seed=$BUILDKITE_JOB_ID"]
- id: checks-restart-entire-mz
label: "Checks + restart of the entire Mz"
depends_on: build-x86_64
inputs: [misc/python/materialize/checks]
timeout_in_minutes: 30
artifact_paths: junit_*.xml
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: platform-checks
args: [--scenario=RestartEntireMz, "--seed=$BUILDKITE_JOB_ID"]
- id: checks-restart-environmentd-clusterd-storage
label: "Checks + restart of environmentd & storage clusterd"
depends_on: build-x86_64
inputs: [misc/python/materialize/checks]
timeout_in_minutes: 30
artifact_paths: junit_*.xml
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: platform-checks
args: [--scenario=RestartEnvironmentdClusterdStorage, "--seed=$BUILDKITE_JOB_ID"]
- id: checks-kill-clusterd-storage
label: "Checks + kill storage clusterd"
depends_on: build-x86_64
inputs: [misc/python/materialize/checks]
timeout_in_minutes: 30
artifact_paths: junit_*.xml
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: platform-checks
args: [--scenario=KillClusterdStorage, "--seed=$BUILDKITE_JOB_ID"]
- id: checks-restart-source-postgres
label: "Checks + restart source Postgres"
depends_on: build-x86_64
inputs: [misc/python/materialize/checks]
timeout_in_minutes: 30
artifact_paths: junit_*.xml
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: platform-checks
args: [--scenario=RestartSourcePostgres, --check=DebeziumPostgres, --check=PgCdc]
- id: cloudtest
label: Cloudtest
depends_on: build-x86_64
parallelism: 3
timeout_in_minutes: 30
artifact_paths: junit_*.xml
inputs: [test/cloudtest, misc/python/materialize/cloudtest]
plugins:
- ./ci/plugins/scratch-aws-access: ~
- ./ci/plugins/cloudtest:
args: [--exitfirst, -m, "not long", --aws-region=us-east-2, test/cloudtest/]
coverage: skip # TODO(def-): Should we support coverage for cloudtest?
- id: source-sink-errors
label: "Source/Sink Error Reporting"
artifact_paths: junit_*.xml
depends_on: build-x86_64
timeout_in_minutes: 30
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: source-sink-errors
- id: storage-usage
label: "Storage Usage Table Test"
artifact_paths: junit_*.xml
depends_on: build-x86_64
timeout_in_minutes: 30
agents:
queue: linux-x86_64
plugins:
- ./ci/plugins/mzcompose:
composition: storage-usage
- id: lang-csharp
label: ":csharp: tests"
depends_on: build-x86_64
timeout_in_minutes: 10
inputs: [test/lang/csharp]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: csharp
agents:
queue: linux-x86_64
- id: lang-js
label: ":js: tests"
depends_on: build-x86_64
timeout_in_minutes: 10
inputs: [test/lang/js]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: js
agents:
queue: linux-x86_64
- id: lang-java
label: ":java: tests"
depends_on: build-x86_64
timeout_in_minutes: 10
inputs: [test/lang/java]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: java
agents:
queue: linux-x86_64
- id: lang-python
label: ":python: tests"
depends_on: build-x86_64
timeout_in_minutes: 10
inputs: [test/lang/python]
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: python
agents:
queue: linux-x86_64
- id: feature-benchmark-kafka-only
label: "Feature benchmark (Kafka only)"
depends_on: build-x86_64
timeout_in_minutes: 30
artifact_paths: junit_*.xml
plugins:
- ./ci/plugins/mzcompose:
composition: feature-benchmark
args: [--scenario=KafkaUpsertUnique]
coverage: skip
- wait: ~
continue_on_failure: true
- id: coverage-pr-analyze
label: Analyze code coverage for PR
command: bin/ci-builder run stable ci/test/coverage_report.sh
inputs: ["*"]
priority: 1
agents:
queue: linux-x86_64
coverage: only
- wait: ~
continue_on_failure: true
- id: analyze
label: Analyze tests
inputs: ["*"]
plugins:
- junit-annotate#v2.0.2:
artifacts: "*junit_*.xml"
job-uuid-file-pattern: _([^_]*).xml
priority: 1
agents:
queue: linux-x86_64
- wait: ~
- id: deploy
label: Deploy
trigger: deploy
async: true
branches: "main v*.*"
build:
commit: "$BUILDKITE_COMMIT"
branch: "$BUILDKITE_BRANCH"
env:
BUILDKITE_TAG: "$BUILDKITE_TAG"
coverage: skip