File tree Expand file tree Collapse file tree 5 files changed +39
-18
lines changed
Expand file tree Collapse file tree 5 files changed +39
-18
lines changed Original file line number Diff line number Diff line change @@ -237,5 +237,6 @@ try-import %workspace%/.user.bazelrc
237237# It picks up the system headers when someone has protobuf installed via Homebrew.
238238# Work around for https://github.com/bazelbuild/bazel/issues/8053
239239build:macos --sandbox_block_path=/usr/local/
240+ build:macos --copt="-Wno-error=deprecated-declarations"
240241# This option controls whether javac checks for missing direct dependencies.
241242build --experimental_strict_java_deps=off
Original file line number Diff line number Diff line change 8888 - macos_wheels
8989 - oss
9090 job_env : MACOS
91- instance_type : macos
91+ instance_type : macos-arm64
9292 commands :
93- - RAY_INSTALL_JAVA=1 ./ci/ray_ci/macos/macos_ci.sh run_ray_cpp_and_java
93+ - RAY_INSTALL_JAVA=0 ./ci/ray_ci/macos/macos_ci.sh run_ray_cpp
9494
9595 - label : " :ray: core: :mac: flaky tests"
9696 key : macos_flaky_tests
Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ compile_pip_dependencies() {
117117}
118118
119119test_cpp () {
120+ if [[ " ${OSTYPE} " == darwin* ]]; then
121+ echo " use macos_ci.sh to run cpp tests"
122+ exit 1
123+ fi
124+
120125 # C++ worker example need _GLIBCXX_USE_CXX11_ABI flag, but if we put the flag into .bazelrc, the linux ci can't pass.
121126 # So only set the flag in c++ worker example. More details: https://github.com/ray-project/ray/pull/18273
122127 echo build --cxxopt=" -D_GLIBCXX_USE_CXX11_ABI=0" >> ~ /.bazelrc
@@ -126,16 +131,17 @@ test_cpp() {
126131 BAZEL_EXPORT_OPTIONS=($( ./ci/run/bazel_export_options) )
127132 bazel test --config=ci " ${BAZEL_EXPORT_OPTIONS[@]} " --test_strategy=exclusive //cpp:all --build_tests_only
128133 # run cluster mode test with external cluster
129- bazel test //cpp:cluster_mode_test --test_arg=--external_cluster=true \
134+ bazel test --config=ci //cpp:cluster_mode_test --test_arg=--external_cluster=true \
130135 --test_arg=--ray_redis_password=" 1234" --test_arg=--ray_redis_username=" default"
131- bazel test --test_output=all //cpp:test_python_call_cpp
136+ bazel test --config=ci -- test_output=all //cpp:test_python_call_cpp
132137
133138 # run the cpp example, currently does not work on mac
134- if [[ " ${OSTYPE} " != darwin* ]]; then
135- rm -rf ray-template
136- ray cpp --generate-bazel-project-template-to ray-template
137- pushd ray-template && bash run.sh
138- fi
139+ rm -rf ray-template
140+ ray cpp --generate-bazel-project-template-to ray-template
141+ (
142+ cd ray-template
143+ bash run.sh
144+ )
139145}
140146
141147test_macos_wheels () {
Original file line number Diff line number Diff line change @@ -85,13 +85,20 @@ run_core_dashboard_test() {
8585 //:all python/ray/dashboard/... -python/ray/serve/... -rllib/...) || exit 42
8686}
8787
88- run_ray_cpp_and_java () {
89- # clang-format is needed by java/test.sh
90- # 42 is the universal rayci exit code for test failures
91- pip install clang-format==12.0.1
92- export JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
93- ./java/test.sh || exit 42
94- ./ci/ci.sh test_cpp || exit 42
88+ run_ray_cpp () {
89+ echo " --- Generate ray cpp package"
90+ bazel run --config=ci //cpp:gen_ray_cpp_pkg
91+
92+ echo " --- Test //cpp:all"
93+ bazel test --config=ci --test_strategy=exclusive --build_tests_only \
94+ --test_tag_filters=-no_macos //cpp:all
95+
96+ echo " --- Test //cpp:cluster_mode_test"
97+ bazel test --config=ci //cpp:cluster_mode_test --test_arg=--external_cluster=true \
98+ --test_arg=--ray_redis_password=" 1234" --test_arg=--ray_redis_username=" default"
99+
100+ echo " --- Test //cpp:test_python_call_cpp"
101+ bazel test --config=ci --test_output=all //cpp:test_python_call_cpp
95102}
96103
97104bisect () {
Original file line number Diff line number Diff line change @@ -273,7 +273,10 @@ cc_test(
273273 "//java:libio_ray_ray_test.jar" ,
274274 ],
275275 linkstatic = True ,
276- tags = ["team:core" ],
276+ tags = [
277+ "no_macos" ,
278+ "team:core" ,
279+ ],
277280 deps = [
278281 "ray_api_lib" ,
279282 "@com_google_googletest//:gtest_main" ,
@@ -464,5 +467,9 @@ py_test(
464467 "SIMPLE_DRIVER_SO_PATH" : "$(location simple_job.so)" ,
465468 "SIMPLE_DRIVER_MAIN_PATH" : "$(location simple_job)" ,
466469 },
467- tags = ["team:core" ],
470+ tags = [
471+ # TODO(ray-core): fix this test on apple silicon macos.
472+ "no_macos" ,
473+ "team:core" ,
474+ ],
468475)
You can’t perform that action at this time.
0 commit comments