Skip to content

Commit de604c2

Browse files
committed
try run macos test on arm64 once more..
Signed-off-by: Lonnie Liu <[email protected]>
1 parent 73d2f46 commit de604c2

File tree

4 files changed

+57
-17
lines changed

4 files changed

+57
-17
lines changed

.buildkite/macos/macos.rayci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ steps:
101101
- macos_wheels
102102
- oss
103103
job_env: MACOS
104-
instance_type: macos
104+
instance_type: macos-arm64
105105
commands:
106-
- RAY_INSTALL_JAVA=1 ./ci/ray_ci/macos/macos_ci.sh run_ray_cpp_and_java
106+
- RAY_INSTALL_JAVA=0 ./ci/ray_ci/macos/macos_ci.sh run_ray_cpp_and_java
107107

108108
- label: ":ray: core: :mac: flaky tests"
109109
key: macos_flaky_tests

ci/ray_ci/macos/macos_ci.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,15 @@ run_core_dashboard_test() {
8686
}
8787

8888
run_ray_cpp_and_java() {
89-
# clang-format is needed by java/test.sh
9089
# 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
90+
91+
# Java tests are only supported on old Intel Macs so far
92+
if [[ "$(uname -m)" != "arm64" ]]; then
93+
# clang-format is needed by java/test.sh
94+
pip install clang-format==12.0.1
95+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
96+
./java/test.sh || exit 42
97+
fi
9498
./ci/ci.sh test_cpp || exit 42
9599
}
96100

cpp/BUILD.bazel

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,20 +258,28 @@ cc_test(
258258

259259
cc_test(
260260
name = "cluster_mode_xlang_test",
261-
srcs = [
262-
"src/ray/test/cluster/cluster_mode_xlang_test.cc",
263-
] + glob([
261+
srcs = select({
262+
"//conditions:default": [
263+
"src/ray/test/cluster/cluster_mode_xlang_test.cc",
264+
],
265+
"//bazel:osx_arm64_config": [
266+
"src/ray/test/cluster/cluster_mode_xlang_osx_test.cc",
267+
],
268+
}) + glob([
264269
"src/ray/test/cluster/*.h",
265270
]),
266-
args = [
267-
"--ray_code_search_path=$(location //java:libio_ray_ray_test.jar)",
268-
"--ray_head_args '--include-dashboard false'",
269-
],
271+
args = select({
272+
"//conditions:default": [
273+
"--ray_code_search_path=$(location //java:libio_ray_ray_test.jar)",
274+
],
275+
"//bazel:osx_arm64_config": [],
276+
}) + ["--ray_head_args '--include-dashboard false'"],
270277
copts = COPTS,
271-
data = [
272-
":ray_cpp_pkg_files",
273-
"//java:libio_ray_ray_test.jar",
274-
],
278+
data = [":ray_cpp_pkg_files"] + select({
279+
"//conditions:default": ["//java:libio_ray_ray_test.jar"],
280+
# Java not supported on Apple silicon.
281+
"//bazel:osx_arm64_config": [],
282+
}),
275283
linkstatic = True,
276284
tags = ["team:core"],
277285
deps = [
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2022 The Ray Authors.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#include <gtest/gtest.h>
16+
#include <ray/api.h>
17+
18+
// Java not supported on Apple silicon, so skip the tests.
19+
TEST(RayClusterModeXLangTest, NotSupportedOnAppleSilicon) {}
20+
21+
int main(int argc, char **argv) {
22+
ray::RayConfig config;
23+
ray::Init(config, argc, argv);
24+
::testing::InitGoogleTest(&argc, argv);
25+
int ret = RUN_ALL_TESTS();
26+
ray::Shutdown();
27+
return ret;
28+
}

0 commit comments

Comments
 (0)