2019-01-20 12:16:47 -08:00
|
|
|
# Bazel build
|
|
|
|
# C/C++ documentation: https://docs.bazel.build/versions/master/be/c-cpp.html
|
|
|
|
|
2019-11-21 11:56:46 -08:00
|
|
|
load("@rules_proto//proto:defs.bzl", "proto_library")
|
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_proto_library", "cc_test")
|
2019-06-26 05:31:19 +08:00
|
|
|
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
|
2019-11-08 15:58:28 -08:00
|
|
|
load("@com_github_grpc_grpc//bazel:cython_library.bzl", "pyx_library")
|
|
|
|
load("@rules_proto_grpc//python:defs.bzl", "python_grpc_compile")
|
2019-01-20 12:16:47 -08:00
|
|
|
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
2019-12-17 02:38:36 -08:00
|
|
|
load("//bazel:ray.bzl", "COPTS", "PROPAGATED_WINDOWS_DEFINES")
|
2019-01-27 18:32:04 -08:00
|
|
|
|
2019-06-26 05:31:19 +08:00
|
|
|
# === Begin of protobuf definitions ===
|
|
|
|
|
2019-07-08 22:41:37 +08:00
|
|
|
proto_library(
|
|
|
|
name = "common_proto",
|
|
|
|
srcs = ["src/ray/protobuf/common.proto"],
|
|
|
|
visibility = ["//java:__subpackages__"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_proto_library(
|
|
|
|
name = "common_cc_proto",
|
|
|
|
deps = [":common_proto"],
|
|
|
|
)
|
|
|
|
|
2019-10-26 16:37:39 -07:00
|
|
|
python_grpc_compile(
|
2019-07-08 22:41:37 +08:00
|
|
|
name = "common_py_proto",
|
|
|
|
deps = [":common_proto"],
|
|
|
|
)
|
|
|
|
|
2019-06-26 05:31:19 +08:00
|
|
|
proto_library(
|
|
|
|
name = "gcs_proto",
|
|
|
|
srcs = ["src/ray/protobuf/gcs.proto"],
|
|
|
|
visibility = ["//java:__subpackages__"],
|
2019-07-08 22:41:37 +08:00
|
|
|
deps = [":common_proto"],
|
2019-06-26 05:31:19 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_proto_library(
|
|
|
|
name = "gcs_cc_proto",
|
|
|
|
deps = [":gcs_proto"],
|
|
|
|
)
|
|
|
|
|
2019-10-26 16:37:39 -07:00
|
|
|
python_grpc_compile(
|
2019-06-26 05:31:19 +08:00
|
|
|
name = "gcs_py_proto",
|
|
|
|
deps = [":gcs_proto"],
|
|
|
|
)
|
|
|
|
|
|
|
|
proto_library(
|
|
|
|
name = "node_manager_proto",
|
2019-06-17 19:00:50 +08:00
|
|
|
srcs = ["src/ray/protobuf/node_manager.proto"],
|
2019-07-08 22:41:37 +08:00
|
|
|
deps = [":common_proto"],
|
2019-06-17 19:00:50 +08:00
|
|
|
)
|
|
|
|
|
2019-06-26 05:31:19 +08:00
|
|
|
cc_proto_library(
|
|
|
|
name = "node_manager_cc_proto",
|
2019-07-25 14:48:56 +08:00
|
|
|
deps = [":node_manager_proto"],
|
2019-06-26 05:31:19 +08:00
|
|
|
)
|
|
|
|
|
2019-10-26 16:37:39 -07:00
|
|
|
python_grpc_compile(
|
|
|
|
name = "node_manager_py_proto",
|
|
|
|
deps = [":node_manager_proto"],
|
|
|
|
)
|
|
|
|
|
2019-12-15 13:23:42 +08:00
|
|
|
proto_library(
|
|
|
|
name = "gcs_service_proto",
|
|
|
|
srcs = ["src/ray/protobuf/gcs_service.proto"],
|
|
|
|
deps = [":gcs_proto"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_proto_library(
|
|
|
|
name = "gcs_service_cc_proto",
|
|
|
|
deps = [":gcs_service_proto"],
|
|
|
|
)
|
|
|
|
|
2019-06-28 10:56:34 +08:00
|
|
|
proto_library(
|
|
|
|
name = "object_manager_proto",
|
|
|
|
srcs = ["src/ray/protobuf/object_manager.proto"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_proto_library(
|
|
|
|
name = "object_manager_cc_proto",
|
2019-07-25 14:48:56 +08:00
|
|
|
deps = [":object_manager_proto"],
|
|
|
|
)
|
|
|
|
|
2019-07-02 16:48:43 +08:00
|
|
|
proto_library(
|
|
|
|
name = "core_worker_proto",
|
|
|
|
srcs = ["src/ray/protobuf/core_worker.proto"],
|
2019-07-08 22:41:37 +08:00
|
|
|
deps = [":common_proto"],
|
2019-07-02 16:48:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_proto_library(
|
2019-11-06 13:00:39 -08:00
|
|
|
name = "worker_cc_proto",
|
2019-07-02 16:48:43 +08:00
|
|
|
deps = ["core_worker_proto"],
|
|
|
|
)
|
|
|
|
|
2019-10-03 09:20:26 -07:00
|
|
|
proto_library(
|
|
|
|
name = "serialization_proto",
|
|
|
|
srcs = ["src/ray/protobuf/serialization.proto"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_proto_library(
|
|
|
|
name = "serialization_cc_proto",
|
|
|
|
deps = ["serialization_proto"],
|
|
|
|
)
|
|
|
|
|
2019-06-26 05:31:19 +08:00
|
|
|
# === End of protobuf definitions ===
|
|
|
|
|
2019-06-28 10:56:34 +08:00
|
|
|
# === Begin of rpc definitions ===
|
|
|
|
|
2019-07-25 14:48:56 +08:00
|
|
|
# GRPC common lib.
|
2019-06-28 10:56:34 +08:00
|
|
|
cc_library(
|
|
|
|
name = "grpc_common_lib",
|
|
|
|
srcs = glob([
|
|
|
|
"src/ray/rpc/*.cc",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/rpc/*.h",
|
|
|
|
]),
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":ray_common",
|
|
|
|
"@boost//:asio",
|
|
|
|
"@com_github_grpc_grpc//:grpc++",
|
|
|
|
"@com_google_protobuf//:protobuf",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-26 05:31:19 +08:00
|
|
|
# Node manager gRPC lib.
|
|
|
|
cc_grpc_library(
|
|
|
|
name = "node_manager_cc_grpc",
|
|
|
|
srcs = [":node_manager_proto"],
|
|
|
|
grpc_only = True,
|
|
|
|
deps = [":node_manager_cc_proto"],
|
|
|
|
)
|
|
|
|
|
2019-06-17 19:00:50 +08:00
|
|
|
# Node manager server and client.
|
|
|
|
cc_library(
|
2019-06-26 05:31:19 +08:00
|
|
|
name = "node_manager_rpc",
|
2019-06-17 19:00:50 +08:00
|
|
|
hdrs = glob([
|
2019-06-28 10:56:34 +08:00
|
|
|
"src/ray/rpc/node_manager/*.h",
|
2019-06-17 19:00:50 +08:00
|
|
|
]),
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
2019-06-28 10:56:34 +08:00
|
|
|
":grpc_common_lib",
|
2019-06-26 05:31:19 +08:00
|
|
|
":node_manager_cc_grpc",
|
2019-06-17 19:00:50 +08:00
|
|
|
":ray_common",
|
|
|
|
"@boost//:asio",
|
|
|
|
"@com_github_grpc_grpc//:grpc++",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-15 13:23:42 +08:00
|
|
|
# gcs_service gRPC lib.
|
|
|
|
cc_grpc_library(
|
|
|
|
name = "gcs_service_cc_grpc",
|
|
|
|
srcs = [":gcs_service_proto"],
|
|
|
|
grpc_only = True,
|
|
|
|
deps = [":gcs_service_cc_proto"],
|
|
|
|
)
|
|
|
|
|
|
|
|
# gcs rpc server and client.
|
|
|
|
cc_library(
|
|
|
|
name = "gcs_service_rpc",
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/rpc/gcs_server/gcs_rpc_server.h",
|
|
|
|
"src/ray/rpc/gcs_server/gcs_rpc_client.h",
|
|
|
|
]),
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":gcs_service_cc_grpc",
|
|
|
|
":grpc_common_lib",
|
|
|
|
":ray_common",
|
|
|
|
"@boost//:asio",
|
|
|
|
"@com_github_grpc_grpc//:grpc++",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-28 10:56:34 +08:00
|
|
|
# Object manager gRPC lib.
|
|
|
|
cc_grpc_library(
|
|
|
|
name = "object_manager_cc_grpc",
|
|
|
|
srcs = [":object_manager_proto"],
|
|
|
|
grpc_only = True,
|
|
|
|
deps = [":object_manager_cc_proto"],
|
|
|
|
)
|
|
|
|
|
2019-07-25 14:48:56 +08:00
|
|
|
# Object manager rpc server and client.
|
2019-06-28 10:56:34 +08:00
|
|
|
cc_library(
|
|
|
|
name = "object_manager_rpc",
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/rpc/object_manager/*.h",
|
|
|
|
]),
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":grpc_common_lib",
|
|
|
|
":object_manager_cc_grpc",
|
|
|
|
":ray_common",
|
|
|
|
"@boost//:asio",
|
|
|
|
"@com_github_grpc_grpc//:grpc++",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-07-25 14:48:56 +08:00
|
|
|
# Worker gRPC lib.
|
2019-07-04 20:16:42 +08:00
|
|
|
cc_grpc_library(
|
|
|
|
name = "worker_cc_grpc",
|
2019-11-06 13:00:39 -08:00
|
|
|
srcs = [":core_worker_proto"],
|
2019-07-04 20:16:42 +08:00
|
|
|
grpc_only = True,
|
|
|
|
deps = [":worker_cc_proto"],
|
|
|
|
)
|
|
|
|
|
2019-07-30 17:47:17 +08:00
|
|
|
# worker server and client.
|
2019-07-04 20:16:42 +08:00
|
|
|
cc_library(
|
|
|
|
name = "worker_rpc",
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/rpc/worker/*.h",
|
|
|
|
]),
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":grpc_common_lib",
|
|
|
|
":ray_common",
|
|
|
|
":worker_cc_grpc",
|
|
|
|
"@boost//:asio",
|
2019-10-31 16:55:10 -07:00
|
|
|
"@boost//:thread",
|
2019-07-04 20:16:42 +08:00
|
|
|
"@com_github_grpc_grpc//:grpc++",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-28 10:56:34 +08:00
|
|
|
# === End of rpc definitions ===
|
|
|
|
|
2019-07-11 17:07:04 +08:00
|
|
|
cc_library(
|
|
|
|
name = "ray_common",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/common/**/*.cc",
|
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"src/ray/common/**/*_test.cc",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/common/**/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
copts = COPTS,
|
2019-12-01 15:05:50 -08:00
|
|
|
includes = [
|
|
|
|
"@boost//:asio",
|
|
|
|
],
|
2019-12-10 20:33:24 +08:00
|
|
|
visibility = ["//visibility:public"],
|
2019-07-11 17:07:04 +08:00
|
|
|
deps = [
|
|
|
|
":common_cc_proto",
|
2019-09-11 18:38:14 -07:00
|
|
|
":gcs_cc_proto",
|
2019-08-17 19:11:32 -07:00
|
|
|
":node_manager_fbs",
|
2019-07-11 17:07:04 +08:00
|
|
|
":ray_util",
|
|
|
|
"@boost//:asio",
|
|
|
|
"@com_github_grpc_grpc//:grpc++",
|
2019-11-22 11:14:46 -08:00
|
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
|
|
|
"@com_google_absl//absl/container:flat_hash_set",
|
2019-11-15 16:04:16 -08:00
|
|
|
"@com_google_googletest//:gtest",
|
2019-07-11 17:07:04 +08:00
|
|
|
"@plasma//:plasma_client",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
cc_binary(
|
|
|
|
name = "raylet",
|
|
|
|
srcs = ["src/ray/raylet/main.cc"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-03-22 14:30:05 +08:00
|
|
|
visibility = ["//java:__subpackages__"],
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":ray_util",
|
|
|
|
":raylet_lib",
|
2019-04-24 14:53:07 +08:00
|
|
|
"@com_github_gflags_gflags//:gflags",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "raylet_monitor",
|
|
|
|
srcs = [
|
|
|
|
"src/ray/raylet/monitor.cc",
|
|
|
|
"src/ray/raylet/monitor.h",
|
|
|
|
"src/ray/raylet/monitor_main.cc",
|
|
|
|
],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
":ray_util",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-15 13:23:42 +08:00
|
|
|
cc_library(
|
|
|
|
name = "gcs_server_lib",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/gcs/gcs_server/*.cc",
|
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"src/ray/gcs/gcs_server/gcs_server_main.cc",
|
|
|
|
"src/ray/gcs/gcs_server/test/*.cc",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/gcs/gcs_server/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
":gcs_service_rpc",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "gcs_server",
|
|
|
|
srcs = [
|
|
|
|
"src/ray/gcs/gcs_server/gcs_server_main.cc",
|
|
|
|
],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":gcs_server_lib",
|
|
|
|
"@com_github_gflags_gflags//:gflags",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-04-03 12:01:02 +08:00
|
|
|
cc_library(
|
|
|
|
name = "stats_lib",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/stats/*.cc",
|
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"src/ray/stats/*_test.cc",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/stats/*.h",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
copts = COPTS,
|
|
|
|
includes = [
|
|
|
|
"src",
|
|
|
|
],
|
2019-12-01 15:05:50 -08:00
|
|
|
linkopts = select({
|
|
|
|
"@bazel_tools//src/conditions:windows": [
|
|
|
|
],
|
|
|
|
"//conditions:default": [
|
|
|
|
"-lpthread",
|
|
|
|
],
|
|
|
|
}),
|
2019-04-03 12:01:02 +08:00
|
|
|
deps = [
|
|
|
|
":ray_util",
|
|
|
|
"@com_github_jupp0r_prometheus_cpp//pull",
|
|
|
|
"@com_google_absl//absl/base:core_headers",
|
|
|
|
"@com_google_absl//absl/memory",
|
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
"@com_google_googletest//:gtest",
|
|
|
|
"@io_opencensus_cpp//opencensus/exporters/stats/prometheus:prometheus_exporter",
|
|
|
|
"@io_opencensus_cpp//opencensus/exporters/stats/stdout:stdout_exporter",
|
|
|
|
"@io_opencensus_cpp//opencensus/stats",
|
|
|
|
"@io_opencensus_cpp//opencensus/tags",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
cc_library(
|
|
|
|
name = "raylet_lib",
|
2019-02-14 22:16:19 +08:00
|
|
|
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",
|
2019-06-03 19:59:43 +08:00
|
|
|
"src/ray/raylet/main.cc",
|
2019-02-14 22:16:19 +08:00
|
|
|
],
|
|
|
|
),
|
2019-01-20 12:16:47 -08:00
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/raylet/*.h",
|
|
|
|
]),
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-12-01 15:05:50 -08:00
|
|
|
defines = select({
|
|
|
|
"@bazel_tools//src/conditions:windows": PROPAGATED_WINDOWS_DEFINES,
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
linkopts = select({
|
|
|
|
"@bazel_tools//src/conditions:windows": [
|
|
|
|
],
|
|
|
|
"//conditions:default": [
|
|
|
|
"-lpthread",
|
|
|
|
],
|
|
|
|
}),
|
2019-12-10 20:33:24 +08:00
|
|
|
visibility = ["//streaming:__subpackages__"],
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
2019-07-08 22:41:37 +08:00
|
|
|
":common_cc_proto",
|
2019-01-20 12:16:47 -08:00
|
|
|
":gcs",
|
2019-08-17 19:11:32 -07:00
|
|
|
":node_manager_fbs",
|
2019-06-26 05:31:19 +08:00
|
|
|
":node_manager_rpc",
|
2019-01-20 12:16:47 -08:00
|
|
|
":object_manager",
|
|
|
|
":ray_common",
|
|
|
|
":ray_util",
|
2019-04-03 12:01:02 +08:00
|
|
|
":stats_lib",
|
2019-07-04 20:16:42 +08:00
|
|
|
":worker_rpc",
|
2019-01-20 12:16:47 -08:00
|
|
|
"@boost//:asio",
|
2019-04-03 12:01:02 +08:00
|
|
|
"@com_github_jupp0r_prometheus_cpp//pull",
|
|
|
|
"@com_google_absl//absl/base:core_headers",
|
2019-10-29 18:14:51 -07:00
|
|
|
"@com_google_absl//absl/container:flat_hash_set",
|
2019-04-03 12:01:02 +08:00
|
|
|
"@com_google_absl//absl/memory",
|
|
|
|
"@com_google_absl//absl/strings",
|
2019-01-20 12:16:47 -08:00
|
|
|
"@com_google_googletest//:gtest",
|
2019-04-03 12:01:02 +08:00
|
|
|
"@io_opencensus_cpp//opencensus/exporters/stats/prometheus:prometheus_exporter",
|
|
|
|
"@io_opencensus_cpp//opencensus/stats",
|
|
|
|
"@io_opencensus_cpp//opencensus/tags",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@plasma//:plasma_client",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-05-30 02:43:17 -07:00
|
|
|
cc_library(
|
|
|
|
name = "core_worker_lib",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/core_worker/*.cc",
|
2019-06-14 18:35:32 +08:00
|
|
|
"src/ray/core_worker/store_provider/*.cc",
|
2019-08-06 04:14:45 +08:00
|
|
|
"src/ray/core_worker/store_provider/memory_store/*.cc",
|
2019-06-14 18:35:32 +08:00
|
|
|
"src/ray/core_worker/transport/*.cc",
|
2019-11-06 13:00:39 -08:00
|
|
|
"src/ray/rpc/worker/*.cc",
|
2019-05-30 02:43:17 -07:00
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"src/ray/core_worker/*_test.cc",
|
2019-06-12 10:10:12 +08:00
|
|
|
"src/ray/core_worker/mock_worker.cc",
|
2019-05-30 02:43:17 -07:00
|
|
|
],
|
|
|
|
),
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/core_worker/*.h",
|
2019-06-14 18:35:32 +08:00
|
|
|
"src/ray/core_worker/store_provider/*.h",
|
2019-08-06 04:14:45 +08:00
|
|
|
"src/ray/core_worker/store_provider/memory_store/*.h",
|
2019-06-14 18:35:32 +08:00
|
|
|
"src/ray/core_worker/transport/*.h",
|
2019-05-30 02:43:17 -07:00
|
|
|
]),
|
|
|
|
copts = COPTS,
|
2019-12-10 20:33:24 +08:00
|
|
|
visibility = ["//visibility:public"],
|
2019-05-30 02:43:17 -07:00
|
|
|
deps = [
|
2019-11-01 14:41:14 -07:00
|
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
2019-10-29 18:14:51 -07:00
|
|
|
"@com_google_absl//absl/container:flat_hash_set",
|
2019-11-06 13:00:39 -08:00
|
|
|
":worker_cc_proto",
|
2019-05-30 02:43:17 -07:00
|
|
|
":ray_common",
|
|
|
|
":ray_util",
|
2019-07-11 17:07:04 +08:00
|
|
|
# TODO(hchen): After `raylet_client` is migrated to gRPC, `core_worker_lib`
|
|
|
|
# should only depend on `raylet_client`, instead of the whole `raylet_lib`.
|
2019-06-03 19:59:43 +08:00
|
|
|
":raylet_lib",
|
2019-07-04 20:16:42 +08:00
|
|
|
":worker_rpc",
|
2019-07-30 17:47:17 +08:00
|
|
|
":gcs",
|
2019-11-21 11:56:46 -08:00
|
|
|
"@boost//:fiber",
|
2019-05-30 02:43:17 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-07-30 17:47:17 +08:00
|
|
|
cc_library(
|
|
|
|
name = "mock_worker_lib",
|
|
|
|
srcs = ["src/ray/core_worker/test/mock_worker.cc"],
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/core_worker/test/*.h",
|
|
|
|
]),
|
2019-06-12 10:10:12 +08:00
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_lib",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-06-03 19:59:43 +08:00
|
|
|
cc_binary(
|
2019-07-30 17:47:17 +08:00
|
|
|
name = "mock_worker",
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":mock_worker_lib",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "core_worker_test_lib",
|
|
|
|
srcs = ["src/ray/core_worker/test/core_worker_test.cc"],
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/core_worker/test/*.h",
|
|
|
|
]),
|
2019-05-30 02:43:17 -07:00
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_lib",
|
2019-06-03 19:59:43 +08:00
|
|
|
":gcs",
|
2019-11-01 14:41:14 -07:00
|
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
|
|
|
"@com_google_absl//absl/container:flat_hash_set",
|
2019-05-30 02:43:17 -07:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-07-30 17:47:17 +08:00
|
|
|
cc_binary(
|
|
|
|
name = "core_worker_test",
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_test_lib",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-20 16:45:19 -08:00
|
|
|
cc_test(
|
|
|
|
name = "direct_actor_transport_test",
|
|
|
|
srcs = ["src/ray/core_worker/test/direct_actor_transport_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-12 11:45:28 -08:00
|
|
|
cc_test(
|
|
|
|
name = "direct_task_transport_test",
|
|
|
|
srcs = ["src/ray/core_worker/test/direct_task_transport_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-07 18:37:10 -08:00
|
|
|
cc_test(
|
|
|
|
name = "reference_count_test",
|
|
|
|
srcs = ["src/ray/core_worker/reference_count_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-09-14 22:31:33 -07:00
|
|
|
cc_test(
|
|
|
|
name = "scheduling_queue_test",
|
|
|
|
srcs = ["src/ray/core_worker/test/scheduling_queue_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-25 16:37:26 -08:00
|
|
|
cc_test(
|
|
|
|
name = "task_manager_test",
|
|
|
|
srcs = ["src/ray/core_worker/test/task_manager_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":core_worker_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-15 16:04:16 -08:00
|
|
|
cc_test(
|
|
|
|
name = "scheduling_test",
|
|
|
|
srcs = ["src/ray/common/scheduling/scheduling_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":ray_common",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
cc_test(
|
|
|
|
name = "lineage_cache_test",
|
|
|
|
srcs = ["src/ray/raylet/lineage_cache_test.cc"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
2019-08-17 19:11:32 -07:00
|
|
|
":node_manager_fbs",
|
2019-01-20 12:16:47 -08:00
|
|
|
":raylet_lib",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "reconstruction_policy_test",
|
|
|
|
srcs = ["src/ray/raylet/reconstruction_policy_test.cc"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
2019-08-17 19:11:32 -07:00
|
|
|
":node_manager_fbs",
|
2019-01-20 12:16:47 -08:00
|
|
|
":object_manager",
|
2019-02-14 22:16:19 +08:00
|
|
|
":raylet_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "worker_pool_test",
|
|
|
|
srcs = ["src/ray/raylet/worker_pool_test.cc"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":raylet_lib",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-08-07 11:04:51 +08:00
|
|
|
cc_test(
|
|
|
|
name = "id_test",
|
|
|
|
srcs = ["src/ray/common/id_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
"ray_common",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
cc_test(
|
|
|
|
name = "logging_test",
|
|
|
|
srcs = ["src/ray/util/logging_test.cc"],
|
2019-02-24 00:00:50 -08:00
|
|
|
args = ["--gtest_filter=PrintLogTest*"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":ray_util",
|
2019-03-22 14:30:05 +08:00
|
|
|
"@boost//:asio",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-10-20 22:05:28 -07:00
|
|
|
cc_test(
|
|
|
|
name = "sample_test",
|
|
|
|
srcs = ["src/ray/util/sample_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":ray_common",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
cc_test(
|
|
|
|
name = "task_dependency_manager_test",
|
|
|
|
srcs = ["src/ray/raylet/task_dependency_manager_test.cc"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
2019-02-14 22:16:19 +08:00
|
|
|
":raylet_lib",
|
2019-01-20 12:16:47 -08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-02-23 11:58:59 -08:00
|
|
|
cc_test(
|
|
|
|
name = "client_connection_test",
|
|
|
|
srcs = ["src/ray/raylet/client_connection_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":raylet_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "signal_test",
|
|
|
|
srcs = ["src/ray/util/signal_test.cc"],
|
|
|
|
copts = COPTS,
|
|
|
|
deps = [
|
|
|
|
":raylet_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-04-03 12:01:02 +08:00
|
|
|
cc_test(
|
|
|
|
name = "stats_test",
|
|
|
|
srcs = ["src/ray/stats/stats_test.cc"],
|
2019-11-05 00:08:14 -08:00
|
|
|
copts = COPTS,
|
2019-04-03 12:01:02 +08:00
|
|
|
deps = [
|
|
|
|
":stats_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-15 13:23:42 +08:00
|
|
|
cc_test(
|
|
|
|
name = "gcs_server_rpc_test",
|
|
|
|
srcs = ["src/ray/gcs/gcs_server/test/gcs_server_rpc_test.cc"],
|
2019-12-20 14:28:04 +08:00
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
2019-12-15 13:23:42 +08:00
|
|
|
copts = COPTS,
|
2019-12-20 14:28:04 +08:00
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
2019-12-15 13:23:42 +08:00
|
|
|
deps = [
|
|
|
|
":gcs_server_lib",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
cc_library(
|
|
|
|
name = "object_manager",
|
|
|
|
srcs = glob([
|
|
|
|
"src/ray/object_manager/*.cc",
|
|
|
|
]),
|
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/object_manager/*.h",
|
|
|
|
]),
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
includes = [
|
|
|
|
"src",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
":object_manager_fbs",
|
2019-06-28 10:56:34 +08:00
|
|
|
":object_manager_rpc",
|
2019-01-20 12:16:47 -08:00
|
|
|
":ray_common",
|
|
|
|
":ray_util",
|
|
|
|
"@boost//:asio",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@plasma//:plasma_client",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "object_manager_test",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["src/ray/object_manager/test/object_manager_test.cc"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":object_manager",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "object_manager_stress_test",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["src/ray/object_manager/test/object_manager_stress_test.cc"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":object_manager",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-16 16:57:49 -08:00
|
|
|
cc_library(
|
|
|
|
name = "platform_shims",
|
|
|
|
srcs = [] + select({
|
|
|
|
"@bazel_tools//src/conditions:windows": glob([
|
|
|
|
"src/shims/windows/**/*.c",
|
|
|
|
"src/shims/windows/**/*.cc",
|
|
|
|
]),
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
hdrs = [] + select({
|
|
|
|
"@bazel_tools//src/conditions:windows": glob([
|
|
|
|
"src/shims/windows/**/*.h",
|
|
|
|
]),
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
copts = COPTS,
|
|
|
|
includes = [] + select({
|
|
|
|
"@bazel_tools//src/conditions:windows": [
|
|
|
|
"src/shims/windows",
|
|
|
|
],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
cc_library(
|
|
|
|
name = "ray_util",
|
2019-02-14 22:16:19 +08:00
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/util/*.cc",
|
|
|
|
],
|
|
|
|
exclude = [
|
2019-06-05 14:19:09 +08:00
|
|
|
"src/ray/util/*_test.cc",
|
2019-02-14 22:16:19 +08:00
|
|
|
],
|
|
|
|
),
|
2019-01-20 12:16:47 -08:00
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/util/*.h",
|
|
|
|
]),
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
includes = [
|
|
|
|
"src",
|
|
|
|
],
|
2019-12-10 20:33:24 +08:00
|
|
|
visibility = ["//visibility:public"],
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
2019-02-14 22:16:19 +08:00
|
|
|
":sha256",
|
|
|
|
"@com_github_google_glog//:glog",
|
2019-10-22 17:52:12 -07:00
|
|
|
"@com_google_absl//absl/time",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@plasma//:plasma_client",
|
2019-01-27 18:32:04 -08:00
|
|
|
],
|
2019-01-20 12:16:47 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "sha256",
|
|
|
|
srcs = [
|
|
|
|
"src/ray/thirdparty/sha256.c",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"src/ray/thirdparty/sha256.h",
|
|
|
|
],
|
2019-11-05 00:08:14 -08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
includes = ["src/ray/thirdparty"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "gcs",
|
2019-02-14 22:16:19 +08:00
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/ray/gcs/*.cc",
|
|
|
|
],
|
|
|
|
exclude = [
|
|
|
|
"src/ray/gcs/*_test.cc",
|
|
|
|
],
|
|
|
|
),
|
2019-01-20 12:16:47 -08:00
|
|
|
hdrs = glob([
|
|
|
|
"src/ray/gcs/*.h",
|
2019-12-12 16:57:32 +08:00
|
|
|
"src/ray/gcs/test/*.h",
|
2019-01-20 12:16:47 -08:00
|
|
|
]),
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
2019-06-26 05:31:19 +08:00
|
|
|
":gcs_cc_proto",
|
2019-08-17 19:11:32 -07:00
|
|
|
":node_manager_fbs",
|
2019-06-26 05:31:19 +08:00
|
|
|
":node_manager_rpc",
|
2019-01-20 12:16:47 -08:00
|
|
|
":ray_common",
|
2019-02-14 22:16:19 +08:00
|
|
|
":ray_util",
|
2019-04-03 12:01:02 +08:00
|
|
|
":stats_lib",
|
2019-01-20 12:16:47 -08:00
|
|
|
"@boost//:asio",
|
2019-11-29 15:32:45 -08:00
|
|
|
"@redis//:hiredis",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-26 14:34:35 +08:00
|
|
|
# TODO(micafan) Support test group in future. Use test group we can run all gcs test once.
|
|
|
|
cc_test(
|
2019-07-19 11:28:34 +08:00
|
|
|
name = "redis_gcs_client_test",
|
2019-12-12 16:57:32 +08:00
|
|
|
srcs = ["src/ray/gcs/test/redis_gcs_client_test.cc"],
|
2019-12-26 14:34:35 +08:00
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
2019-07-19 11:28:34 +08:00
|
|
|
copts = COPTS,
|
2019-12-26 14:34:35 +08:00
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
2019-07-19 11:28:34 +08:00
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-26 14:34:35 +08:00
|
|
|
cc_test(
|
2019-12-05 13:38:29 +08:00
|
|
|
name = "redis_actor_info_accessor_test",
|
2019-12-12 16:57:32 +08:00
|
|
|
srcs = ["src/ray/gcs/test/redis_actor_info_accessor_test.cc"],
|
2019-12-26 14:34:35 +08:00
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-12-26 14:34:35 +08:00
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-27 15:18:54 +08:00
|
|
|
cc_test(
|
|
|
|
name = "redis_object_info_accessor_test",
|
|
|
|
srcs = ["src/ray/gcs/test/redis_object_info_accessor_test.cc"],
|
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
|
|
|
copts = COPTS,
|
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-26 14:34:35 +08:00
|
|
|
cc_test(
|
2019-08-20 20:32:53 +08:00
|
|
|
name = "subscription_executor_test",
|
2019-12-12 16:57:32 +08:00
|
|
|
srcs = ["src/ray/gcs/test/subscription_executor_test.cc"],
|
2019-12-26 14:34:35 +08:00
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
2019-12-12 16:57:32 +08:00
|
|
|
copts = COPTS,
|
2019-12-26 14:34:35 +08:00
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
2019-12-12 16:57:32 +08:00
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-26 14:34:35 +08:00
|
|
|
cc_test(
|
2019-12-12 16:57:32 +08:00
|
|
|
name = "redis_job_info_accessor_test",
|
|
|
|
srcs = ["src/ray/gcs/test/redis_job_info_accessor_test.cc"],
|
2019-12-26 14:34:35 +08:00
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
2019-08-20 20:32:53 +08:00
|
|
|
copts = COPTS,
|
2019-12-26 14:34:35 +08:00
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
2019-08-20 20:32:53 +08:00
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-01-03 14:07:37 +08:00
|
|
|
cc_test(
|
|
|
|
name = "redis_node_info_accessor_test",
|
|
|
|
srcs = ["src/ray/gcs/test/redis_node_info_accessor_test.cc"],
|
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
|
|
|
copts = COPTS,
|
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-12-26 14:34:35 +08:00
|
|
|
cc_test(
|
2019-01-20 12:16:47 -08:00
|
|
|
name = "asio_test",
|
2019-12-12 16:57:32 +08:00
|
|
|
srcs = ["src/ray/gcs/test/asio_test.cc"],
|
2019-12-26 14:34:35 +08:00
|
|
|
args = ["$(location redis-server) $(location redis-cli) $(location libray_redis_module.so)"],
|
2019-02-14 22:16:19 +08:00
|
|
|
copts = COPTS,
|
2019-12-26 14:34:35 +08:00
|
|
|
data = [
|
|
|
|
"//:libray_redis_module.so",
|
|
|
|
"//:redis-cli",
|
|
|
|
"//:redis-server",
|
|
|
|
],
|
2019-01-20 12:16:47 -08:00
|
|
|
deps = [
|
|
|
|
":gcs",
|
|
|
|
":ray_util",
|
2019-02-14 22:16:19 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
2019-01-20 12:16:47 -08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
FLATC_ARGS = [
|
|
|
|
"--gen-object-api",
|
|
|
|
"--gen-mutable",
|
|
|
|
"--scoped-enums",
|
|
|
|
]
|
|
|
|
|
|
|
|
flatbuffer_cc_library(
|
|
|
|
name = "common_fbs",
|
|
|
|
srcs = ["@plasma//:cpp/src/plasma/format/common.fbs"],
|
|
|
|
flatc_args = FLATC_ARGS,
|
2019-02-14 22:16:19 +08:00
|
|
|
out_prefix = "src/ray/common/",
|
2019-01-20 12:16:47 -08:00
|
|
|
)
|
|
|
|
|
2019-08-17 19:11:32 -07:00
|
|
|
flatbuffer_cc_library(
|
|
|
|
name = "node_manager_fbs",
|
|
|
|
srcs = ["src/ray/raylet/format/node_manager.fbs"],
|
|
|
|
flatc_args = FLATC_ARGS,
|
|
|
|
out_prefix = "src/ray/raylet/format/",
|
|
|
|
)
|
|
|
|
|
2019-01-20 12:16:47 -08:00
|
|
|
flatbuffer_cc_library(
|
|
|
|
name = "object_manager_fbs",
|
|
|
|
srcs = ["src/ray/object_manager/format/object_manager.fbs"],
|
|
|
|
flatc_args = FLATC_ARGS,
|
|
|
|
out_prefix = "src/ray/object_manager/format/",
|
|
|
|
)
|
2019-01-25 00:57:31 -08:00
|
|
|
|
|
|
|
pyx_library(
|
|
|
|
name = "_raylet",
|
|
|
|
srcs = glob([
|
|
|
|
"python/ray/__init__.py",
|
2019-12-10 20:33:24 +08:00
|
|
|
"python/ray/_raylet.pxd",
|
2019-01-25 00:57:31 -08:00
|
|
|
"python/ray/_raylet.pyx",
|
|
|
|
"python/ray/includes/*.pxd",
|
2019-02-14 22:16:19 +08:00
|
|
|
"python/ray/includes/*.pxi",
|
2019-01-25 00:57:31 -08:00
|
|
|
]),
|
2019-12-10 20:33:24 +08:00
|
|
|
# Export ray ABI symbols, which can then be used by _streaming.so.
|
|
|
|
# We need to dlopen this lib with RTLD_GLOBAL to use ABI in this
|
|
|
|
# shared lib, see python/ray/__init__.py.
|
|
|
|
cc_kwargs = {
|
|
|
|
"linkstatic": 1,
|
|
|
|
# see https://github.com/tensorflow/tensorflow/blob/r2.1/tensorflow/lite/BUILD#L444
|
|
|
|
"linkopts": select({
|
2019-12-17 02:38:36 -08:00
|
|
|
"@bazel_tools//src/conditions:darwin": [
|
2019-12-10 20:33:24 +08:00
|
|
|
"-Wl,-exported_symbols_list,$(location //:src/ray/ray_exported_symbols.lds)",
|
|
|
|
],
|
2019-12-17 02:38:36 -08:00
|
|
|
"@bazel_tools//src/conditions:windows": [
|
|
|
|
],
|
2019-12-10 20:33:24 +08:00
|
|
|
"//conditions:default": [
|
|
|
|
"-Wl,--version-script,$(location //:src/ray/ray_version_script.lds)",
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
},
|
2019-12-17 02:38:36 -08:00
|
|
|
copts = COPTS,
|
2019-09-12 23:07:46 -07:00
|
|
|
deps = [
|
|
|
|
"//:core_worker_lib",
|
|
|
|
"//:raylet_lib",
|
2019-10-03 09:20:26 -07:00
|
|
|
"//:serialization_cc_proto",
|
2019-12-10 20:33:24 +08:00
|
|
|
"//:src/ray/ray_exported_symbols.lds",
|
|
|
|
"//:src/ray/ray_version_script.lds",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
pyx_library(
|
|
|
|
name = "_streaming",
|
|
|
|
srcs = glob([
|
|
|
|
"python/ray/streaming/_streaming.pyx",
|
|
|
|
"python/ray/__init__.py",
|
|
|
|
"python/ray/_raylet.pxd",
|
|
|
|
"python/ray/includes/*.pxd",
|
|
|
|
"python/ray/includes/*.pxi",
|
|
|
|
"python/ray/streaming/__init__.pxd",
|
|
|
|
"python/ray/streaming/includes/*.pxd",
|
|
|
|
"python/ray/streaming/includes/*.pxi",
|
|
|
|
]),
|
2019-12-17 02:38:36 -08:00
|
|
|
copts = COPTS,
|
2019-12-10 20:33:24 +08:00
|
|
|
deps = [
|
|
|
|
"//streaming:streaming_lib",
|
2019-09-12 23:07:46 -07:00
|
|
|
],
|
2019-01-25 00:57:31 -08:00
|
|
|
)
|
2019-01-27 18:32:04 -08:00
|
|
|
|
2019-02-05 05:03:46 +08:00
|
|
|
cc_binary(
|
2019-07-16 20:58:02 +08:00
|
|
|
name = "libcore_worker_library_java.so",
|
|
|
|
srcs = glob([
|
|
|
|
"src/ray/core_worker/lib/java/*.h",
|
|
|
|
"src/ray/core_worker/lib/java/*.cc",
|
|
|
|
]) + [
|
2019-02-20 22:37:41 +08:00
|
|
|
"@bazel_tools//tools/jdk:jni_header",
|
|
|
|
] + select({
|
|
|
|
"@bazel_tools//src/conditions:windows": ["@bazel_tools//tools/jdk:jni_md_header-windows"],
|
|
|
|
"@bazel_tools//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"],
|
|
|
|
"//conditions:default": ["@bazel_tools//tools/jdk:jni_md_header-linux"],
|
|
|
|
}),
|
2019-02-05 05:03:46 +08:00
|
|
|
includes = [
|
|
|
|
"src",
|
2019-02-20 22:37:41 +08:00
|
|
|
"external/bazel_tools/tools/jdk/include",
|
2019-02-14 22:16:19 +08:00
|
|
|
] + select({
|
2019-02-20 22:37:41 +08:00
|
|
|
"@bazel_tools//src/conditions:windows": ["external/bazel_tools/tools/jdk/include/windows"],
|
|
|
|
"@bazel_tools//src/conditions:darwin": ["external/bazel_tools/tools/jdk/include/darwin"],
|
|
|
|
"//conditions:default": ["external/bazel_tools/tools/jdk/include/linux"],
|
2019-02-14 22:16:19 +08:00
|
|
|
}),
|
2019-12-22 10:56:05 +08:00
|
|
|
# Export ray ABI symbols, which can then be used by libstreaming_java.so. see `//:_raylet`
|
|
|
|
linkopts = select({
|
|
|
|
"@bazel_tools//src/conditions:darwin": [
|
|
|
|
"-Wl,-exported_symbols_list,$(location //:src/ray/ray_exported_symbols.lds)",
|
|
|
|
],
|
|
|
|
"@bazel_tools//src/conditions:windows": [
|
|
|
|
],
|
|
|
|
"//conditions:default": [
|
|
|
|
"-Wl,--version-script,$(location //:src/ray/ray_version_script.lds)",
|
|
|
|
],
|
|
|
|
}),
|
2019-02-05 05:03:46 +08:00
|
|
|
linkshared = 1,
|
2019-03-22 14:30:05 +08:00
|
|
|
linkstatic = 1,
|
2019-02-14 22:16:19 +08:00
|
|
|
deps = [
|
2019-07-16 20:58:02 +08:00
|
|
|
"//:core_worker_lib",
|
2019-12-22 10:56:05 +08:00
|
|
|
"//:src/ray/ray_exported_symbols.lds",
|
|
|
|
"//:src/ray/ray_version_script.lds",
|
2019-02-14 22:16:19 +08:00
|
|
|
],
|
2019-02-05 05:03:46 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
genrule(
|
2019-07-16 20:58:02 +08:00
|
|
|
name = "core_worker-jni-darwin-compat",
|
|
|
|
srcs = [":libcore_worker_library_java.so"],
|
|
|
|
outs = ["libcore_worker_library_java.dylib"],
|
2019-02-05 05:03:46 +08:00
|
|
|
cmd = "cp $< $@",
|
|
|
|
output_to_bindir = 1,
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
2019-07-16 20:58:02 +08:00
|
|
|
name = "core_worker_library_java",
|
2019-02-05 05:03:46 +08:00
|
|
|
srcs = select({
|
2019-07-16 20:58:02 +08:00
|
|
|
"@bazel_tools//src/conditions:darwin": [":libcore_worker_library_java.dylib"],
|
|
|
|
"//conditions:default": [":libcore_worker_library_java.so"],
|
2019-02-14 22:16:19 +08:00
|
|
|
}),
|
2019-03-22 14:30:05 +08:00
|
|
|
visibility = ["//java:__subpackages__"],
|
|
|
|
)
|
|
|
|
|
2019-01-27 18:32:04 -08:00
|
|
|
filegroup(
|
|
|
|
name = "python_sources",
|
|
|
|
srcs = glob([
|
|
|
|
"python/ray/*.py",
|
|
|
|
"python/ray/autoscaler/*.py",
|
2019-02-23 11:58:59 -08:00
|
|
|
"python/ray/autoscaler/aws/example-full.yaml",
|
|
|
|
"python/ray/autoscaler/gcp/example-full.yaml",
|
|
|
|
"python/ray/autoscaler/local/example-full.yaml",
|
2019-01-27 18:32:04 -08:00
|
|
|
"python/ray/cloudpickle/*.py",
|
|
|
|
"python/ray/core/__init__.py",
|
|
|
|
"python/ray/core/generated/__init__.py",
|
|
|
|
"python/ray/core/generated/ray/__init__.py",
|
|
|
|
"python/ray/core/generated/ray/protocol/__init__.py",
|
2019-02-27 18:36:49 -08:00
|
|
|
"python/ray/dashboard/dashboard.py",
|
2019-01-27 18:32:04 -08:00
|
|
|
"python/ray/experimental/*.py",
|
|
|
|
"python/ray/internal/*.py",
|
2019-08-06 14:36:04 -07:00
|
|
|
"python/ray/projects/*.py",
|
|
|
|
"python/ray/projects/schema.json",
|
2019-09-16 19:58:54 -07:00
|
|
|
"python/ray/projects/templates/cluster_template.yaml",
|
|
|
|
"python/ray/projects/templates/project_template.yaml",
|
|
|
|
"python/ray/projects/templates/requirements.txt",
|
2019-02-14 22:16:19 +08:00
|
|
|
"python/ray/workers/default_worker.py",
|
|
|
|
]),
|
2019-01-27 18:32:04 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
genrule(
|
|
|
|
name = "redis",
|
2019-02-23 11:58:59 -08:00
|
|
|
outs = [
|
|
|
|
"redis-server",
|
|
|
|
"redis-cli",
|
|
|
|
],
|
2019-01-27 18:32:04 -08:00
|
|
|
cmd = """
|
|
|
|
set -x &&
|
2019-11-05 00:08:14 -08:00
|
|
|
curl -sL \"https://github.com/antirez/redis/archive/5.0.3.tar.gz\" | tar -xzf - --strip-components=1 -C . &&
|
2019-01-27 18:32:04 -08:00
|
|
|
make &&
|
2019-02-23 11:58:59 -08:00
|
|
|
mv ./src/redis-server $(location redis-server) &&
|
|
|
|
chmod +x $(location redis-server) &&
|
|
|
|
mv ./src/redis-cli $(location redis-cli) &&
|
|
|
|
chmod +x $(location redis-cli)
|
2019-01-27 18:32:04 -08:00
|
|
|
""",
|
2019-03-22 14:30:05 +08:00
|
|
|
visibility = ["//java:__subpackages__"],
|
2019-01-27 18:32:04 -08:00
|
|
|
)
|
|
|
|
|
2019-02-23 11:58:59 -08:00
|
|
|
cc_binary(
|
2019-03-22 14:30:05 +08:00
|
|
|
name = "libray_redis_module.so",
|
2019-01-27 18:32:04 -08:00
|
|
|
srcs = [
|
|
|
|
"src/ray/gcs/redis_module/ray_redis_module.cc",
|
2019-02-14 22:16:19 +08:00
|
|
|
"src/ray/gcs/redis_module/redis_string.h",
|
|
|
|
"src/ray/gcs/redis_module/redismodule.h",
|
2019-01-27 18:32:04 -08:00
|
|
|
],
|
2019-02-23 11:58:59 -08:00
|
|
|
copts = COPTS,
|
|
|
|
linkshared = 1,
|
|
|
|
linkstatic = 1,
|
2019-03-22 14:30:05 +08:00
|
|
|
visibility = ["//java:__subpackages__"],
|
2019-01-27 18:32:04 -08:00
|
|
|
deps = [
|
2019-06-26 05:31:19 +08:00
|
|
|
":gcs_cc_proto",
|
2019-02-14 22:16:19 +08:00
|
|
|
":ray_common",
|
|
|
|
],
|
2019-01-27 18:32:04 -08:00
|
|
|
)
|
|
|
|
|
2019-07-08 22:41:37 +08:00
|
|
|
filegroup(
|
|
|
|
name = "all_py_proto",
|
|
|
|
srcs = [
|
|
|
|
"common_py_proto",
|
|
|
|
"gcs_py_proto",
|
2019-10-26 16:37:39 -07:00
|
|
|
"node_manager_py_proto",
|
2019-07-08 22:41:37 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-24 11:43:34 -08:00
|
|
|
# This is a dummy test dependency that causes the python tests to be
|
|
|
|
# re-run if any of these files changes.
|
|
|
|
py_library(
|
|
|
|
name = "ray_lib",
|
|
|
|
srcs = glob(
|
|
|
|
["python/ray/**/*.py"],
|
|
|
|
exclude = ["python/ray/tests/*.py"],
|
|
|
|
),
|
|
|
|
visibility = ["__subpackages__"],
|
|
|
|
)
|
|
|
|
|
2019-12-17 02:38:36 -08:00
|
|
|
genrule(
|
|
|
|
name = "cp_streaming_lib",
|
|
|
|
srcs = ["python/ray/streaming/_streaming.so"],
|
|
|
|
outs = ["cp_streaming_lib.out"],
|
|
|
|
cmd = """
|
|
|
|
set -x &&
|
|
|
|
WORK_DIR=$$(pwd) &&
|
|
|
|
cp -f $(location python/ray/streaming/_streaming.so) "$$WORK_DIR/python/ray/streaming" &&
|
|
|
|
echo "$$WORK_DIR" > $@
|
|
|
|
""",
|
|
|
|
local = 1,
|
|
|
|
)
|
|
|
|
|
2019-01-27 18:32:04 -08:00
|
|
|
genrule(
|
|
|
|
name = "ray_pkg",
|
|
|
|
srcs = [
|
|
|
|
"python/ray/_raylet.so",
|
|
|
|
"//:python_sources",
|
2019-07-08 22:41:37 +08:00
|
|
|
"//:all_py_proto",
|
2019-01-27 18:32:04 -08:00
|
|
|
"//:redis-server",
|
2019-02-23 11:58:59 -08:00
|
|
|
"//:redis-cli",
|
2019-03-22 14:30:05 +08:00
|
|
|
"//:libray_redis_module.so",
|
2019-01-27 18:32:04 -08:00
|
|
|
"//:raylet",
|
|
|
|
"//:raylet_monitor",
|
2019-02-05 05:03:46 +08:00
|
|
|
"@plasma//:plasma_store_server",
|
2019-12-10 20:33:24 +08:00
|
|
|
"//streaming:copy_streaming_py_proto",
|
2019-12-17 02:38:36 -08:00
|
|
|
] + select({
|
|
|
|
"@bazel_tools//src/conditions:windows": [], # ignore build streaming for windows
|
|
|
|
"//conditions:default": [":cp_streaming_lib"],
|
|
|
|
}),
|
2019-03-22 14:30:05 +08:00
|
|
|
outs = ["ray_pkg.out"],
|
2019-01-27 18:32:04 -08:00
|
|
|
cmd = """
|
|
|
|
set -x &&
|
2019-03-22 14:30:05 +08:00
|
|
|
WORK_DIR=$$(pwd) &&
|
2019-11-05 00:08:14 -08:00
|
|
|
cp -f $(location python/ray/_raylet.so) "$$WORK_DIR/python/ray" &&
|
|
|
|
mkdir -p "$$WORK_DIR/python/ray/core/src/ray/thirdparty/redis/src/" &&
|
|
|
|
cp -f $(location //:redis-server) "$$WORK_DIR/python/ray/core/src/ray/thirdparty/redis/src/" &&
|
|
|
|
cp -f $(location //:redis-cli) "$$WORK_DIR/python/ray/core/src/ray/thirdparty/redis/src/" &&
|
|
|
|
mkdir -p "$$WORK_DIR/python/ray/core/src/ray/gcs/redis_module/" &&
|
|
|
|
cp -f $(locations //:libray_redis_module.so) "$$WORK_DIR/python/ray/core/src/ray/gcs/redis_module/" &&
|
|
|
|
cp -f $(location //:raylet_monitor) "$$WORK_DIR/python/ray/core/src/ray/raylet/" &&
|
|
|
|
cp -f $(location @plasma//:plasma_store_server) "$$WORK_DIR/python/ray/core/src/plasma/" &&
|
|
|
|
cp -f $(location //:raylet) "$$WORK_DIR/python/ray/core/src/ray/raylet/" &&
|
|
|
|
mkdir -p "$$WORK_DIR/python/ray/core/generated/ray/protocol/" &&
|
2019-07-08 22:41:37 +08:00
|
|
|
for f in $(locations //:all_py_proto); do
|
2019-11-05 00:08:14 -08:00
|
|
|
cp -f "$$f" "$$WORK_DIR/python/ray/core/generated/";
|
2019-06-26 05:31:19 +08:00
|
|
|
done &&
|
2019-07-08 22:41:37 +08:00
|
|
|
# NOTE(hchen): Protobuf doesn't allow specifying Python package name. So we use this `sed`
|
|
|
|
# command to change the import path in the generated file.
|
2019-11-05 00:08:14 -08:00
|
|
|
sed -i -E 's/from src.ray.protobuf/from ./' "$$WORK_DIR/python/ray/core/generated/gcs_pb2.py" &&
|
|
|
|
sed -i -E 's/from src.ray.protobuf/from ./' "$$WORK_DIR/python/ray/core/generated/common_pb2.py" &&
|
|
|
|
sed -i -E 's/from src.ray.protobuf/from ./' "$$WORK_DIR/python/ray/core/generated/node_manager_pb2.py" &&
|
|
|
|
sed -i -E 's/from src.ray.protobuf/from ./' "$$WORK_DIR/python/ray/core/generated/node_manager_pb2_grpc.py" &&
|
|
|
|
echo "$$WORK_DIR" > $@
|
2019-03-22 14:30:05 +08:00
|
|
|
""",
|
|
|
|
local = 1,
|
2019-01-27 18:32:04 -08:00
|
|
|
)
|