pipeline.yml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. - label: ":ferris_wheel: Wheels and Jars"
  2. conditions:
  3. [
  4. "RAY_CI_LINUX_WHEELS_AFFECTED",
  5. "RAY_CI_JAVA_AFFECTED",
  6. "RAY_CI_STREAMING_JAVA_AFFECTED",
  7. ]
  8. commands:
  9. # Build the wheels and jars
  10. - LINUX_WHEELS=1 LINUX_JARS=1 ./ci/travis/ci.sh build
  11. - bash ./java/build-jar-multiplatform.sh linux
  12. # Upload the wheels and jars
  13. # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
  14. - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
  15. - pip install -q docker aws_requests_auth boto3
  16. - python .buildkite/copy_files.py --destination wheels --path ./.whl
  17. - python .buildkite/copy_files.py --destination wheels --path ./.jar/linux
  18. - label: ":ferris_wheel: Post-wheel tests"
  19. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  20. commands:
  21. - LINUX_WHEELS=1 ./ci/travis/ci.sh build
  22. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  23. - bazel test --config=ci $(./scripts/bazel_export_options)
  24. --test_tag_filters=post_wheel_build
  25. --test_env=CONDA_EXE
  26. --test_env=CONDA_PYTHON_EXE
  27. --test_env=CONDA_SHLVL
  28. --test_env=CONDA_PREFIX
  29. --test_env=CONDA_DEFAULT_ENV
  30. --test_env=CI
  31. --test_env=RAY_CI_POST_WHEEL_TESTS=True
  32. python/ray/tests/... python/ray/serve/... python/ray/tune/... rllib/...
  33. - label: ":docker: Build Images"
  34. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  35. commands:
  36. - LINUX_WHEELS=1 ./ci/travis/ci.sh build
  37. - pip install docker
  38. - python ./ci/travis/build-docker-images.py --py-versions PY37 --build-type BUILDKITE --build-base
  39. - label: ":docker: Build Images"
  40. conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
  41. commands:
  42. - LINUX_WHEELS=1 ./ci/travis/ci.sh build
  43. - pip install docker
  44. - python ./ci/travis/build-docker-images.py --py-versions PY36 PY38 --build-type BUILDKITE --build-base
  45. - label: ":book: Lint"
  46. commands:
  47. - export LINT=1
  48. - ./ci/travis/install-dependencies.sh
  49. - ./ci/travis/ci.sh lint
  50. - ./ci/travis/ci.sh build
  51. - label: ":java: Java"
  52. conditions: ["RAY_CI_JAVA_AFFECTED"]
  53. commands:
  54. - ./java/test.sh
  55. - label: ":java: Streaming"
  56. conditions:
  57. ["RAY_CI_STREAMING_PYTHON_AFFECTED", "RAY_CI_STREAMING_JAVA_AFFECTED"]
  58. commands:
  59. - bazel test --config=ci $(./scripts/bazel_export_options)
  60. //streaming:all
  61. - bash streaming/src/test/run_streaming_queue_test.sh
  62. - label: ":cpp: Worker"
  63. commands:
  64. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  65. - ./ci/travis/ci.sh test_cpp
  66. - label: ":cpp: Tests"
  67. commands:
  68. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  69. - bazel test --config=ci $(./scripts/bazel_export_options)
  70. --build_tests_only
  71. --test_tag_filters=-flaky
  72. -- //:all -rllib/... -core_worker_test
  73. - label: ":cpp: Tests (ASAN)"
  74. commands:
  75. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  76. - bazel test --config=ci --config=asan $(./scripts/bazel_export_options)
  77. --build_tests_only
  78. --config=asan-buildkite
  79. --jobs=2
  80. --test_tag_filters=-flaky
  81. -- //:all -//:core_worker_test
  82. - label: ":serverless: Dashboard + Serve Tests"
  83. conditions:
  84. [
  85. "RAY_CI_SERVE_AFFECTED",
  86. "RAY_CI_DASHBOARD_AFFECTED",
  87. "RAY_CI_PYTHON_AFFECTED",
  88. ]
  89. commands:
  90. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  91. - TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
  92. - ./dashboard/tests/run_ui_tests.sh
  93. - bazel test --config=ci $(./scripts/bazel_export_options) python/ray/new_dashboard/...
  94. - bazel test --config=ci $(./scripts/bazel_export_options) python/ray/serve/...
  95. - label: ":python: (Flaky tests)"
  96. conditions: ["RAY_CI_PYTHON_AFFECTED", "RAY_CI_SERVE_AFFECTED", "RAY_CI_RLLIB_AFFECTED", "RAY_CI_TUNE_AFFECTED"]
  97. commands:
  98. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  99. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  100. # - bazel test --config=ci $(./scripts/bazel_export_options)
  101. # --build_tests_only
  102. # --test_tag_filters=flaky
  103. # -- //:all -rllib/... -core_worker_test
  104. - bazel test --config=ci $(./scripts/bazel_export_options)
  105. --test_tag_filters=-kubernetes,-jenkins_only,flaky
  106. --test_env=CONDA_EXE
  107. --test_env=CONDA_PYTHON_EXE
  108. --test_env=CONDA_SHLVL
  109. --test_env=CONDA_PREFIX
  110. --test_env=CONDA_DEFAULT_ENV
  111. python/ray/tests/... python/ray/serve/... python/ray/tune/... rllib/...
  112. - label: ":python: (Small & Large)"
  113. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  114. commands:
  115. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  116. - bazel test --config=ci $(./scripts/bazel_export_options)
  117. --test_tag_filters=-kubernetes,-jenkins_only,-medium_size_python_tests_a_to_j,-medium_size_python_tests_k_to_z,-flaky,-post_wheel_build
  118. --test_env=CONDA_EXE
  119. --test_env=CONDA_PYTHON_EXE
  120. --test_env=CONDA_SHLVL
  121. --test_env=CONDA_PREFIX
  122. --test_env=CONDA_DEFAULT_ENV
  123. python/ray/tests/...
  124. - bazel test --config=ci $(./scripts/bazel_export_options)
  125. --test_tag_filters=-kubernetes,-jenkins_only,client_tests,-flaky
  126. --test_env=RAY_CLIENT_MODE=1
  127. python/ray/tests/...
  128. - label: ":python: (Medium A-J)"
  129. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  130. commands:
  131. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  132. - bazel test --config=ci $(./scripts/bazel_export_options)
  133. --test_tag_filters=-kubernetes,-jenkins_only,medium_size_python_tests_a_to_j,-flaky
  134. python/ray/tests/...
  135. - label: ":python: (Medium K-Z)"
  136. conditions: ["RAY_CI_PYTHON_AFFECTED"]
  137. commands:
  138. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  139. - bazel test --config=ci $(./scripts/bazel_export_options)
  140. --test_tag_filters=-kubernetes,-jenkins_only,medium_size_python_tests_k_to_z,-flaky
  141. python/ray/tests/...
  142. - label: ":brain: RLlib: Learning tests (from rllib/tuned_examples/*.yaml)"
  143. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  144. commands:
  145. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  146. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  147. - bazel test --config=ci $(./scripts/bazel_export_options)
  148. --build_tests_only
  149. --test_tag_filters=learning_tests_tf,-flaky
  150. rllib/...
  151. - label: ":brain: RLlib: Learning tests with tf=1.x (from rllib/tuned_examples/*.yaml)"
  152. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  153. commands:
  154. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  155. - RLLIB_TESTING=1 TF_VERSION=1.14.0 TFP_VERSION=0.7 ./ci/travis/install-dependencies.sh
  156. - bazel test --config=ci $(./scripts/bazel_export_options)
  157. --build_tests_only
  158. --test_tag_filters=learning_tests_tf,-flaky
  159. rllib/...
  160. - label: ":brain: RLlib: Learning tests with Torch (from rllib/tuned_examples/*.yaml)"
  161. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  162. commands:
  163. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  164. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  165. - bazel test --config=ci $(./scripts/bazel_export_options)
  166. --build_tests_only
  167. --test_tag_filters=learning_tests_torch,-flaky
  168. rllib/...
  169. - label: ":brain: RLlib: Quick Agent train.py runs"
  170. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  171. commands:
  172. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  173. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  174. - bazel test --config=ci $(./scripts/bazel_export_options)
  175. --build_tests_only
  176. --test_tag_filters=quick_train,-flaky
  177. --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
  178. rllib/...
  179. - label: ":brain: RLlib: everything else"
  180. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  181. commands:
  182. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  183. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  184. # Test everything that does not have any of the "main" labels:
  185. # "learning_tests|quick_train|examples|tests_dir".
  186. - bazel test --config=ci $(./scripts/bazel_export_options)
  187. --build_tests_only
  188. --test_tag_filters=-learning_tests_tf,-learning_tests_torch,-quick_train,-examples,-tests_dir,-flaky
  189. --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
  190. rllib/...
  191. - label: ":brain: RLlib: rllib/examples/ {1/2}"
  192. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  193. commands:
  194. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  195. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  196. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
  197. --test_tag_filters=examples_A,examples_B,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1 rllib/...
  198. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
  199. --test_tag_filters=examples_C,examples_D,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1 rllib/...
  200. - label: ":brain: RLlib: rllib/examples/ {2/2}"
  201. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  202. commands:
  203. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  204. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  205. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
  206. --test_tag_filters=examples_E,examples_F,examples_G,examples_H,examples_I,examples_J,examples_K,examples_L,examples_M,examples_N,examples_O,examples_P,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
  207. rllib/...
  208. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
  209. --test_tag_filters=examples_Q,examples_R,examples_S,examples_T,examples_U,examples_V,examples_W,examples_X,examples_Y,examples_Z,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
  210. rllib/...
  211. - label: ":brain: RLlib: rllib/tests/ (A-L)"
  212. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  213. commands:
  214. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  215. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  216. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
  217. --test_tag_filters=tests_dir_A,tests_dir_B,tests_dir_C,tests_dir_D,tests_dir_E,tests_dir_F,tests_dir_G,tests_dir_H,tests_dir_I,tests_dir_J,tests_dir_K,tests_dir_L,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
  218. rllib/...
  219. - label: ":brain: RLlib: rllib/tests/ (M-Z)"
  220. conditions: ["RAY_CI_RLLIB_AFFECTED"]
  221. commands:
  222. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  223. - RLLIB_TESTING=1 ./ci/travis/install-dependencies.sh
  224. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
  225. --test_tag_filters=tests_dir_M,tests_dir_N,tests_dir_O,tests_dir_P,tests_dir_Q,tests_dir_R,tests_dir_S,tests_dir_T,tests_dir_U,tests_dir_V,tests_dir_W,tests_dir_X,tests_dir_Y,tests_dir_Z,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
  226. rllib/...
  227. - label: ":octopus: Tune tests and examples {1/2}"
  228. conditions: ["RAY_CI_TUNE_AFFECTED"]
  229. commands:
  230. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  231. - TUNE_TESTING=1 ./ci/travis/install-dependencies.sh
  232. - bazel test --config=ci $(./scripts/bazel_export_options) --test_tag_filters=-jenkins_only,-example,-flaky python/ray/tune/...
  233. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=example,-tf,-pytorch,-py37,-flaky python/ray/tune/...
  234. - label: ":octopus: Tune tests and examples {2/2}"
  235. conditions: ["RAY_CI_TUNE_AFFECTED"]
  236. commands:
  237. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  238. - TUNE_TESTING=1 ./ci/travis/install-dependencies.sh
  239. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=tf,-pytorch,-py37,-flaky python/ray/tune/...
  240. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,pytorch,-py37,-flaky python/ray/tune/...
  241. - label: ":octopus: SGD tests and examples"
  242. conditions: ["RAY_CI_SGD_AFFECTED"]
  243. commands:
  244. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  245. - SGD_TESTING=1 ./ci/travis/install-dependencies.sh
  246. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=tf,-pytorch,-py37,-flaky python/ray/util/sgd/...
  247. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,pytorch,-py37,-flaky python/ray/util/sgd/...
  248. - label: ":octopus: Tune/SGD tests and examples. Python 3.7"
  249. conditions: ["RAY_CI_TUNE_AFFECTED", "RAY_CI_SGD_AFFECTED"]
  250. commands:
  251. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  252. - TUNE_TESTING=1 PYTHON=3.7 INSTALL_HOROVOD=1 ./ci/travis/install-dependencies.sh
  253. # Because Python version changed, we need to re-install Ray here
  254. - rm -rf ./python/ray/thirdparty_files; ./ci/travis/ci.sh build
  255. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=py37,-flaky python/ray/tune/...
  256. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only python/ray/util/xgboost/...
  257. - label: ":book: Doc tests and examples"
  258. conditions:
  259. ["RAY_CI_PYTHON_AFFECTED", "RAY_CI_TUNE_AFFECTED", "RAY_CI_DOC_AFFECTED"]
  260. commands:
  261. - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
  262. - DOC_TESTING=1 ./ci/travis/install-dependencies.sh
  263. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,-pytorch,-py37 doc/...
  264. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=tf,-pytorch,-py37 doc/...
  265. - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,pytorch,-py37 doc/...