mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00
Avoid redundant bazel build (#4458)
This commit is contained in:
parent
01747b11a1
commit
7a38f9be1c
3 changed files with 8 additions and 3 deletions
2
.bazelrc
2
.bazelrc
|
@ -1,2 +1,4 @@
|
|||
# build config
|
||||
build --compilation_mode=opt
|
||||
build --action_env=PATH
|
||||
build --action_env=PYTHON_BIN_PATH
|
||||
|
|
5
build.sh
5
build.sh
|
@ -121,14 +121,15 @@ else
|
|||
$PYTHON_EXECUTABLE -m pip install \
|
||||
--target=$ROOT_DIR/python/ray/pyarrow_files pyarrow==0.12.0.RAY \
|
||||
--find-links https://s3-us-west-2.amazonaws.com/arrow-wheels/9357dc130789ee42f8181d8724bee1d5d1509060/index.html
|
||||
export PYTHON_BIN_PATH="$PYTHON_EXECUTABLE"
|
||||
|
||||
if [ "$RAY_BUILD_JAVA" == "YES" ]; then
|
||||
bazel run //java:bazel_deps -- generate -r $ROOT_DIR -s java/third_party/workspace.bzl -d java/dependencies.yaml
|
||||
bazel build //java:all --verbose_failures --action_env=PATH
|
||||
bazel build //java:all --verbose_failures
|
||||
fi
|
||||
|
||||
if [ "$RAY_BUILD_PYTHON" == "YES" ]; then
|
||||
bazel build //:ray_pkg --verbose_failures --action_env=PYTHON_BIN_PATH=$PYTHON_EXECUTABLE
|
||||
bazel build //:ray_pkg --verbose_failures
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@ ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
|||
|
||||
pushd $ROOT_DIR/..
|
||||
echo "Linting Java code with checkstyle."
|
||||
bazel test //java:all --test_tag_filters="checkstyle" --action_env=PATH
|
||||
# NOTE(hchen): The `test_tag_filters` option causes bazel to ignore caches.
|
||||
# Thus, we add the `build_tests_only` option to avoid re-building everything.
|
||||
bazel test //java:all --test_tag_filters="checkstyle" --build_tests_only
|
||||
|
||||
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,
|
||||
|
|
Loading…
Add table
Reference in a new issue