Make Bazel the default build system (#3898)

This commit is contained in:
Philipp Moritz
2019-02-23 11:58:59 -08:00
committed by Robert Nishihara
parent 9b3ce3e64b
commit ba52caff37
15 changed files with 129 additions and 72 deletions
+1
View File
@@ -61,6 +61,7 @@ set(RAY_LIB_STATIC_LINK_LIBS ${PLASMA_STATIC_LIB} ${ARROW_STATIC_LIB} ${RAY_SYST
set(RAY_LIB_DEPENDENCIES
boost_thread
arrow_ep
googletest_ep
gen_gcs_fbs
gen_object_manager_fbs
gen_node_manager_fbs)
+8 -6
View File
@@ -1,11 +1,13 @@
#!/usr/bin/env bash
# This needs to be run in the build tree, which is normally ray/build
# This needs to be run in the root directory
# Cause the script to exit if a single command fails.
set -e
set -x
bazel build "//:gcs_client_test" "//:asio_test" "//:ray_redis_module.so" -c opt
# Start Redis.
if [[ "${RAY_USE_NEW_GCS}" = "on" ]]; then
./src/credis/redis/src/redis-server \
@@ -14,15 +16,15 @@ if [[ "${RAY_USE_NEW_GCS}" = "on" ]]; then
--loadmodule ./src/ray/gcs/redis_module/libray_redis_module.so \
--port 6379 &
else
./src/ray/thirdparty/redis/src/redis-server \
./bazel-genfiles/ray_pkg/ray/core/src/ray/thirdparty/redis/src/redis-server \
--loglevel warning \
--loadmodule ./src/ray/gcs/redis_module/libray_redis_module.so \
--loadmodule ./bazel-bin/ray_redis_module.so \
--port 6379 &
fi
sleep 1s
./src/ray/gcs/client_test
./src/ray/gcs/asio_test
./bazel-bin/gcs_client_test
./bazel-bin/asio_test
./src/ray/thirdparty/redis/src/redis-cli -p 6379 shutdown
./bazel-genfiles/ray_pkg/ray/core/src/ray/thirdparty/redis/src/redis-cli -p 6379 shutdown
sleep 1s
+10 -9
View File
@@ -6,6 +6,8 @@
set -e
set -x
bazel build "//:object_manager_stress_test" "//:object_manager_test" "@plasma//:plasma_store_server" -c opt
# Get the directory in which this script is executing.
SCRIPT_DIR="`dirname \"$0\"`"
RAY_ROOT="$SCRIPT_DIR/../../.."
@@ -22,8 +24,7 @@ fi
CORE_DIR="$RAY_ROOT/build"
PYTHON_CORE_DIR="$RAY_ROOT/python/ray/core"
REDIS_MODULE="$PYTHON_CORE_DIR/src/ray/gcs/redis_module/libray_redis_module.so"
REDIS_DIR="$CORE_DIR/src/ray/thirdparty/redis/src"
REDIS_MODULE="./bazel-genfiles/ray_pkg/ray/core/src/ray/gcs/redis_module/libray_redis_module.so"
if [[ "${RAY_USE_NEW_GCS}" = "on" ]]; then
REDIS_SERVER="$CORE_DIR/src/credis/redis/src/redis-server"
@@ -31,25 +32,25 @@ if [[ "${RAY_USE_NEW_GCS}" = "on" ]]; then
CREDIS_MODULE="$CORE_DIR/src/credis/build/src/libmember.so"
LOAD_MODULE_ARGS="--loadmodule ${CREDIS_MODULE} --loadmodule ${REDIS_MODULE}"
else
REDIS_SERVER="${REDIS_DIR}/redis-server"
REDIS_SERVER="./bazel-genfiles/ray_pkg/ray/core/src/ray/thirdparty/redis/src/redis-server"
LOAD_MODULE_ARGS="--loadmodule ${REDIS_MODULE}"
fi
STORE_EXEC="$PYTHON_CORE_DIR/src/plasma/plasma_store_server"
STORE_EXEC="./bazel-bin/external/plasma/plasma_store_server"
# Allow cleanup commands to fail.
$REDIS_DIR/redis-cli -p 6379 shutdown || true
./bazel-genfiles/ray_pkg/ray/core/src/ray/thirdparty/redis/src/redis-cli -p 6379 shutdown || true
sleep 1s
${REDIS_SERVER} --loglevel warning ${LOAD_MODULE_ARGS} --port 6379 &
sleep 1s
# Run tests.
$CORE_DIR/src/ray/object_manager/object_manager_stress_test $STORE_EXEC
./bazel-bin/object_manager_stress_test $STORE_EXEC
sleep 1s
# Use timeout=1000ms for the Wait tests.
$CORE_DIR/src/ray/object_manager/object_manager_test $STORE_EXEC 1000
./bazel-bin/object_manager_test $STORE_EXEC 1000
# Run tests again with inlined objects.
$CORE_DIR/src/ray/object_manager/object_manager_test $STORE_EXEC 1000 true
$REDIS_DIR/redis-cli -p 6379 shutdown
./bazel-bin/object_manager_test $STORE_EXEC 1000 true
./bazel-genfiles/ray_pkg/ray/core/src/ray/thirdparty/redis/src/redis-cli -p 6379 shutdown
sleep 1s
# Include raylet integration test once it's ready.