mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -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
|
||||
|
||||
|
||||
- label: ":mac: :apple: Ray C++ and Libraries"
|
||||
- label: ":mac: :apple: Ray C++, Java and Libraries"
|
||||
<<: *common
|
||||
commands:
|
||||
- export RAY_INSTALL_JAVA=1
|
||||
- *prelude_commands
|
||||
- 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 --
|
||||
//: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
|
||||
|
||||
- label: ":mac: :apple: Worker"
|
||||
|
|
|
@ -36,7 +36,7 @@ public class SystemUtil {
|
|||
public static boolean isProcessAlive(int pid) {
|
||||
Process process;
|
||||
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();
|
||||
} catch (InterruptedException | IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
@ -111,7 +111,7 @@ case "${OSTYPE}" in
|
|||
darwin*) ip=$(ipconfig getifaddr en0);;
|
||||
*) echo "Can't get ip address for ${OSTYPE}"; exit 1;;
|
||||
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"\
|
||||
-Dray.redis.password='123456' -Dray.job.code-search-path="$PWD/bazel-bin/java/all_tests_deploy.jar" io.ray.test.MultiDriverTest
|
||||
ray stop
|
||||
|
|
|
@ -35,7 +35,7 @@ public class RayJavaLoggingTest extends BaseTest {
|
|||
Ray.actor(HeavyLoggingActor::new)
|
||||
.setJvmOptions(
|
||||
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();
|
||||
Assert.assertTrue(loggingActor.task(HeavyLoggingActor::log).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));
|
||||
Assert.assertTrue(rotatedFile.exists());
|
||||
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