mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
[CI] Run Java CI on Mac (#19757)
Why are these changes needed? Enable Java tests on Mac CI to avoid more breakages. Related issue number Closes #19700
This commit is contained in:
parent
026bf01071
commit
5de4a38948
4 changed files with 9 additions and 5 deletions
|
@ -59,13 +59,17 @@ steps:
|
||||||
- if [ "$BUILDKITE_BRANCH" = "master" ]; then python .buildkite/copy_files.py --destination jars --path ./.jar/darwin; fi
|
- if [ "$BUILDKITE_BRANCH" = "master" ]; then python .buildkite/copy_files.py --destination jars --path ./.jar/darwin; fi
|
||||||
|
|
||||||
|
|
||||||
- label: ":mac: :apple: Ray C++ and Libraries"
|
- label: ":mac: :apple: Ray C++, Java and Libraries"
|
||||||
<<: *common
|
<<: *common
|
||||||
commands:
|
commands:
|
||||||
|
- export RAY_INSTALL_JAVA=1
|
||||||
- *prelude_commands
|
- *prelude_commands
|
||||||
- TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
|
- TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
|
||||||
- bazel test --config=ci --test_env=CI $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-flaky,-flaky-mac,-post_wheel_build --
|
- bazel test --config=ci --test_env=CI $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-flaky,-flaky-mac,-post_wheel_build --
|
||||||
//:all python/ray/serve/... python/ray/dashboard/... -rllib/... -core_worker_test
|
//:all python/ray/serve/... python/ray/dashboard/... -rllib/... -core_worker_test
|
||||||
|
# clang-format is needed by java/test.sh
|
||||||
|
- pip install clang-format==12.0.1
|
||||||
|
- ./java/test.sh
|
||||||
- *epilogue_commands
|
- *epilogue_commands
|
||||||
|
|
||||||
- label: ":mac: :apple: Worker"
|
- label: ":mac: :apple: Worker"
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class SystemUtil {
|
||||||
public static boolean isProcessAlive(int pid) {
|
public static boolean isProcessAlive(int pid) {
|
||||||
Process process;
|
Process process;
|
||||||
try {
|
try {
|
||||||
process = Runtime.getRuntime().exec(new String[] {"ps", "-p", String.valueOf(pid)});
|
process = Runtime.getRuntime().exec(new String[] {"kill", "-0", String.valueOf(pid)});
|
||||||
process.waitFor();
|
process.waitFor();
|
||||||
} catch (InterruptedException | IOException e) {
|
} catch (InterruptedException | IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
@ -111,7 +111,7 @@ case "${OSTYPE}" in
|
||||||
darwin*) ip=$(ipconfig getifaddr en0);;
|
darwin*) ip=$(ipconfig getifaddr en0);;
|
||||||
*) echo "Can't get ip address for ${OSTYPE}"; exit 1;;
|
*) echo "Can't get ip address for ${OSTYPE}"; exit 1;;
|
||||||
esac
|
esac
|
||||||
RAY_BACKEND_LOG_LEVEL=debug ray start --head --port=6379 --redis-password=123456
|
RAY_BACKEND_LOG_LEVEL=debug ray start --head --port=6379 --redis-password=123456 --node-ip-address="$ip"
|
||||||
RAY_BACKEND_LOG_LEVEL=debug java -cp bazel-bin/java/all_tests_deploy.jar -Dray.address="$ip:6379"\
|
RAY_BACKEND_LOG_LEVEL=debug java -cp bazel-bin/java/all_tests_deploy.jar -Dray.address="$ip:6379"\
|
||||||
-Dray.redis.password='123456' -Dray.job.code-search-path="$PWD/bazel-bin/java/all_tests_deploy.jar" io.ray.test.MultiDriverTest
|
-Dray.redis.password='123456' -Dray.job.code-search-path="$PWD/bazel-bin/java/all_tests_deploy.jar" io.ray.test.MultiDriverTest
|
||||||
ray stop
|
ray stop
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class RayJavaLoggingTest extends BaseTest {
|
||||||
Ray.actor(HeavyLoggingActor::new)
|
Ray.actor(HeavyLoggingActor::new)
|
||||||
.setJvmOptions(
|
.setJvmOptions(
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
"-Dray.logging.max-file-size=1MB", "-Dray.logging.max-backup-files=3"))
|
"-Dray.logging.max-file-size=1KB", "-Dray.logging.max-backup-files=3"))
|
||||||
.remote();
|
.remote();
|
||||||
Assert.assertTrue(loggingActor.task(HeavyLoggingActor::log).remote().get());
|
Assert.assertTrue(loggingActor.task(HeavyLoggingActor::log).remote().get());
|
||||||
final int pid = loggingActor.task(HeavyLoggingActor::getPid).remote().get();
|
final int pid = loggingActor.task(HeavyLoggingActor::getPid).remote().get();
|
||||||
|
@ -46,7 +46,7 @@ public class RayJavaLoggingTest extends BaseTest {
|
||||||
new File(String.format("%s/java-worker-%s-%d.%d.log", currLogDir, jobId, pid, i));
|
new File(String.format("%s/java-worker-%s-%d.%d.log", currLogDir, jobId, pid, i));
|
||||||
Assert.assertTrue(rotatedFile.exists());
|
Assert.assertTrue(rotatedFile.exists());
|
||||||
long fileSize = rotatedFile.length();
|
long fileSize = rotatedFile.length();
|
||||||
Assert.assertTrue(fileSize > 1024 * 1024 && fileSize < 1024 * (1024 + 1));
|
Assert.assertTrue(fileSize > 1024 && fileSize < 1024 * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue