Factor out some Bazel options into .bazelrc (#9804)

* Factor out --keep_going in Bazel --config=ci

* Remove Bazel --test_timeout=600 for Windows

* Use global --test_output for Bazel CI

Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
mehrdadn
2020-07-30 18:09:31 -07:00
committed by GitHub
parent a7b97b6f8a
commit e2c0174ab2
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -87,6 +87,7 @@ aquery:ci --noshow_progress
build:ci --color=yes
build:ci --curses=no
build:ci --disk_cache=~/ray-bazel-cache
build:ci --keep_going
build:ci --remote_cache="https://storage.googleapis.com/ray-bazel-cache"
build:ci --progress_report_interval=100
build:ci --show_progress_rate_limit=15
+3 -3
View File
@@ -166,14 +166,14 @@ test_python() {
# It's unclear to me if this should be necessary, but this is to make tests run for now.
# Check why this issue doesn't arise on Linux/Mac.
# Ideally importing ray.cloudpickle should import pickle5 automatically.
bazel test -k --config=ci --test_timeout=600 --build_tests_only \
bazel test --config=ci --build_tests_only \
--test_env=PYTHONPATH="${PYTHONPATH-}${pathsep}${WORKSPACE_DIR}/python/ray/pickle5_files" -- \
"${args[@]}";
fi
}
test_cpp() {
bazel test --config=ci //cpp:all --build_tests_only --test_output=streamed
bazel test --config=ci //cpp:all --build_tests_only
}
test_wheels() {
@@ -256,7 +256,7 @@ _bazel_build_before_install() {
target="//:ray_pkg"
fi
# NOTE: Do not add build flags here. Use .bazelrc and --config instead.
bazel build -k "${target}"
bazel build "${target}"
}
install_ray() {
+2 -2
View File
@@ -35,11 +35,11 @@ bazel build //java:all_tests_deploy.jar
echo "Running tests under cluster mode."
# TODO(hchen): Ideally, we should use the following bazel command to run Java tests. However, if there're skipped tests,
# TestNG will exit with code 2. And bazel treats it as test failure.
# bazel test //java:all_tests --action_env=ENABLE_MULTI_LANGUAGE_TESTS=1 --test_output="errors" || cluster_exit_code=$?
# bazel test //java:all_tests --action_env=ENABLE_MULTI_LANGUAGE_TESTS=1 --config=ci || cluster_exit_code=$?
ENABLE_MULTI_LANGUAGE_TESTS=1 run_testng java -cp "$ROOT_DIR"/../bazel-bin/java/all_tests_deploy.jar org.testng.TestNG -d /tmp/ray_java_test_output "$ROOT_DIR"/testng.xml
echo "Running tests under single-process mode."
# bazel test //java:all_tests --jvmopt="-Dray.run-mode=SINGLE_PROCESS" --test_output="errors" || single_exit_code=$?
# bazel test //java:all_tests --jvmopt="-Dray.run-mode=SINGLE_PROCESS" --config=ci || single_exit_code=$?
run_testng java -Dray.run-mode="SINGLE_PROCESS" -cp "$ROOT_DIR"/../bazel-bin/java/all_tests_deploy.jar org.testng.TestNG -d /tmp/ray_java_test_output "$ROOT_DIR"/testng.xml
popd