core.rayci.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. group: core tests
  2. depends_on:
  3. - forge
  4. - oss-ci-base_build
  5. steps:
  6. # builds
  7. - name: corebuild
  8. wanda: ci/docker/core.build.py39.wanda.yaml
  9. env:
  10. IMAGE_FROM: cr.ray.io/rayproject/oss-ci-base_build
  11. IMAGE_TO: corebuild
  12. RAYCI_IS_GPU_BUILD: "false"
  13. - name: coregpubuild
  14. wanda: ci/docker/core.build.py39.wanda.yaml
  15. depends_on: oss-ci-base_gpu
  16. env:
  17. IMAGE_FROM: cr.ray.io/rayproject/oss-ci-base_gpu
  18. IMAGE_TO: coregpubuild
  19. RAYCI_IS_GPU_BUILD: "true"
  20. - name: corebuild-multipy
  21. label: "wanda: corebuild-py{{matrix}}"
  22. wanda: ci/docker/core.build.wanda.yaml
  23. matrix:
  24. - "3.12"
  25. env:
  26. PYTHON: "{{matrix}}"
  27. depends_on: oss-ci-base_build-multipy
  28. - name: minbuild-core
  29. label: "wanda: minbuild-core-py{{matrix}}"
  30. wanda: ci/docker/min.build.wanda.yaml
  31. matrix:
  32. - "3.9"
  33. - "3.10"
  34. - "3.11"
  35. - "3.12"
  36. env:
  37. PYTHON_VERSION: "{{matrix}}"
  38. EXTRA_DEPENDENCY: core
  39. - wait: ~
  40. depends_on:
  41. - corebuild
  42. # tests
  43. - label: ":ray: core: python tests"
  44. tags:
  45. - python
  46. - dashboard
  47. instance_type: large
  48. parallelism: 4
  49. commands:
  50. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dag/... python/ray/autoscaler/v2/... core
  51. --workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}" --parallelism-per-worker 3
  52. --except-tags debug_tests,asan_tests,post_wheel_build,ha_integration,mem_pressure,tmpfs,container,manual,use_all_core,multi_gpu
  53. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dag/... python/ray/autoscaler/v2/... core
  54. --workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}"
  55. --only-tags use_all_core --skip-ray-installation
  56. - label: ":ray: core: python {{matrix.python}} tests ({{matrix.worker_id}})"
  57. if: build.pull_request.labels includes "continuous-build" || pipeline.id == "0189e759-8c96-4302-b6b5-b4274406bf89" || pipeline.id == "018f4f1e-1b73-4906-9802-92422e3badaa"
  58. tags:
  59. - python
  60. - dashboard
  61. instance_type: large
  62. commands:
  63. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dag/... python/ray/autoscaler/v2/... core
  64. --workers 4 --worker-id "{{matrix.worker_id}}" --parallelism-per-worker 3
  65. --python-version {{matrix.python}}
  66. --except-tags debug_tests,asan_tests,post_wheel_build,ha_integration,mem_pressure,tmpfs,container,manual,use_all_core,multi_gpu
  67. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dag/... python/ray/autoscaler/v2/... core
  68. --workers 4 --worker-id "{{matrix.worker_id}}" --parallelism-per-worker 3
  69. --python-version {{matrix.python}}
  70. --only-tags use_all_core --skip-ray-installation
  71. depends_on: corebuild-multipy
  72. matrix:
  73. setup:
  74. python: ["3.12"]
  75. worker_id: ["0", "1", "2", "3"]
  76. - label: ":ray: core: redis tests"
  77. tags: python
  78. instance_type: large
  79. parallelism: 4
  80. commands:
  81. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dag/... python/ray/autoscaler/v2/... core
  82. --workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}" --parallelism-per-worker 3
  83. --test-env=TEST_EXTERNAL_REDIS=1
  84. --except-tags debug_tests,asan_tests,post_wheel_build,ha_integration,mem_pressure,tmpfs,container,manual,use_all_core,multi_gpu
  85. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dag/... python/ray/autoscaler/v2/... core
  86. --workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}"
  87. --only-tags use_all_core --skip-ray-installation
  88. - label: ":ray: core: memory pressure tests"
  89. tags:
  90. - python
  91. - oss
  92. - skip-on-premerge
  93. instance_type: medium
  94. commands:
  95. - cleanup() { ./ci/build/upload_build_info.sh; }; trap cleanup EXIT
  96. - (cd python/ray/dashboard/client && npm ci && npm run build)
  97. - pip install -e python[client]
  98. - bazel test --config=ci --jobs=1 $(./ci/run/bazel_export_options)
  99. --test_tag_filters=mem_pressure -- //python/ray/tests/...
  100. job_env: corebuild
  101. - label: ":ray: core: out of disk tests"
  102. tags:
  103. - python
  104. - oss
  105. instance_type: small
  106. commands:
  107. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... core
  108. --only-tags=tmpfs --tmp-filesystem=tmpfs
  109. - label: ":ray: core: out of disk redis tests"
  110. tags:
  111. - python
  112. - oss
  113. instance_type: small
  114. commands:
  115. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... core
  116. --test-env=TEST_EXTERNAL_REDIS=1
  117. --only-tags=tmpfs --tmp-filesystem=tmpfs
  118. - label: ":ray: core: workflow tests"
  119. tags:
  120. - python
  121. - workflow
  122. instance_type: medium
  123. parallelism: 2
  124. commands:
  125. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/workflow/... core
  126. --workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}"
  127. --except-tags use_all_core
  128. --parallelism-per-worker 2
  129. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/workflow/... core
  130. --workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}"
  131. --skip-ray-installation
  132. --only-tags use_all_core
  133. - label: ":ray: core: doc tests"
  134. tags:
  135. - python
  136. - doc
  137. instance_type: large
  138. commands:
  139. # doc tests
  140. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/... //doc/... core
  141. --only-tags doctest
  142. --parallelism-per-worker 3
  143. # doc examples
  144. - bazel run //ci/ray_ci:test_in_docker -- //doc/... core
  145. --except-tags gpu,post_wheel_build,mem_pressure,doctest
  146. --parallelism-per-worker 3
  147. --skip-ray-installation
  148. - label: ":ray: core: data tests"
  149. tags: python
  150. instance_type: medium
  151. commands:
  152. - bazel run //ci/ray_ci:test_in_docker --
  153. python/ray/util/dask/... python/ray/tests/modin/... core
  154. --build-name datalbuild
  155. --parallelism-per-worker 2
  156. depends_on:
  157. - datalbuild
  158. - forge
  159. - label: ":ray: core: dashboard tests"
  160. tags:
  161. - python
  162. - dashboard
  163. instance_type: medium
  164. commands:
  165. - bazel run //ci/ray_ci:test_in_docker -- python/ray/dashboard/... core
  166. --parallelism-per-worker 3
  167. # ui tests
  168. - docker run -i --rm --volume /tmp/artifacts:/artifact-mount --shm-size=2.5gb
  169. "$${RAYCI_WORK_REPO}":"$${RAYCI_BUILD_ID}"-corebuild /bin/bash -iecuo pipefail
  170. "./python/ray/dashboard/tests/run_ui_tests.sh"
  171. - label: ":ray: core: debug test"
  172. tags: python
  173. instance_type: medium
  174. commands:
  175. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... core
  176. --build-type debug
  177. --parallelism-per-worker 3
  178. --only-tags debug_tests
  179. --except-tags kubernetes,manual
  180. - label: ":ray: core: asan tests"
  181. tags: python
  182. instance_type: medium
  183. commands:
  184. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... core
  185. --build-type asan
  186. --parallelism-per-worker 2
  187. --only-tags asan_tests
  188. --except-tags kubernetes,manual
  189. - label: ":ray: core: wheel tests"
  190. tags: linux_wheels
  191. instance_type: medium
  192. commands:
  193. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //doc/... core
  194. --build-type wheel
  195. --parallelism-per-worker 3
  196. --only-tags post_wheel_build
  197. --test-env=RAY_CI_POST_WHEEL_TESTS=True
  198. depends_on:
  199. - manylinux
  200. - corebuild
  201. - forge
  202. - label: ":ray: core: minimal tests {{matrix}}"
  203. tags:
  204. - python
  205. - dashboard
  206. - oss
  207. instance_type: medium
  208. commands:
  209. # validate minimal installation
  210. - python ./ci/env/check_minimal_install.py
  211. # core tests
  212. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dashboard/... core
  213. --parallelism-per-worker 3
  214. --build-name minbuild-core-py{{matrix}}
  215. --test-env=RAY_MINIMAL=1
  216. --test-env=EXPECTED_PYTHON_VERSION={{matrix}}
  217. --only-tags minimal
  218. --except-tags basic_test,manual
  219. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dashboard/... core
  220. --parallelism-per-worker 3
  221. --build-name minbuild-core-py{{matrix}}
  222. --test-env=RAY_MINIMAL=1
  223. --test-env=EXPECTED_PYTHON_VERSION={{matrix}}
  224. --only-tags minimal
  225. --except-tags no_basic_test,manual
  226. --skip-ray-installation
  227. # core redis tests
  228. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dashboard/... core
  229. --parallelism-per-worker 3
  230. --build-name minbuild-core-py{{matrix}}
  231. --test-env=RAY_MINIMAL=1
  232. --test-env=TEST_EXTERNAL_REDIS=1
  233. --test-env=EXPECTED_PYTHON_VERSION={{matrix}}
  234. --only-tags minimal
  235. --except-tags no_basic_test,manual
  236. --skip-ray-installation
  237. # serve tests
  238. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dashboard/... serve
  239. --parallelism-per-worker 3
  240. --build-name minbuild-core-py{{matrix}}
  241. --test-env=RAY_MINIMAL=1
  242. --only-tags minimal
  243. --skip-ray-installation
  244. depends_on:
  245. - minbuild-core
  246. matrix:
  247. - "3.9"
  248. - "3.10"
  249. - "3.11"
  250. - "3.12"
  251. # cpp tests
  252. - label: ":ray: core: cpp tests"
  253. tags: core_cpp
  254. instance_type: medium
  255. commands:
  256. - bazel run //ci/ray_ci:test_in_docker -- //:all //src/... core --build-type clang
  257. --parallelism-per-worker 2
  258. - label: ":ray: core: cpp asan tests"
  259. tags: core_cpp
  260. instance_type: medium
  261. commands:
  262. - bazel run //ci/ray_ci:test_in_docker -- //:all //src/... core --build-type asan-clang
  263. --parallelism-per-worker 2
  264. - label: ":ray: core: cpp ubsan tests"
  265. tags: core_cpp
  266. instance_type: large
  267. commands:
  268. - bazel run //ci/ray_ci:test_in_docker -- //:all //src/... core --build-type ubsan
  269. --except-tags no_ubsan
  270. --parallelism-per-worker 2
  271. - label: ":ray: core: cpp tsan tests"
  272. tags: core_cpp
  273. instance_type: medium
  274. commands:
  275. - bazel run //ci/ray_ci:test_in_docker -- //:all //src/... core --build-type tsan-clang
  276. --except-tags no_tsan
  277. --parallelism-per-worker 2
  278. - label: ":ray: core: flaky tests"
  279. key: core_flaky_tests
  280. tags:
  281. - python
  282. - skip-on-premerge
  283. instance_type: large
  284. soft_fail: true
  285. commands:
  286. - bazel run //ci/ray_ci:test_in_docker -- //... core
  287. --run-flaky-tests --build-type clang
  288. --except-tags multi_gpu
  289. - label: ":ray: core: flaky gpu tests"
  290. key: core_flaky_gpu_tests
  291. tags:
  292. - gpu
  293. - python
  294. - skip-on-premerge
  295. instance_type: gpu-large
  296. soft_fail: true
  297. commands:
  298. - bazel run //ci/ray_ci:test_in_docker -- //... core
  299. --run-flaky-tests --build-type clang
  300. --parallelism-per-worker 2 --gpus 2
  301. --build-name coregpubuild
  302. --only-tags multi_gpu
  303. depends_on: coregpubuild
  304. - label: ":ray: core: cpp worker tests"
  305. tags: core_cpp
  306. instance_type: medium
  307. commands:
  308. - if [[ "$${BUILDKITE_PIPELINE_ID}" == "0189942e-0876-4b8f-80a4-617f988ec59b" ]]; then
  309. echo "build --remote_upload_local_results=false" >> ~/.bazelrc;
  310. fi
  311. - ci/ci.sh build
  312. - ci/ci.sh test_cpp
  313. depends_on: oss-ci-base_build
  314. job_env: oss-ci-base_build
  315. - label: ":ray: core: HA integration tests"
  316. tags:
  317. - python
  318. - docker
  319. instance_type: medium
  320. commands:
  321. - bazel run //ci/ray_ci:build_in_docker -- docker --platform cpu --canonical-tag ha_integration
  322. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... core --only-tags ha_integration
  323. depends_on:
  324. - manylinux
  325. - forge
  326. - raycpubase
  327. - corebuild
  328. - label: ":ray: core: container tests"
  329. tags:
  330. - python
  331. - docker
  332. - oss
  333. instance_type: medium
  334. commands:
  335. - bazel run //ci/ray_ci:build_in_docker -- docker --platform cpu
  336. --canonical-tag test_container
  337. - docker build --progress=plain --build-arg BASE_IMAGE="rayproject/ray:test_container"
  338. -t rayproject/ray:runtime_env_container -f ci/docker/runtime_env_container/Dockerfile .
  339. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... core --only-tags container
  340. depends_on:
  341. - manylinux
  342. - forge
  343. - raycpubase
  344. - corebuild
  345. - label: ":ray: core: multi gpu tests"
  346. tags:
  347. - accelerated_dag
  348. - gpu
  349. instance_type: gpu-large
  350. commands:
  351. # This machine has 4 GPUs, and we need 2 GPUs, so allow 2 tests to run in
  352. # parallel.
  353. - bazel run //ci/ray_ci:test_in_docker -- //python/ray/tests/... //python/ray/dag/... core
  354. --parallelism-per-worker 2 --gpus 2
  355. --build-name coregpubuild
  356. --only-tags multi_gpu
  357. depends_on: coregpubuild