pipeline.yml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. - label: ":ferris_wheel: Wheels and Jars"
  2. conditions:
  3. [
  4. "RAY_CI_LINUX_WHEELS_AFFECTED",
  5. "RAY_CI_JAVA_AFFECTED",
  6. ]
  7. commands:
  8. # Build the wheels and jars
  9. - UPLOAD_WHEELS_AS_ARTIFACTS=1 LINUX_WHEELS=1 LINUX_JARS=1 ./ci/ci.sh build
  10. - bash ./java/build-jar-multiplatform.sh linux
  11. # Upload the wheels and jars
  12. # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
  13. - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
  14. - pip install -q docker aws_requests_auth boto3
  15. # Upload to branch directory.
  16. - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
  17. - python .buildkite/copy_files.py --destination branch_jars --path ./.jar/linux
  18. # Upload to latest directory.
  19. - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
  20. - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination jars --path ./.jar/linux; fi
  21. - label: ":ferris_wheel: Post-wheel tests"
  22. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  23. commands:
  24. - LINUX_WHEELS=1 ./ci/ci.sh build
  25. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  26. - bazel test --config=ci $(./ci/run/bazel_export_options)
  27. --test_tag_filters=post_wheel_build
  28. --test_env=CONDA_EXE
  29. --test_env=CONDA_PYTHON_EXE
  30. --test_env=CONDA_SHLVL
  31. --test_env=CONDA_PREFIX
  32. --test_env=CONDA_DEFAULT_ENV
  33. --test_env=CI
  34. --test_env=RAY_CI_POST_WHEEL_TESTS=True
  35. python/ray/tests/... python/ray/serve/... python/ray/tune/... rllib/... doc/...
  36. - label: ":ferris_wheel: Debug Wheels"
  37. conditions:
  38. [
  39. "RAY_CI_LINUX_WHEELS_AFFECTED",
  40. "RAY_CI_JAVA_AFFECTED",
  41. ]
  42. commands:
  43. # Build the debug wheels
  44. - RAY_DEBUG_BUILD=debug LINUX_WHEELS=1 ./ci/ci.sh build
  45. # Upload the wheels.
  46. # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
  47. - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
  48. - pip install -q docker aws_requests_auth boto3
  49. # Upload to branch directory.
  50. - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
  51. # Upload to latest directory.
  52. - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
  53. # Not working now.
  54. # - label: ":ferris_wheel: ASAN Wheels"
  55. # conditions:
  56. # [
  57. # "RAY_CI_LINUX_WHEELS_AFFECTED",
  58. # "RAY_CI_JAVA_AFFECTED",
  59. # ]
  60. # commands:
  61. # # Build the asan wheels
  62. # - RAY_DEBUG_BUILD=asan LINUX_WHEELS=1 ./ci/ci.sh build
  63. # # Upload the wheels.
  64. # # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
  65. # - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
  66. # - pip install -q docker aws_requests_auth boto3
  67. # # Upload to branch directory.
  68. # - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
  69. # # Upload to latest directory.
  70. # - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
  71. - label: ":docker: Build Images: py36 (1/2)"
  72. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  73. commands:
  74. - LINUX_WHEELS=1 ./ci/ci.sh build
  75. - pip install -q docker aws_requests_auth boto3
  76. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  77. - python ./ci/build/build-docker-images.py --py-versions py36 --device-types cpu cu101 cu102 --build-type BUILDKITE --build-base
  78. - label: ":docker: Build Images: py36 (2/2)"
  79. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  80. commands:
  81. - LINUX_WHEELS=1 ./ci/ci.sh build
  82. - pip install -q docker aws_requests_auth boto3
  83. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  84. - python ./ci/build/build-docker-images.py --py-versions py36 --device-types cu110 cu111 cu112 --build-type BUILDKITE --build-base
  85. - label: ":docker: Build Images: py37 (1/2)"
  86. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  87. commands:
  88. - LINUX_WHEELS=1 ./ci/ci.sh build
  89. - pip install -q docker aws_requests_auth boto3
  90. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  91. - python ./ci/build/build-docker-images.py --py-versions py37 --device-types cpu cu101 cu102 --build-type BUILDKITE --build-base
  92. - label: ":docker: Build Images: py37 (2/2)"
  93. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  94. commands:
  95. - LINUX_WHEELS=1 ./ci/ci.sh build
  96. - pip install -q docker aws_requests_auth boto3
  97. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  98. - python ./ci/build/build-docker-images.py --py-versions py37 --device-types cu110 cu111 cu112 --build-type BUILDKITE --build-base
  99. - label: ":docker: Build Images: py38 (1/2)"
  100. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  101. commands:
  102. - LINUX_WHEELS=1 ./ci/ci.sh build
  103. - pip install -q docker aws_requests_auth boto3
  104. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  105. - python ./ci/build/build-docker-images.py --py-versions py38 --device-types cpu cu101 cu102 --build-type BUILDKITE --build-base
  106. - label: ":docker: Build Images: py38 (2/2)"
  107. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  108. commands:
  109. - LINUX_WHEELS=1 ./ci/ci.sh build
  110. - pip install -q docker aws_requests_auth boto3
  111. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  112. - python ./ci/build/build-docker-images.py --py-versions py38 --device-types cu110 cu111 cu112 --build-type BUILDKITE --build-base
  113. - label: ":docker: Build Images: py39 (1/2)"
  114. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  115. commands:
  116. - LINUX_WHEELS=1 ./ci/ci.sh build
  117. - pip install -q docker aws_requests_auth boto3
  118. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  119. - python ./ci/build/build-docker-images.py --py-versions py39 --device-types cpu cu101 cu102 --build-type BUILDKITE --build-base
  120. - label: ":docker: Build Images: py39 (2/2)"
  121. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  122. commands:
  123. - LINUX_WHEELS=1 ./ci/ci.sh build
  124. - pip install -q docker aws_requests_auth boto3
  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 cu110 cu111 cu112 --build-type BUILDKITE --build-base
  127. - label: ":docker: Build Images: py310"
  128. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  129. commands:
  130. - LINUX_WHEELS=1 ./ci/ci.sh build
  131. - pip install -q docker aws_requests_auth boto3
  132. - if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
  133. - python ./ci/build/build-docker-images.py --py-versions py310 --device-types cpu --build-type BUILDKITE --build-base
  134. - label: ":book: Lint"
  135. commands:
  136. - export LINT=1
  137. - ./ci/env/install-dependencies.sh
  138. - ./ci/ci.sh lint
  139. - ./ci/ci.sh build
  140. - label: ":book: LinkCheck"
  141. commands:
  142. - export LINT=1
  143. - ./ci/env/install-dependencies.sh
  144. - ./ci/ci.sh check_sphinx_links
  145. soft_fail: True
  146. - label: ":java: Java"
  147. conditions: ["RAY_CI_JAVA_AFFECTED"]
  148. commands:
  149. - ./java/test.sh
  150. - label: ":cpp: Ray CPP Worker"
  151. conditions: [ "RAY_CI_CPP_AFFECTED" ]
  152. commands:
  153. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  154. - ./ci/ci.sh test_cpp
  155. - label: ":cpp: Tests"
  156. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  157. commands:
  158. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  159. - bazel test --config=ci --config=llvm $(./ci/run/bazel_export_options)
  160. --build_tests_only
  161. -- //:all -rllib/... -core_worker_test
  162. - label: ":cpp: Tests (ASAN)"
  163. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  164. commands:
  165. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  166. - bazel test --config=ci --config=asan-clang $(./ci/run/bazel_export_options)
  167. --build_tests_only
  168. --jobs=2
  169. -- //:all -//:core_worker_test
  170. - label: ":cpp: Tests (UBSAN)"
  171. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  172. commands:
  173. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  174. - bazel test --config=ci --config=ubsan $(./ci/run/bazel_export_options)
  175. --build_tests_only
  176. --jobs=2
  177. -- //:all -//:core_worker_test -//:logging_test -//:ray_syncer_test
  178. - label: ":cpp: Tests (TSAN)"
  179. conditions: [ "RAY_CI_CORE_CPP_AFFECTED" ]
  180. commands:
  181. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  182. - bazel test --config=ci --config=tsan-clang $(./ci/run/bazel_export_options)
  183. --build_tests_only
  184. --jobs=2
  185. -- //:all -//:core_worker_test -//:event_test -//:gcs_actor_manager_test
  186. -//:gcs_placement_group_manager_test -//:gcs_placement_group_scheduler_test
  187. -//:gcs_server_rpc_test -//:gcs_client_test
  188. -//:metric_exporter_client_test -//:stats_test -//:worker_pool_test
  189. -//:ray_syncer_test
  190. - label: ":serverless: Dashboard Tests"
  191. conditions:
  192. [
  193. "RAY_CI_DASHBOARD_AFFECTED",
  194. "RAY_CI_PYTHON_AFFECTED",
  195. ]
  196. commands:
  197. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  198. - ./dashboard/tests/run_ui_tests.sh
  199. - bazel test --config=ci $(./ci/run/bazel_export_options) python/ray/dashboard/...
  200. - label: ":serverless: Serve Release Tests"
  201. conditions:
  202. [
  203. "RAY_CI_SERVE_AFFECTED",
  204. "RAY_CI_PYTHON_AFFECTED",
  205. ]
  206. commands:
  207. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  208. - TORCH_VERSION=1.6 ./ci/env/install-dependencies.sh
  209. - 'git clone https://github.com/wg/wrk.git /tmp/wrk && pushd /tmp/wrk && make -j && sudo cp wrk /usr/local/bin && popd'
  210. - bazel test --config=ci $(./ci/run/bazel_export_options)
  211. --test_tag_filters=team:serve
  212. release/...
  213. - label: ":serverless: Serve Tests"
  214. parallelism: 3
  215. conditions:
  216. [
  217. "RAY_CI_SERVE_AFFECTED",
  218. "RAY_CI_PYTHON_AFFECTED",
  219. ]
  220. commands:
  221. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  222. - TORCH_VERSION=1.6 ./ci/env/install-dependencies.sh
  223. - 'git clone https://github.com/wg/wrk.git /tmp/wrk && pushd /tmp/wrk && make -j && sudo cp wrk /usr/local/bin && popd'
  224. - >-
  225. set -x;
  226. python ./ci/run/bazel-sharding.py
  227. --exclude_manual
  228. --index "\${BUILDKITE_PARALLEL_JOB}" --count "\${BUILDKITE_PARALLEL_JOB_COUNT}"
  229. python/ray/serve/...
  230. > test_shard.txt
  231. - cat test_shard.txt
  232. - bazel test --config=ci $(./ci/run/bazel_export_options)
  233. --test_tag_filters=-post_wheel_build
  234. $(cat test_shard.txt)
  235. - label: ":python: Minimal install 3.6"
  236. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  237. commands:
  238. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  239. - ./ci/ci.sh test_minimal 3.6
  240. - label: ":python: Minimal install 3.7"
  241. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  242. commands:
  243. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  244. - ./ci/ci.sh test_minimal 3.7
  245. - label: ":python: Minimal install 3.8"
  246. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  247. commands:
  248. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  249. - ./ci/ci.sh test_minimal 3.8
  250. - label: ":python: Minimal install 3.9"
  251. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  252. commands:
  253. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  254. - ./ci/ci.sh test_minimal 3.9
  255. - label: ":python: Default install"
  256. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  257. commands:
  258. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  259. - ./ci/env/install-default.sh
  260. - ./ci/env/env_info.sh
  261. - bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
  262. python/ray/dashboard/test_dashboard
  263. - label: ":python: Release test package unit tests"
  264. conditions: ["ALWAYS"]
  265. commands:
  266. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  267. - pip install -e release/
  268. - bazel test --config=ci $(./ci/run/bazel_export_options)
  269. --build_tests_only
  270. --test_tag_filters=release_unit
  271. release/...
  272. - label: ":python: (Small & Client)"
  273. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  274. commands:
  275. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  276. - bash ./ci/ci.sh prepare_docker
  277. - bazel test --config=ci $(./ci/run/bazel_export_options)
  278. --test_tag_filters=client_tests,small_size_python_tests
  279. -- python/ray/tests/...
  280. - bazel test --config=ci $(./ci/run/bazel_export_options)
  281. --test_tag_filters=ray_ha
  282. --test_env=DOCKER_HOST=tcp://docker:2376
  283. --test_env=DOCKER_TLS_VERIFY=1
  284. --test_env=DOCKER_CERT_PATH=/certs/client
  285. --test_env=DOCKER_TLS_CERTDIR=/certs
  286. -- python/ray/tests/...
  287. - label: ":python: (Large)"
  288. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  289. parallelism: 3
  290. commands:
  291. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  292. - . ./ci/ci.sh test_large
  293. - label: ":python: (Medium A-J)"
  294. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  295. commands:
  296. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  297. - bazel test --config=ci $(./ci/run/bazel_export_options)
  298. --test_tag_filters=-kubernetes,medium_size_python_tests_a_to_j
  299. python/ray/tests/...
  300. - label: ":python: (Medium K-Z)"
  301. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  302. commands:
  303. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  304. - bazel test --config=ci $(./ci/run/bazel_export_options)
  305. --test_tag_filters=-kubernetes,medium_size_python_tests_k_to_z
  306. python/ray/tests/...
  307. - label: ":redis: (External Redis) (Small & Client)"
  308. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  309. commands:
  310. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  311. - bazel test --config=ci $(./scripts/bazel_export_options)
  312. --test_tag_filters=client_tests,small_size_python_tests
  313. --test_env=TEST_EXTERNAL_REDIS=1
  314. -- python/ray/tests/...
  315. - label: ":redis: (External Redis) (Large)"
  316. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  317. parallelism: 3
  318. commands:
  319. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  320. - TEST_EXTERNAL_REDIS=1 . ./ci/ci.sh test_large
  321. - label: ":redis: (External Redis) (Medium A-J)"
  322. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  323. commands:
  324. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  325. - bazel test --config=ci $(./scripts/bazel_export_options)
  326. --test_tag_filters=-kubernetes,medium_size_python_tests_a_to_j
  327. --test_env=TEST_EXTERNAL_REDIS=1
  328. -- //python/ray/tests/...
  329. - label: ":redis: (External Redis) (Medium K-Z)"
  330. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  331. commands:
  332. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  333. - bazel test --config=ci $(./scripts/bazel_export_options)
  334. --test_tag_filters=-kubernetes,medium_size_python_tests_k_to_z
  335. --test_env=TEST_EXTERNAL_REDIS=1
  336. -- //python/ray/tests/...
  337. - label: ":python: Debug Test"
  338. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  339. commands:
  340. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  341. - pip uninstall -y ray
  342. - RAY_DEBUG_BUILD=debug ./ci/ci.sh build
  343. - bazel test --config=ci-debug $(./ci/run/bazel_export_options)
  344. --test_tag_filters=-kubernetes,debug_tests
  345. python/ray/tests/...
  346. - label: ":python: (ASAN tests)"
  347. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  348. commands:
  349. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  350. - RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
  351. - pip install "grpcio >= 1.28.1, <= 1.43.0"
  352. - bazel test --config=ci --config=asan $(./ci/run/bazel_export_options)
  353. --config=asan-buildkite
  354. --test_tag_filters=-kubernetes,asan_tests
  355. --test_env=CONDA_EXE
  356. --test_env=CONDA_PYTHON_EXE
  357. --test_env=CONDA_SHLVL
  358. --test_env=CONDA_PREFIX
  359. --test_env=CONDA_DEFAULT_ENV
  360. python/ray/tests/...
  361. - label: ":construction: :python: (syncer) (Small & Client)"
  362. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  363. commands:
  364. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  365. - bazel test --config=ci $(./scripts/bazel_export_options)
  366. --test_tag_filters=client_tests,small_size_python_tests
  367. --test_env=RAY_use_ray_syncer=true
  368. -- python/ray/tests/...
  369. - label: ":construction: :python: (syncer) (Large)"
  370. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  371. parallelism: 3
  372. commands:
  373. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  374. - RAY_use_ray_syncer=true . ./ci/ci.sh test_large --define=RAY_STAGING_TESTS=1
  375. - label: ":construction: :python: (syncer) (Medium A-J)"
  376. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  377. commands:
  378. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  379. - bazel test --config=ci $(./scripts/bazel_export_options)
  380. --test_tag_filters=-kubernetes,medium_size_python_tests_a_to_j
  381. --test_env=RAY_use_ray_syncer=true --define=RAY_STAGING_TESTS=1
  382. -- python/ray/tests/... -//python/ray/tests:test_actor_resources
  383. - label: ":construction: :python: (syncer) (Medium K-Z)"
  384. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  385. commands:
  386. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  387. - bazel test --config=ci $(./scripts/bazel_export_options)
  388. --test_tag_filters=-kubernetes,medium_size_python_tests_k_to_z
  389. --test_env=RAY_use_ray_syncer=true --define=RAY_STAGING_TESTS=1
  390. python/ray/tests/...
  391. # https://github.com/ray-project/ray/issues/22460
  392. #- label: ":python: (Privileged test)"
  393. #conditions: ["RAY_CI_PYTHON_AFFECTED"]
  394. #commands:
  395. #- LINUX_WHEELS=1 ./ci/ci.sh build
  396. #- pip install docker
  397. #We build image ray-worker-container:nightly-py36-cpu which have installed podman,but not push it.
  398. #And we save this image to a tarball, so that we can load it to podman image storage in the
  399. #nested-container which run tests. And in this nested-container, Raylet will start ray worker
  400. #process in double-nested-container.
  401. #- python ./ci/build/build-docker-images.py --py-versions py36 --device-types cpu --build-type BUILDKITE --only-build-worker-container
  402. #- mkdir /ray-mount/containers
  403. #- docker save -o /ray-mount/containers/images.tar rayproject/ray-worker-container:nightly-py36-cpu
  404. #- docker run --rm --privileged -v /ray/containers:/var/lib/containers -v /ray:/ray --entrypoint /bin/bash
  405. #rayproject/ray-worker-container:nightly-py36-cpu /ray/ci/build/test-worker-in-container.sh
  406. - label: ":octopus: Tune soft imports test"
  407. conditions: ["RAY_CI_TUNE_AFFECTED"]
  408. commands:
  409. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  410. # no TUNE_TESTING=1 on purpose
  411. - ./ci/env/install-dependencies.sh
  412. - bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=soft_imports python/ray/tune/...
  413. # Test to see if Train can be used without torch, tf, etc. installed
  414. - label: ":steam_locomotive: Train minimal install"
  415. conditions: ["RAY_CI_TRAIN_AFFECTED"]
  416. commands:
  417. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  418. - TRAIN_MINIMAL_INSTALL=1 ./ci/env/install-minimal.sh
  419. - ./ci/env/env_info.sh
  420. - python ./ci/env/check_minimal_install.py
  421. - bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=minimal python/ray/train/...
  422. - label: ":kubernetes: operator"
  423. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  424. commands:
  425. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  426. - echo "--- Setting up Python 3.7 environment."
  427. - PYTHON=3.7 ./ci/env/install-dependencies.sh
  428. # Specifying PYTHON=3.7 above somehow messes up the Ray install.
  429. # Uninstall and re-install Ray so that we can use Ray Client.
  430. # (Remove thirdparty_files to sidestep an issue with psutil.)
  431. - pip uninstall -y ray && rm -rf /ray/python/ray/thirdparty_files
  432. - pip install -e /ray/python
  433. - echo "--- Setting up local kind cluster."
  434. - ./ci/k8s/prep-k8s-environment.sh
  435. - echo "--- Building py37-cpu Ray image for the test."
  436. - LINUX_WHEELS=1 ./ci/ci.sh build
  437. - pip install -q docker
  438. - python ci/build/build-docker-images.py --py-versions py37 --device-types cpu --build-type LOCAL --build-base
  439. # Tag the image built in the last step. We want to be sure to distinguish the image from the real Ray nightly.
  440. - docker tag rayproject/ray:nightly-py37-cpu ray-ci:kuberay-test
  441. # Load the image into the kind node.
  442. - kind load docker-image ray-ci:kuberay-test
  443. - echo "--- Running the test."
  444. - bazel test --config=ci $(./ci/run/bazel_export_options)
  445. --test_tag_filters=kuberay_operator
  446. --test_env=RAY_IMAGE=docker.io/library/ray-ci:kuberay-test
  447. --test_env=PULL_POLICY=IfNotPresent
  448. --test_env=KUBECONFIG=/root/.kube/config
  449. python/ray/tests/...
  450. - label: ":python: Ray DAG Tests"
  451. conditions:
  452. [
  453. "RAY_CI_PYTHON_AFFECTED",
  454. ]
  455. commands:
  456. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
  457. - pip install -U pydot
  458. - sudo apt-get install -y graphviz
  459. - bazel test --config=ci $(./scripts/bazel_export_options)
  460. --test_tag_filters=ray_dag_tests
  461. python/ray/dag/...