Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Raylet with Bazel #3806

Merged
merged 30 commits into from
Jan 20, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes
  • Loading branch information
pcmoritz committed Jan 20, 2019
commit 418b01c4ed2b41f00ce65fd8241608bd7e05fae2
17 changes: 14 additions & 3 deletions .travis/install-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@
# Cause the script to exit if a single command fails
set -e

OS=linux
platform="unknown"
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
echo "Platform is linux."
platform="linux"
elif [[ "$unamestr" == "Darwin" ]]; then
echo "Platform is macosx."
platform="darwin"
else
echo "Unrecognized platform."
exit 1
fi

ARCH=x86_64
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then OS=darwin; fi
URL="https://github.com/bazelbuild/bazel/releases/download/0.21.0/bazel-0.21.0-installer-${OS}-x86_64.sh"
URL="https://github.com/bazelbuild/bazel/releases/download/0.21.0/bazel-0.21.0-installer-${platform}-x86_64.sh"
wget -O install.sh $URL
chmod +x install.sh
./install.sh --user
Expand Down
85 changes: 41 additions & 44 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,16 @@ cc_binary(

cc_library(
name = "raylet_lib",
srcs = glob(
[
"src/ray/raylet/*.cc",
],
exclude = [
"src/ray/raylet/mock_gcs_client.cc",
"src/ray/raylet/monitor_main.cc",
"src/ray/raylet/*_test.cc",
],
),
srcs = glob([
"src/ray/raylet/*.cc"
], exclude = [
"src/ray/raylet/mock_gcs_client.cc",
"src/ray/raylet/monitor_main.cc",
"src/ray/raylet/*_test.cc",
]),
hdrs = glob([
"src/ray/raylet/*.h",
],),
]),
deps = [
":gcs",
":gcs_fbs",
Expand Down Expand Up @@ -153,16 +150,13 @@ cc_binary(

cc_library(
name = "ray_util",
srcs = glob(
[
"src/ray/*.cc",
"src/ray/util/*.cc",
],
exclude = [
"src/ray/util/logging_test.cc",
"src/ray/util/signal_test.cc"
],
),
srcs = glob([
"src/ray/*.cc",
"src/ray/util/*.cc",
], exclude = [
"src/ray/util/logging_test.cc",
"src/ray/util/signal_test.cc"
]),
hdrs = glob([
"src/ray/*.h",
"src/ray/util/*.h",
Expand All @@ -178,10 +172,14 @@ cc_library(

cc_library(
name = "ray_common",
srcs = ["src/ray/common/client_connection.cc",
"src/ray/common/common_protocol.cc"],
hdrs = ["src/ray/common/client_connection.h",
"src/ray/common/common_protocol.h"],
srcs = [
"src/ray/common/client_connection.cc",
"src/ray/common/common_protocol.cc"
],
hdrs = [
"src/ray/common/client_connection.h",
"src/ray/common/common_protocol.h"
],
includes = [
"src/ray/gcs/format",
],
Expand All @@ -207,33 +205,32 @@ cc_library(
cc_library(
name = "hiredis",
srcs = glob([
"src/ray/thirdparty/ae/ae.c",
"src/ray/thirdparty/hiredis/*.c",
], exclude = ["src/ray/thirdparty/hiredis/test.c"]),
"src/ray/thirdparty/ae/ae.c",
"src/ray/thirdparty/hiredis/*.c",
], exclude = [
"src/ray/thirdparty/hiredis/test.c"
]),
hdrs = glob([
"src/ray/thirdparty/ae/*.h",
"src/ray/thirdparty/hiredis/*.h",
"src/ray/thirdparty/hiredis/adapters/*.h",
"src/ray/thirdparty/hiredis/dict.c",
"src/ray/thirdparty/ae/ae_kqueue.c",
"src/ray/thirdparty/ae/ae_epoll.c",
"src/ray/thirdparty/ae/*.h",
"src/ray/thirdparty/hiredis/*.h",
"src/ray/thirdparty/hiredis/adapters/*.h",
"src/ray/thirdparty/hiredis/dict.c",
"src/ray/thirdparty/ae/ae_kqueue.c",
"src/ray/thirdparty/ae/ae_epoll.c",
]),
includes = [
"src/ray/thirdparty/hiredis",
"src/ray/thirdparty/ae",
"src/ray/thirdparty/hiredis",
"src/ray/thirdparty/ae",
],
)

cc_library(
name = "gcs",
srcs = glob(
[
"src/ray/gcs/*.cc",
],
exclude = [
"src/ray/gcs/*_test.cc",
],
),
srcs = glob([
"src/ray/gcs/*.cc"
], exclude = [
"src/ray/gcs/*_test.cc"
]),
hdrs = glob([
"src/ray/gcs/*.h",
"src/ray/gcs/format/*.h",
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ boost_deps()

git_repository(
name = "com_github_google_flatbuffers",
remote = "https://github.com/google/flatbuffers.git",
commit = "63d51afd1196336a7d1f56a988091ef05deb1c62",
remote = "https://github.com/ray-project/flatbuffers.git",
commit = "4ae340b698b7dd768e8c5a155731c8dee9fce016",
)

git_repository(
Expand Down