forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.build.yml
649 lines (602 loc) · 29.3 KB
/
pipeline.build.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
- label: ":book: Lint"
commands:
- export LINT=1
- ./ci/env/install-dependencies.sh
- ./ci/ci.sh lint
- label: ":ferris_wheel: Wheels and Jars"
conditions:
[
"RAY_CI_LINUX_WHEELS_AFFECTED",
"RAY_CI_JAVA_AFFECTED",
]
instance_size: medium
commands:
# Build the wheels and jars
- UPLOAD_WHEELS_AS_ARTIFACTS=1 LINUX_WHEELS=1 LINUX_JARS=1 ./ci/ci.sh build
# Upload the wheels and jars
# We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
- if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
- pip install -q docker aws_requests_auth boto3
- ./ci/env/env_info.sh
# Upload to branch directory.
- python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
- python .buildkite/copy_files.py --destination branch_jars --path ./.jar/linux
# Upload to latest directory.
- if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
- if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination jars --path ./.jar/linux; fi
- label: ":ferris_wheel: Post-wheel tests"
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
instance_size: medium
commands:
- LINUX_WHEELS=1 ./ci/ci.sh build
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=post_wheel_build
--test_env=CONDA_EXE
--test_env=CONDA_PYTHON_EXE
--test_env=CONDA_SHLVL
--test_env=CONDA_PREFIX
--test_env=CONDA_DEFAULT_ENV
--test_env=CI
--test_env=RAY_CI_POST_WHEEL_TESTS=True
python/ray/tests/... python/ray/serve/... python/ray/tune/... rllib/... doc/...
- label: ":ferris_wheel: Debug Wheels"
conditions:
[
"RAY_CI_LINUX_WHEELS_AFFECTED",
"RAY_CI_JAVA_AFFECTED",
]
instance_size: medium
commands:
# Build the debug wheels
- RAY_DEBUG_BUILD=debug LINUX_WHEELS=1 ./ci/ci.sh build
# Upload the wheels.
# We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
- if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
- pip install -q docker aws_requests_auth boto3
- ./ci/env/env_info.sh
# Upload to branch directory.
- python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
# Upload to latest directory.
- if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
- label: ":docker: Build Images: py37 (1/2)"
conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
instance_size: medium
commands:
- LINUX_WHEELS=1 BUILD_ONE_PYTHON_ONLY={{matrix}} ./ci/ci.sh build
- pip install -q docker aws_requests_auth boto3
- ./ci/env/env_info.sh
- if [[ "${BUILDKITE_PULL_REQUEST}" == "false" ]]; then python .buildkite/copy_files.py --destination docker_login; fi
- python ./ci/build/build-docker-images.py --py-versions {{matrix}} -T cpu -T cu115 -T cu116 --build-type BUILDKITE --build-base
matrix:
- py37
- py38
- py39
- py310
- label: ":docker: Build Images: {{matrix}} - cu117/cu118"
conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
instance_size: medium
commands:
- LINUX_WHEELS=1 BUILD_ONE_PYTHON_ONLY={{matrix}} ./ci/ci.sh build
- pip install -q docker aws_requests_auth boto3
- ./ci/env/env_info.sh
- if [[ "${BUILDKITE_PULL_REQUEST}" == "false" ]]; then python .buildkite/copy_files.py --destination docker_login; fi
- python ./ci/build/build-docker-images.py --py-versions {{matrix}} -T cu117 -T cu118 --build-type BUILDKITE --build-base
matrix:
- py37
- py38
- py39
- py310
- label: ":java: Java"
conditions: ["RAY_CI_JAVA_AFFECTED"]
instance_size: medium
commands:
- ./java/test.sh
- label: ":cpp: Ray CPP Worker"
conditions: [ "RAY_CI_CPP_AFFECTED" ]
instance_size: small
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/ci.sh test_cpp
- label: ":cpp: Tests"
conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
instance_size: small
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- bazel test --config=ci --config=llvm $(./ci/run/bazel_export_options)
--build_tests_only
-- //:all -rllib/... -core_worker_test
- label: ":cpp: Tests (ASAN)"
conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
instance_size: small
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- bazel test --config=ci --config=asan-clang $(./ci/run/bazel_export_options)
--build_tests_only
--jobs=2
-- //:all -//:core_worker_test
- label: ":cpp: Tests (UBSAN)"
conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
# Unset CC CXX vars set in Dockerfile. Clang currently runs into problems with ubsan builds, this will revert to
# using GCC instead.
- unset CC CXX && bazel test --config=ci --config=ubsan $(./ci/run/bazel_export_options)
--build_tests_only
--jobs=2
-- //:all -//:core_worker_test -//src/ray/util/tests:logging_test -//:ray_syncer_test
- label: ":cpp: Tests (TSAN)"
conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- bazel test --config=ci --config=tsan-clang $(./ci/run/bazel_export_options)
--build_tests_only
--jobs=2
-- //:all -//:core_worker_test -//src/ray/util/tests:event_test -//:gcs_actor_manager_test
-//:gcs_placement_group_manager_test -//:gcs_placement_group_scheduler_test
-//:gcs_server_rpc_test -//:gcs_client_test -//:metric_exporter_client_test
-//:stats_test -//:worker_pool_test -//:ray_syncer_test
- label: ":serverless: Dashboard Tests"
conditions:
[
"RAY_CI_DASHBOARD_AFFECTED",
"RAY_CI_PYTHON_AFFECTED",
]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/env_info.sh
- ./dashboard/tests/run_ui_tests.sh
- bazel test --config=ci $(./ci/run/bazel_export_options) python/ray/dashboard/...
- label: ":serverless: Serve Release Tests"
conditions:
[
"RAY_CI_SERVE_AFFECTED",
"RAY_CI_PYTHON_AFFECTED",
]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- TORCH_VERSION=1.9.0 ./ci/env/install-dependencies.sh
- 'git clone https://github.com/wg/wrk.git /tmp/wrk && pushd /tmp/wrk && make -j && sudo cp wrk /usr/local/bin && popd'
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=team:serve
release/...
- label: ":serverless: Serve Tests"
parallelism: 3
conditions:
[
"RAY_CI_SERVE_AFFECTED",
"RAY_CI_PYTHON_AFFECTED",
"RAY_CI_ML_AFFECTED",
]
instance_size: large
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- TORCH_VERSION=1.9.0 ./ci/env/install-dependencies.sh
- bash ./ci/ci.sh prepare_docker
- 'git clone https://github.com/wg/wrk.git /tmp/wrk && pushd /tmp/wrk && make -j && sudo cp wrk /usr/local/bin && popd'
- ./ci/env/env_info.sh
- >-
set -x;
python ./ci/run/bazel_sharding/bazel_sharding.py
--exclude_manual
--index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}"
--tag_filters=-post_wheel_build,-gpu
python/ray/serve/...
> test_shard.txt
- cat test_shard.txt
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=-post_wheel_build,-gpu
--test_env=DOCKER_HOST=tcp:https://docker:2376
--test_env=DOCKER_TLS_VERIFY=1
--test_env=DOCKER_CERT_PATH=/certs/client
--test_env=DOCKER_TLS_CERTDIR=/certs
$(cat test_shard.txt)
- label: ":python: Minimal install Python {{matrix}}"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/ci.sh test_minimal {{matrix}}
- ./ci/ci.sh test_latest_core_dependencies {{matrix}}
matrix:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- label: ":python: Default install"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: small
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-default.sh
- ./ci/env/env_info.sh
- bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
python/ray/dashboard/test_dashboard
- label: ":python: Ray Serve default install"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: small
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-serve.sh
- ./ci/env/env_info.sh
- bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
python/ray/serve/test_deployment_graph
- bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
python/ray/serve/test_api
- label: ":python: (Small & Client)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- DL=1 ./ci/env/install-dependencies.sh
- bash ./ci/ci.sh prepare_docker
- ./ci/env/env_info.sh
- pip install ray[client]
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=client_tests,small_size_python_tests
-- python/ray/tests/...
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=ray_ha
--test_env=DOCKER_HOST=tcp:https://docker:2376
--test_env=DOCKER_TLS_VERIFY=1
--test_env=DOCKER_CERT_PATH=/certs/client
--test_env=DOCKER_TLS_CERTDIR=/certs
-- python/ray/tests/...
- bazel test --config=ci $(./ci/run/bazel_export_options)
-- python/ray/autoscaler/v2/...
- label: ":python: (Large)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: large
parallelism: 3
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- DL=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- ./ci/ci.sh test_large
- label: ":python: (Medium A-J)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=-kubernetes,medium_size_python_tests_a_to_j
python/ray/tests/...
- label: ":python: (Medium K-Z)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- DL=1 ./ci/env/install-dependencies.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=-kubernetes,medium_size_python_tests_k_to_z
python/ray/tests/...
- label: ":redis: (External Redis) (Small & Client)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- DL=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- pip install ray[client]
- bazel test --config=ci $(./scripts/bazel_export_options)
--test_tag_filters=client_tests,small_size_python_tests
--test_env=TEST_EXTERNAL_REDIS=1
-- python/ray/tests/...
- label: ":redis: (External Redis) (Large)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: large
parallelism: 3
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- DL=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- ./ci/ci.sh test_large --test_env=TEST_EXTERNAL_REDIS=1
- label: ":redis: (External Redis) (Medium A-J)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/env_info.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--test_tag_filters=-kubernetes,medium_size_python_tests_a_to_j
--test_env=TEST_EXTERNAL_REDIS=1
-- //python/ray/tests/...
- label: ":redis: (External Redis) (Medium K-Z)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- DL=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--test_tag_filters=-kubernetes,medium_size_python_tests_k_to_z
--test_env=TEST_EXTERNAL_REDIS=1
-- //python/ray/tests/...
- label: ":python: Debug Test"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- pip uninstall -y ray
- RAY_DEBUG_BUILD=debug ./ci/ci.sh build
- ./ci/env/env_info.sh
- bazel test --config=ci-debug $(./ci/run/bazel_export_options)
--test_tag_filters=-kubernetes,debug_tests
python/ray/tests/...
- label: ":python: (ASAN tests)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- bazel test --config=ci --config=asan $(./ci/run/bazel_export_options)
--config=asan-buildkite
--test_tag_filters=-kubernetes,asan_tests
--test_env=CONDA_EXE
--test_env=CONDA_PYTHON_EXE
--test_env=CONDA_SHLVL
--test_env=CONDA_PREFIX
--test_env=CONDA_DEFAULT_ENV
python/ray/tests/...
- label: ":book: Doctest (CPU)"
instance_size: large
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/env_info.sh
- DOC_TESTING=1 ./ci/env/install-dependencies.sh
- ./ci/env/install-horovod.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--test_tag_filters=doctest,-gpu
python/ray/... doc/...
- label: ":python: Ray on Spark Test"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- pip uninstall -y ray
- RAY_DEBUG_BUILD=debug ./ci/ci.sh build
# Install latest pyspark. We cannot move this to the requirements file as subdependencies conflict
- pip install -U https://ml-team-public-read.s3.us-west-2.amazonaws.com/spark-pkgs/pyspark-3.4.0.dev0-0cb0fa313979e1b82ddd711a05d8c4e78cf6c9f5.tar.gz
- ./ci/env/env_info.sh
- bazel test --config=ci-debug $(./ci/run/bazel_export_options)
--test_env=RAY_ON_SPARK_BACKGROUND_JOB_STARTUP_WAIT=1
--test_env=RAY_ON_SPARK_RAY_WORKER_NODE_STARTUP_INTERVAL=5
--test_tag_filters=-kubernetes,spark_plugin_tests
python/ray/tests/...
- label: ":kubernetes: operator"
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
instance_size: medium
commands:
- |
cleanup() {
if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi
python python/ray/tests/kuberay/setup/teardown_kuberay.py || true
kind delete cluster
}
trap cleanup EXIT
- ./ci/env/install-minimal.sh 3.8
- PYTHON=3.8 ./ci/env/install-dependencies.sh
# Specifying above somehow messes up the Ray install.
# Uninstall and re-install Ray so that we can use Ray Client.
# (Remove thirdparty_files to sidestep an issue with psutil.)
- pip uninstall -y ray && rm -rf /ray/python/ray/thirdparty_files
- pip install -e /ray/python
- echo "--- Setting up local kind cluster."
- ./ci/k8s/prep-k8s-environment.sh
- echo "--- Building py38-cpu Ray image for the test."
- LINUX_WHEELS=1 ./ci/ci.sh build
- pip install -q docker
- python ci/build/build-docker-images.py --py-versions py38 --device-types cpu --build-type LOCAL --build-base
# Tag the image built in the last step. We want to be sure to distinguish the image from the real Ray nightly.
- docker tag rayproject/ray:nightly-py38-cpu ray-ci:kuberay-test
# Load the image into the kind node
- kind load docker-image ray-ci:kuberay-test
- echo "--- Setting up KubeRay operator."
- python python/ray/tests/kuberay/setup/setup_kuberay.py
- ./ci/env/env_info.sh
- echo "--- Running the test."
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=kuberay_operator
--test_env=RAY_IMAGE=docker.io/library/ray-ci:kuberay-test
--test_env=PULL_POLICY=IfNotPresent
--test_env=KUBECONFIG=/root/.kube/config
python/ray/tests/...
- label: ":book: Documentation"
soft_fail: true
commands:
- export LINT=1
- ./ci/env/install-dependencies.sh
# Specifying above somehow messes up the Ray install.
# Uninstall and re-install Ray so that we can use Ray Client
# (remove thirdparty_files to sidestep an issue with psutil).
- pip uninstall -y ray && rm -rf /ray/python/ray/thirdparty_files
- pushd /ray && git clean -f -f -x -d -e .whl -e python/ray/dashboard/client && popd
- bazel clean --expunge
- export WANDB_MODE=offline
# Horovod needs to be installed separately (needed for API ref imports)
- ./ci/env/install-horovod.sh
# See https://stackoverflow.com/questions/63383400/error-cannot-uninstall-ruamel-yaml-while-creating-docker-image-for-azure-ml-a
# Pin urllib to avoid downstream ssl incompatibility issues. This matches requirements-doc.txt.
- pip install "mosaicml==0.12.1" "urllib3<1.27" --ignore-installed
- ./ci/env/env_info.sh
- ./ci/ci.sh build_sphinx_docs
- label: ":octopus: Tune multinode tests"
conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_TUNE_AFFECTED"]
instance_size: medium
commands:
- LINUX_WHEELS=1 ./ci/ci.sh build
- mkdir -p ~/.docker/cli-plugins/ && curl -SL https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose && chmod +x ~/.docker/cli-plugins/docker-compose
- pip install -U docker aws_requests_auth boto3
- ./ci/env/env_info.sh
- python ./ci/build/build-docker-images.py --py-versions py38 --device-types cpu --build-type LOCAL --build-base
- python ./ci/build/build-multinode-image.py rayproject/ray:nightly-py38-cpu rayproject/ray:multinode-py38
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only
--test_tag_filters=multinode,-example,-flaky,-soft_imports,-gpu_only,-rllib
python/ray/tune/...
--test_env=RAY_HAS_SSH="1"
--test_env=RAY_DOCKER_IMAGE="rayproject/ray:multinode-py38"
--test_env=RAY_TEMPDIR="/ray-mount"
--test_env=RAY_HOSTDIR="/ray"
--test_env=RAY_TESTHOST="dind-daemon"
--test_env=DOCKER_HOST=tcp:https://docker:2376
--test_env=DOCKER_TLS_VERIFY=1
--test_env=DOCKER_CERT_PATH=/certs/client
--test_env=DOCKER_TLS_CERTDIR=/certs
- label: ":hadoop: Ray AIR HDFS tests"
conditions: ["RAY_CI_ML_AFFECTED"]
instance_size: medium
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- INSTALL_HDFS=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- cat /tmp/hdfs_env
- bazel test --config=ci $(./ci/run/bazel_export_options) --test_tag_filters=hdfs python/ray/air/...
# Test to see if Train can be used without torch, tf, etc. installed
- label: ":steam_locomotive: Train minimal install"
conditions: ["RAY_CI_TRAIN_AFFECTED"]
instance_size: small
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- TRAIN_MINIMAL_INSTALL=1 ./ci/env/install-minimal.sh
- ./ci/env/env_info.sh
- python ./ci/env/check_minimal_install.py
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=minimal python/ray/train/...
# These tests install requirements_legacy_compat.txt which are the
# lower bound of dependencies we support.
- label: ":cold_face: :python: Ray Python 3.7 legacy dependency ML compatibility tests"
conditions:
["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_TUNE_AFFECTED", "RAY_CI_TRAIN_AFFECTED", "RAY_CI_ML_AFFECTED"]
instance_size: large
parallelism: 3
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-minimal.sh 3.7
- PYTHON=3.7 DATA_PROCESSING_TESTING=1 TUNE_TESTING=1 TRAIN_TESTING=1 INSTALL_HDFS=1 ./ci/env/install-dependencies.sh
- pip install -r python/requirements/compat/requirements_legacy_compat.txt
- pip install -U typing-extensions
- HOROVOD_WITH_GLOO=1 HOROVOD_WITHOUT_MPI=1 HOROVOD_WITHOUT_MXNET=1 HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 pip install horovod
- ./ci/env/env_info.sh
# Combine shards from different files
- >-
set -x;
{
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=compat python/ray/tests/horovod/... python/ray/tests/lightgbm/... python/ray/tests/ml_py37_compat/... python/ray/tests/xgboost/... &&
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=-gpu,-needs_credentials,-hdfs python/ray/air/... &&
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=ray_air,-torch_1_11,-gpu_only,-gpu,-needs_credentials,-hdfs python/ray/train/... &&
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=ray_air python/ray/data/...;
} > test_shard.txt
- cat test_shard.txt
- bazel test --config=ci $(./ci/run/bazel_export_options)
$(cat test_shard.txt)
# These tests install requirements_py37_compat.txt which are the
# upper bound of Python 3.7 dependencies we support
- label: ":cold_face: :python: Ray Python 3.7 ML compatibility tests"
conditions:
["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_TUNE_AFFECTED", "RAY_CI_TRAIN_AFFECTED", "RAY_CI_ML_AFFECTED"]
instance_size: large
parallelism: 3
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-minimal.sh 3.7
- PYTHON=3.7 DATA_PROCESSING_TESTING=1 TUNE_TESTING=1 TRAIN_TESTING=1 INSTALL_HDFS=1 ./ci/env/install-dependencies.sh
- pip install -r python/requirements/compat/requirements_py37_compat.txt
- pip install -U typing-extensions
- HOROVOD_WITH_GLOO=1 HOROVOD_WITHOUT_MPI=1 HOROVOD_WITHOUT_MXNET=1 HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 pip install horovod
- ./ci/env/env_info.sh
# Combine shards from different files
- >-
set -x;
{
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=compat python/ray/tests/horovod/... python/ray/tests/lightgbm/... python/ray/tests/ml_py37_compat/... python/ray/tests/xgboost/... &&
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=-gpu,-needs_credentials,-hdfs python/ray/air/... &&
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=ray_air,-torch_1_11,-gpu_only,-gpu,-needs_credentials,-hdfs python/ray/train/... &&
python ./ci/run/bazel_sharding/bazel_sharding.py --exclude_manual --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}" --tag_filters=ray_air python/ray/data/...;
} > test_shard.txt
- cat test_shard.txt
- bazel test --config=ci $(./ci/run/bazel_export_options)
$(cat test_shard.txt)
- label: ":cold_face: :python: :brain: Python 3.7 RLlib: tests/ dir"
conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_RLLIB_DIRECTLY_AFFECTED"]
parallelism: 2
instance_size: large
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-minimal.sh 3.7
- PYTHON=3.7 RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
- pip install -r python/requirements/compat/requirements_py37_compat.txt
- ./ci/env/env_info.sh
- ./ci/run/run_bazel_test_with_sharding.sh --config=ci $(./ci/run/bazel_export_options) --build_tests_only
--test_tag_filters=tests_dir,-multi_gpu --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1 rllib/...
- label: ":cold_face: :python: :brain: Python 3.7 RLlib: Learning tests Pytorch (With Ray Data)"
conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_DATA_AFFECTED"]
instance_size: large
commands:
# skip on master because we are running these test under all RLlib suites anyw/ay
- if [ "$BUILDKITE_PULL_REQUEST" = "false" ]; then exit 0; fi
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-minimal.sh 3.7
- PYTHON=3.7 RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
- pip install -r python/requirements/compat/requirements_py37_compat.txt
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--build_tests_only
--test_tag_filters=learning_tests_with_ray_data,-multi_gpu,-gpu,-tf_only,-tf2_only
--test_arg=--framework=torch
rllib/...
- label: ":cold_face: :python: :brain: Python 3.7 RLlib: Learning tests TF2 (With Ray Data)"
conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_DATA_AFFECTED"]
instance_size: large
commands:
# skip on master because we are running these test under all RLlib suites anyw/ay
- if [ "$BUILDKITE_PULL_REQUEST" = "false" ]; then exit 0; fi
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-minimal.sh 3.7
- PYTHON=3.7 RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
- pip install -r python/requirements/compat/requirements_py37_compat.txt
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--build_tests_only
--test_tag_filters=learning_tests_with_ray_data,-multi_gpu,-gpu,-torch_only
--test_arg=--framework=tf2
rllib/...
- label: ":cold_face: :python: :serverless: Python 3.7 Serve Tests"
parallelism: 3
conditions:
[
"RAY_CI_SERVE_AFFECTED",
"RAY_CI_PYTHON_AFFECTED",
"RAY_CI_ML_AFFECTED",
]
instance_size: large
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/env/install-minimal.sh 3.7
- PYTHON=3.7 TORCH_VERSION=1.9.0 ./ci/env/install-dependencies.sh
- bash ./ci/ci.sh prepare_docker
- 'git clone https://github.com/wg/wrk.git /tmp/wrk && pushd /tmp/wrk && make -j && sudo cp wrk /usr/local/bin && popd'
- ./ci/env/env_info.sh
- >-
set -x;
python ./ci/run/bazel_sharding/bazel_sharding.py
--exclude_manual
--index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}"
--tag_filters=-post_wheel_build,-gpu
python/ray/serve/...
> test_shard.txt
- cat test_shard.txt
- bazel test --config=ci $(./ci/run/bazel_export_options)
--test_tag_filters=-post_wheel_build,-gpu
--test_env=DOCKER_HOST=tcp:https://docker:2376
--test_env=DOCKER_TLS_VERIFY=1
--test_env=DOCKER_CERT_PATH=/certs/client
--test_env=DOCKER_TLS_CERTDIR=/certs
$(cat test_shard.txt)