pipeline.build.yml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  1. - label: ":book: Lint"
  2. commands:
  3. - export LINT=1
  4. - ./ci/env/install-dependencies.sh
  5. - ./ci/ci.sh lint
  6. - label: ":ferris_wheel: Wheels and Jars"
  7. conditions:
  8. [
  9. "RAY_CI_LINUX_WHEELS_AFFECTED",
  10. "RAY_CI_JAVA_AFFECTED",
  11. ]
  12. instance_size: medium
  13. commands:
  14. # Build the wheels and jars
  15. - UPLOAD_WHEELS_AS_ARTIFACTS=1 LINUX_WHEELS=1 LINUX_JARS=1 ./ci/ci.sh build
  16. - bash ./java/build-jar-multiplatform.sh linux
  17. # Upload the wheels and jars
  18. # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
  19. - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
  20. - pip install -q docker aws_requests_auth boto3
  21. - ./ci/env/env_info.sh
  22. # Upload to branch directory.
  23. - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
  24. - python .buildkite/copy_files.py --destination branch_jars --path ./.jar/linux
  25. # Upload to latest directory.
  26. - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
  27. - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination jars --path ./.jar/linux; fi
  28. - label: ":ferris_wheel: Post-wheel tests"
  29. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  30. instance_size: medium
  31. commands:
  32. - LINUX_WHEELS=1 ./ci/ci.sh build
  33. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  34. - ./ci/env/env_info.sh
  35. - bazel test --config=ci $(./ci/run/bazel_export_options)
  36. --test_tag_filters=post_wheel_build
  37. --test_env=CONDA_EXE
  38. --test_env=CONDA_PYTHON_EXE
  39. --test_env=CONDA_SHLVL
  40. --test_env=CONDA_PREFIX
  41. --test_env=CONDA_DEFAULT_ENV
  42. --test_env=CI
  43. --test_env=RAY_CI_POST_WHEEL_TESTS=True
  44. python/ray/tests/... python/ray/serve/... python/ray/tune/... rllib/... doc/...
  45. - label: ":ferris_wheel: Debug Wheels"
  46. conditions:
  47. [
  48. "RAY_CI_LINUX_WHEELS_AFFECTED",
  49. "RAY_CI_JAVA_AFFECTED",
  50. ]
  51. instance_size: medium
  52. commands:
  53. # Build the debug wheels
  54. - RAY_DEBUG_BUILD=debug LINUX_WHEELS=1 ./ci/ci.sh build
  55. # Upload the wheels.
  56. # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
  57. - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
  58. - pip install -q docker aws_requests_auth boto3
  59. - ./ci/env/env_info.sh
  60. # Upload to branch directory.
  61. - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
  62. # Upload to latest directory.
  63. - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
  64. # Not working now.
  65. # - label: ":ferris_wheel: ASAN Wheels"
  66. # conditions:
  67. # [
  68. # "RAY_CI_LINUX_WHEELS_AFFECTED",
  69. # "RAY_CI_JAVA_AFFECTED",
  70. # ]
  71. # commands:
  72. # # Build the asan wheels
  73. # - RAY_DEBUG_BUILD=asan LINUX_WHEELS=1 ./ci/ci.sh build
  74. # # Upload the wheels.
  75. # # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
  76. # - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
  77. # - pip install -q docker aws_requests_auth boto3
  78. # # Upload to branch directory.
  79. # - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
  80. # # Upload to latest directory.
  81. # - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
  82. - label: ":docker: Build Images: py37 (1/2)"
  83. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  84. instance_size: medium
  85. commands:
  86. - LINUX_WHEELS=1 ./ci/ci.sh build
  87. - pip install -q docker aws_requests_auth boto3
  88. - ./ci/env/env_info.sh
  89. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  90. - python ./ci/build/build-docker-images.py --py-versions py37 --device-types cpu cu101 cu102 cu110 --build-type BUILDKITE --build-base
  91. - label: ":docker: Build Images: py37 (2/2)"
  92. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  93. instance_size: medium
  94. commands:
  95. - LINUX_WHEELS=1 ./ci/ci.sh build
  96. - pip install -q docker aws_requests_auth boto3
  97. - ./ci/env/env_info.sh
  98. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  99. - python ./ci/build/build-docker-images.py --py-versions py37 --device-types cu111 cu112 cu113 cu116 cu118 --build-type BUILDKITE --build-base
  100. - label: ":docker: Build Images: py38 (1/2)"
  101. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  102. instance_size: medium
  103. commands:
  104. - LINUX_WHEELS=1 ./ci/ci.sh build
  105. - pip install -q docker aws_requests_auth boto3
  106. - ./ci/env/env_info.sh
  107. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  108. - python ./ci/build/build-docker-images.py --py-versions py38 --device-types cpu cu101 cu102 cu110 --build-type BUILDKITE --build-base
  109. - label: ":docker: Build Images: py38 (2/2)"
  110. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  111. instance_size: medium
  112. commands:
  113. - LINUX_WHEELS=1 ./ci/ci.sh build
  114. - pip install -q docker aws_requests_auth boto3
  115. - ./ci/env/env_info.sh
  116. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  117. - python ./ci/build/build-docker-images.py --py-versions py38 --device-types cu111 cu112 cu113 cu116 cu118 --build-type BUILDKITE --build-base
  118. - label: ":docker: Build Images: py39 (1/2)"
  119. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  120. instance_size: medium
  121. commands:
  122. - LINUX_WHEELS=1 ./ci/ci.sh build
  123. - pip install -q docker aws_requests_auth boto3
  124. - ./ci/env/env_info.sh
  125. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  126. - python ./ci/build/build-docker-images.py --py-versions py39 --device-types cpu cu101 cu102 cu110 --build-type BUILDKITE --build-base
  127. - label: ":docker: Build Images: py39 (2/2)"
  128. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  129. instance_size: medium
  130. commands:
  131. - LINUX_WHEELS=1 ./ci/ci.sh build
  132. - pip install -q docker aws_requests_auth boto3
  133. - ./ci/env/env_info.sh
  134. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  135. - python ./ci/build/build-docker-images.py --py-versions py39 --device-types cu111 cu112 cu113 cu116 cu118 --build-type BUILDKITE --build-base
  136. - label: ":docker: Build Images: py310 (1/2)"
  137. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  138. instance_size: medium
  139. commands:
  140. - LINUX_WHEELS=1 ./ci/ci.sh build
  141. - pip install -q docker aws_requests_auth boto3
  142. - ./ci/env/env_info.sh
  143. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  144. - python ./ci/build/build-docker-images.py --py-versions py310 --device-types cpu cu101 cu102 cu110 --build-type BUILDKITE --build-base
  145. - label: ":docker: Build Images: py310 (2/2)"
  146. conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"]
  147. instance_size: medium
  148. commands:
  149. - LINUX_WHEELS=1 ./ci/ci.sh build
  150. - pip install -q docker aws_requests_auth boto3
  151. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  152. - python ./ci/build/build-docker-images.py --py-versions py310 --device-types cu111 cu112 cu113 cu116 cu118 --build-type BUILDKITE --build-base
  153. - label: ":java: Java"
  154. conditions: ["RAY_CI_JAVA_AFFECTED"]
  155. instance_size: medium
  156. commands:
  157. - ./java/test.sh
  158. - label: ":cpp: Ray CPP Worker"
  159. conditions: [ "RAY_CI_CPP_AFFECTED" ]
  160. instance_size: small
  161. commands:
  162. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  163. - ./ci/ci.sh test_cpp
  164. - label: ":cpp: Tests"
  165. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  166. instance_size: small
  167. commands:
  168. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  169. - bazel test --config=ci --config=llvm $(./ci/run/bazel_export_options)
  170. --build_tests_only
  171. -- //:all -rllib/... -core_worker_test
  172. - label: ":cpp: Tests (ASAN)"
  173. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  174. instance_size: small
  175. commands:
  176. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  177. - bazel test --config=ci --config=asan-clang $(./ci/run/bazel_export_options)
  178. --build_tests_only
  179. --jobs=2
  180. -- //:all -//:core_worker_test
  181. - label: ":cpp: Tests (UBSAN)"
  182. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  183. instance_size: medium
  184. commands:
  185. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  186. # Unset CC CXX vars set in Dockerfile. Clang currently runs into problems with ubsan builds, this will revert to
  187. # using GCC instead.
  188. - unset CC CXX && bazel test --config=ci --config=ubsan $(./ci/run/bazel_export_options)
  189. --build_tests_only
  190. --jobs=2
  191. -- //:all -//:core_worker_test -//:logging_test -//:ray_syncer_test
  192. - label: ":cpp: Tests (TSAN)"
  193. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  194. instance_size: medium
  195. commands:
  196. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  197. - bazel test --config=ci --config=tsan-clang $(./ci/run/bazel_export_options)
  198. --build_tests_only
  199. --jobs=2
  200. -- //:all -//:core_worker_test -//:event_test -//:gcs_actor_manager_test
  201. -//:gcs_placement_group_manager_test -//:gcs_placement_group_scheduler_test
  202. -//:gcs_server_rpc_test -//:gcs_client_test -//:metric_exporter_client_test
  203. -//:stats_test -//:worker_pool_test -//:ray_syncer_test
  204. - label: ":serverless: Dashboard Tests"
  205. conditions:
  206. [
  207. "RAY_CI_DASHBOARD_AFFECTED",
  208. "RAY_CI_PYTHON_AFFECTED",
  209. ]
  210. instance_size: medium
  211. commands:
  212. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  213. - ./ci/env/env_info.sh
  214. - ./dashboard/tests/run_ui_tests.sh
  215. - bazel test --config=ci $(./ci/run/bazel_export_options) python/ray/dashboard/...
  216. - label: ":serverless: Serve Release Tests"
  217. conditions:
  218. [
  219. "RAY_CI_SERVE_AFFECTED",
  220. "RAY_CI_PYTHON_AFFECTED",
  221. ]
  222. instance_size: medium
  223. commands:
  224. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  225. - TORCH_VERSION=1.6 ./ci/env/install-dependencies.sh
  226. - 'git clone https://github.com/wg/wrk.git /tmp/wrk && pushd /tmp/wrk && make -j && sudo cp wrk /usr/local/bin && popd'
  227. - ./ci/env/env_info.sh
  228. - bazel test --config=ci $(./ci/run/bazel_export_options)
  229. --test_tag_filters=team:serve
  230. release/...
  231. - label: ":serverless: Serve Tests"
  232. parallelism: 3
  233. conditions:
  234. [
  235. "RAY_CI_SERVE_AFFECTED",
  236. "RAY_CI_PYTHON_AFFECTED",
  237. "RAY_CI_ML_AFFECTED",
  238. ]
  239. instance_size: large
  240. commands:
  241. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  242. - TORCH_VERSION=1.6 ./ci/env/install-dependencies.sh
  243. - 'git clone https://github.com/wg/wrk.git /tmp/wrk && pushd /tmp/wrk && make -j && sudo cp wrk /usr/local/bin && popd'
  244. - ./ci/env/env_info.sh
  245. - >-
  246. set -x;
  247. python ./ci/run/bazel_sharding/bazel_sharding.py
  248. --exclude_manual
  249. --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}"
  250. --tag_filters=-post_wheel_build,-py37,-gpu
  251. python/ray/serve/...
  252. > test_shard.txt
  253. - cat test_shard.txt
  254. - bazel test --config=ci $(./ci/run/bazel_export_options)
  255. --test_tag_filters=-post_wheel_build,-py37,-gpu
  256. $(cat test_shard.txt)
  257. - label: ":serverless: Serve Tests (Python 3.7)"
  258. conditions:
  259. [
  260. "RAY_CI_SERVE_AFFECTED",
  261. "RAY_CI_PYTHON_AFFECTED",
  262. ]
  263. instance_size: medium
  264. commands:
  265. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  266. - echo "--- Setting up Python 3.7 environment."
  267. - TORCH_VERSION=1.6 ./ci/env/install-dependencies.sh
  268. # Specifying above somehow messes up the Ray install.
  269. # Uninstall and re-install Ray so that we can use Ray Client.
  270. # (Remove thirdparty_files to sidestep an issue with psutil.)
  271. - pip uninstall -y ray && rm -rf /ray/python/ray/thirdparty_files
  272. - ./ci/ci.sh build
  273. - bazel test --config=ci $(./ci/run/bazel_export_options)
  274. --test_tag_filters=team:serve
  275. python/ray/serve/test_gradio
  276. python/ray/serve/test_gradio_visualization
  277. - label: ":python: Minimal install 3.6"
  278. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  279. instance_size: medium
  280. commands:
  281. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  282. - ./ci/ci.sh test_minimal 3.6
  283. - ./ci/ci.sh test_latest_core_dependencies 3.6
  284. - label: ":python: Minimal install 3.7"
  285. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  286. instance_size: medium
  287. commands:
  288. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  289. - ./ci/ci.sh test_minimal 3.7
  290. - ./ci/ci.sh test_latest_core_dependencies 3.7
  291. - label: ":python: Minimal install 3.8"
  292. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  293. instance_size: medium
  294. commands:
  295. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  296. - ./ci/ci.sh test_minimal 3.8
  297. - ./ci/ci.sh test_latest_core_dependencies 3.8
  298. - label: ":python: Minimal install 3.9"
  299. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  300. instance_size: medium
  301. commands:
  302. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  303. - ./ci/ci.sh test_minimal 3.9
  304. - ./ci/ci.sh test_latest_core_dependencies 3.9
  305. - label: ":python: Minimal install 3.10"
  306. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  307. instance_size: medium
  308. commands:
  309. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  310. - ./ci/ci.sh test_minimal 3.10
  311. - ./ci/ci.sh test_latest_core_dependencies 3.10
  312. - label: ":python: Minimal install 3.11"
  313. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  314. instance_size: medium
  315. commands:
  316. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  317. - ./ci/ci.sh test_minimal 3.11
  318. - ./ci/ci.sh test_latest_core_dependencies 3.11
  319. - label: ":python: Default install"
  320. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  321. instance_size: small
  322. commands:
  323. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  324. - ./ci/env/install-default.sh
  325. - ./ci/env/env_info.sh
  326. - bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
  327. python/ray/dashboard/test_dashboard
  328. - label: ":python: Ray Serve default install"
  329. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  330. instance_size: small
  331. commands:
  332. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  333. - ./ci/env/install-serve.sh
  334. - ./ci/env/env_info.sh
  335. - bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
  336. python/ray/serve/test_deployment_graph
  337. - bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
  338. python/ray/serve/test_api
  339. - label: ":python: (Small & Client)"
  340. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  341. instance_size: medium
  342. commands:
  343. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  344. - DL=1 ./ci/env/install-dependencies.sh
  345. - bash ./ci/ci.sh prepare_docker
  346. - ./ci/env/env_info.sh
  347. - bazel test --config=ci $(./ci/run/bazel_export_options)
  348. --test_tag_filters=client_tests,small_size_python_tests
  349. -- python/ray/tests/...
  350. - bazel test --config=ci $(./ci/run/bazel_export_options)
  351. --test_tag_filters=ray_ha
  352. --test_env=DOCKER_HOST=tcp://docker:2376
  353. --test_env=DOCKER_TLS_VERIFY=1
  354. --test_env=DOCKER_CERT_PATH=/certs/client
  355. --test_env=DOCKER_TLS_CERTDIR=/certs
  356. -- python/ray/tests/...
  357. - label: ":python: (Large)"
  358. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  359. instance_size: large
  360. parallelism: 3
  361. commands:
  362. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  363. - DL=1 ./ci/env/install-dependencies.sh
  364. - ./ci/env/env_info.sh
  365. - ./ci/ci.sh test_large
  366. - label: ":python: (Medium A-J)"
  367. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  368. instance_size: medium
  369. commands:
  370. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  371. - ./ci/env/env_info.sh
  372. - bazel test --config=ci $(./ci/run/bazel_export_options)
  373. --test_tag_filters=-kubernetes,medium_size_python_tests_a_to_j
  374. python/ray/tests/...
  375. - label: ":python: (Medium K-Z)"
  376. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  377. instance_size: medium
  378. commands:
  379. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  380. - DL=1 ./ci/env/install-dependencies.sh
  381. - bazel test --config=ci $(./ci/run/bazel_export_options)
  382. --test_tag_filters=-kubernetes,medium_size_python_tests_k_to_z
  383. python/ray/tests/...
  384. - label: ":redis: (External Redis) (Small & Client)"
  385. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  386. instance_size: medium
  387. commands:
  388. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  389. - DL=1 ./ci/env/install-dependencies.sh
  390. - ./ci/env/env_info.sh
  391. - bazel test --config=ci $(./scripts/bazel_export_options)
  392. --test_tag_filters=client_tests,small_size_python_tests
  393. --test_env=TEST_EXTERNAL_REDIS=1
  394. -- python/ray/tests/...
  395. - label: ":redis: (External Redis) (Large)"
  396. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  397. instance_size: large
  398. parallelism: 3
  399. commands:
  400. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  401. - DL=1 ./ci/env/install-dependencies.sh
  402. - ./ci/env/env_info.sh
  403. - ./ci/ci.sh test_large --test_env=TEST_EXTERNAL_REDIS=1
  404. - label: ":redis: (External Redis) (Medium A-J)"
  405. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  406. instance_size: medium
  407. commands:
  408. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  409. - ./ci/env/env_info.sh
  410. - bazel test --config=ci $(./scripts/bazel_export_options)
  411. --test_tag_filters=-kubernetes,medium_size_python_tests_a_to_j
  412. --test_env=TEST_EXTERNAL_REDIS=1
  413. -- //python/ray/tests/...
  414. - label: ":redis: (External Redis) (Medium K-Z)"
  415. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  416. instance_size: medium
  417. commands:
  418. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  419. - DL=1 ./ci/env/install-dependencies.sh
  420. - ./ci/env/env_info.sh
  421. - bazel test --config=ci $(./scripts/bazel_export_options)
  422. --test_tag_filters=-kubernetes,medium_size_python_tests_k_to_z
  423. --test_env=TEST_EXTERNAL_REDIS=1
  424. -- //python/ray/tests/...
  425. - label: ":python: Debug Test"
  426. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  427. instance_size: medium
  428. commands:
  429. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  430. - pip uninstall -y ray
  431. - RAY_DEBUG_BUILD=debug ./ci/ci.sh build
  432. - ./ci/env/env_info.sh
  433. - bazel test --config=ci-debug $(./ci/run/bazel_export_options)
  434. --test_tag_filters=-kubernetes,debug_tests
  435. python/ray/tests/...
  436. - label: ":python: (ASAN tests)"
  437. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  438. instance_size: medium
  439. commands:
  440. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  441. - RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
  442. - pip install "grpcio >= 1.28.1, <= 1.43.0"
  443. - ./ci/env/env_info.sh
  444. - bazel test --config=ci --config=asan $(./ci/run/bazel_export_options)
  445. --config=asan-buildkite
  446. --test_tag_filters=-kubernetes,asan_tests
  447. --test_env=CONDA_EXE
  448. --test_env=CONDA_PYTHON_EXE
  449. --test_env=CONDA_SHLVL
  450. --test_env=CONDA_PREFIX
  451. --test_env=CONDA_DEFAULT_ENV
  452. python/ray/tests/...
  453. - label: ":python: Ray on Spark Test"
  454. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  455. instance_size: medium
  456. commands:
  457. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  458. - pip uninstall -y ray
  459. - RAY_DEBUG_BUILD=debug ./ci/ci.sh build
  460. - ./ci/env/env_info.sh
  461. - bazel test --config=ci-debug $(./ci/run/bazel_export_options)
  462. --test_env=RAY_ON_SPARK_BACKGROUND_JOB_STARTUP_WAIT=1
  463. --test_env=RAY_ON_SPARK_RAY_WORKER_NODE_STARTUP_INTERVAL=5
  464. --test_tag_filters=-kubernetes,spark_plugin_tests
  465. python/ray/tests/...
  466. # https://github.com/ray-project/ray/issues/22460
  467. #- label: ":python: (Privileged test)"
  468. #conditions: ["RAY_CI_PYTHON_AFFECTED"]
  469. #commands:
  470. #- LINUX_WHEELS=1 ./ci/ci.sh build
  471. #- pip install docker
  472. #We build image ray-worker-container:nightly-py36-cpu which have installed podman,but not push it.
  473. #And we save this image to a tarball, so that we can load it to podman image storage in the
  474. #nested-container which run tests. And in this nested-container, Raylet will start ray worker
  475. #process in double-nested-container.
  476. #- python ./ci/build/build-docker-images.py --py-versions py36 --device-types cpu --build-type BUILDKITE --only-build-worker-container
  477. #- mkdir /ray-mount/containers
  478. #- docker save -o /ray-mount/containers/images.tar rayproject/ray-worker-container:nightly-py36-cpu
  479. #- docker run --rm --privileged -v /ray/containers:/var/lib/containers -v /ray:/ray --entrypoint /bin/bash
  480. #rayproject/ray-worker-container:nightly-py36-cpu /ray/ci/build/test-worker-in-container.sh
  481. - label: ":kubernetes: operator"
  482. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  483. instance_size: medium
  484. commands:
  485. - |
  486. cleanup() {
  487. if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi
  488. python python/ray/tests/kuberay/setup/teardown_kuberay.py || true
  489. kind delete cluster
  490. }
  491. trap cleanup EXIT
  492. - echo "--- Setting up Python 3.7 environment."
  493. - ./ci/env/install-dependencies.sh
  494. # Specifying above somehow messes up the Ray install.
  495. # Uninstall and re-install Ray so that we can use Ray Client.
  496. # (Remove thirdparty_files to sidestep an issue with psutil.)
  497. - pip uninstall -y ray && rm -rf /ray/python/ray/thirdparty_files
  498. - pip install -e /ray/python
  499. - echo "--- Setting up local kind cluster."
  500. - ./ci/k8s/prep-k8s-environment.sh
  501. - echo "--- Building py37-cpu Ray image for the test."
  502. - LINUX_WHEELS=1 ./ci/ci.sh build
  503. - pip install -q docker
  504. - python ci/build/build-docker-images.py --py-versions py37 --device-types cpu --build-type LOCAL --build-base
  505. # Tag the image built in the last step. We want to be sure to distinguish the image from the real Ray nightly.
  506. - docker tag rayproject/ray:nightly-py37-cpu ray-ci:kuberay-test
  507. # Load the image into the kind node.
  508. - kind load docker-image ray-ci:kuberay-test
  509. - echo "--- Setting up KubeRay operator."
  510. - python python/ray/tests/kuberay/setup/setup_kuberay.py
  511. - ./ci/env/env_info.sh
  512. - echo "--- Running the test."
  513. - bazel test --config=ci $(./ci/run/bazel_export_options)
  514. --test_tag_filters=kuberay_operator
  515. --test_env=RAY_IMAGE=docker.io/library/ray-ci:kuberay-test
  516. --test_env=PULL_POLICY=IfNotPresent
  517. --test_env=KUBECONFIG=/root/.kube/config
  518. python/ray/tests/...
  519. - label: ":book: Documentation"
  520. commands:
  521. - export LINT=1
  522. - echo "--- Setting up Python 3.7 environment."
  523. - ./ci/env/install-dependencies.sh
  524. # Specifying above somehow messes up the Ray install.
  525. # Uninstall and re-install Ray so that we can use Ray Client
  526. # (remove thirdparty_files to sidestep an issue with psutil).
  527. - pip uninstall -y ray && rm -rf /ray/python/ray/thirdparty_files
  528. - pushd /ray && git clean -f -f -x -d -e .whl -e python/ray/dashboard/client && popd
  529. - bazel clean --expunge
  530. - export WANDB_MODE=offline
  531. # Horovod needs to be installed separately (needed for API ref imports)
  532. - ./ci/env/install-horovod.sh
  533. # See https://stackoverflow.com/questions/63383400/error-cannot-uninstall-ruamel-yaml-while-creating-docker-image-for-azure-ml-a
  534. - pip install mosaicml==0.10.1 --ignore-installed
  535. - ./ci/ci.sh build
  536. - label: ":octopus: Tune multinode tests"
  537. conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_TUNE_AFFECTED"]
  538. instance_size: medium
  539. commands:
  540. - LINUX_WHEELS=1 ./ci/ci.sh build
  541. - 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
  542. - pip install -U docker aws_requests_auth boto3
  543. - ./ci/env/env_info.sh
  544. - python ./ci/build/build-docker-images.py --py-versions py37 --device-types cpu --build-type LOCAL --build-base
  545. - python ./ci/build/build-multinode-image.py rayproject/ray:nightly-py37-cpu rayproject/ray:multinode-py37
  546. - bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only
  547. --test_tag_filters=multinode,-example,-flaky,-py37,-soft_imports,-gpu_only,-rllib
  548. python/ray/tune/...
  549. --test_env=RAY_HAS_SSH="1"
  550. --test_env=RAY_DOCKER_IMAGE="rayproject/ray:multinode-py37"
  551. --test_env=RAY_TEMPDIR="/ray-mount"
  552. --test_env=RAY_HOSTDIR="/ray"
  553. --test_env=RAY_TESTHOST="dind-daemon"
  554. --test_env=DOCKER_HOST=tcp://docker:2376
  555. --test_env=DOCKER_TLS_VERIFY=1
  556. --test_env=DOCKER_CERT_PATH=/certs/client
  557. --test_env=DOCKER_TLS_CERTDIR=/certs
  558. - label: ":hadoop: Ray AIR HDFS tests"
  559. conditions: ["RAY_CI_ML_AFFECTED"]
  560. instance_size: medium
  561. commands:
  562. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  563. - INSTALL_HDFS=1 ./ci/env/install-dependencies.sh
  564. - ./ci/env/env_info.sh
  565. - cat /tmp/hdfs_env
  566. - bazel test --config=ci $(./ci/run/bazel_export_options) --test_tag_filters=hdfs python/ray/air/...
  567. # Test to see if Train can be used without torch, tf, etc. installed
  568. - label: ":steam_locomotive: Train minimal install"
  569. conditions: ["RAY_CI_TRAIN_AFFECTED"]
  570. instance_size: small
  571. commands:
  572. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  573. - TRAIN_MINIMAL_INSTALL=1 ./ci/env/install-minimal.sh
  574. - ./ci/env/env_info.sh
  575. - python ./ci/env/check_minimal_install.py
  576. - bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=minimal python/ray/train/...
  577. - label: ":cold_face: :python: Ray Python 3.6 ML compatibility tests"
  578. conditions:
  579. ["ALWAYS", "RAY_CI_TUNE_AFFECTED", "RAY_CI_TRAIN_AFFECTED", "RAY_CI_ML_AFFECTED", ]
  580. instance_size: large
  581. commands:
  582. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  583. - ./ci/env/install-minimal.sh 3.6
  584. - pip install -r python/requirements/compat/requirements_py36_compat.txt
  585. - pip install -U typing-extensions
  586. - HOROVOD_WITH_GLOO=1 HOROVOD_WITHOUT_MPI=1 HOROVOD_WITHOUT_MXNET=1 HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 pip install horovod
  587. - ./ci/env/env_info.sh
  588. - bazel test --config=ci $(./scripts/bazel_export_options) --test_tag_filters=compat_py36
  589. python/ray/tests/horovod/...
  590. python/ray/tests/lightgbm/...
  591. python/ray/tests/ml_py36_compat/...
  592. python/ray/tests/xgboost/...
  593. - label: ":cold_face: :python: Ray Python legacy dependency ML compatibility tests"
  594. conditions:
  595. ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_TUNE_AFFECTED", "RAY_CI_TRAIN_AFFECTED", "RAY_CI_ML_AFFECTED"]
  596. instance_size: large
  597. parallelism: 2
  598. commands:
  599. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  600. - ./ci/env/install-minimal.sh 3.7
  601. - DATA_PROCESSING_TESTING=1 TUNE_TESTING=1 TRAIN_TESTING=1 INSTALL_HDFS=1 ./ci/env/install-dependencies.sh
  602. - pip install -r python/requirements/compat/requirements_legacy_compat.txt
  603. - pip install -U typing-extensions
  604. - HOROVOD_WITH_GLOO=1 HOROVOD_WITHOUT_MPI=1 HOROVOD_WITHOUT_MXNET=1 HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 pip install horovod
  605. - ./ci/env/env_info.sh
  606. # Combine shards from different files
  607. - >-
  608. set -x;
  609. {
  610. 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_py36_compat/... python/ray/tests/xgboost/... python/ray/tests/ray_lightning/... &&
  611. 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/... &&
  612. 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/... &&
  613. 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/...;
  614. } > test_shard.txt
  615. - cat test_shard.txt
  616. - bazel test --config=ci $(./ci/run/bazel_export_options)
  617. $(cat test_shard.txt)