[bazel] Add BUILD files for benchmark protos
This change adds BUILD files to //benchmarks that allow users to consume the .proto files in that directory to run benchmarks (e.g. for custom generators).
This commit is contained in:
parent
f154323fa6
commit
c5abd97e36
53
benchmarks/BUILD
Normal file
53
benchmarks/BUILD
Normal file
@ -0,0 +1,53 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
|
||||
load("@rules_java//java:defs.bzl", "java_proto_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
proto_library(
|
||||
name = "benchmarks_proto",
|
||||
srcs = [
|
||||
"benchmarks.proto",
|
||||
],
|
||||
strip_import_prefix = "/benchmarks",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "benchmarks_cc_proto",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"benchmarks_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "benchmarks_java_proto",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"benchmarks_proto",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "google_size_proto",
|
||||
srcs = [
|
||||
"google_size.proto",
|
||||
],
|
||||
strip_import_prefix = "/benchmarks",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "google_size_cc_proto",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"google_size_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "google_size_java_proto",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"google_size_proto",
|
||||
],
|
||||
)
|
51
benchmarks/datasets/BUILD
Normal file
51
benchmarks/datasets/BUILD
Normal file
@ -0,0 +1,51 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("@rules_java//java:defs.bzl", "java_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
filegroup(
|
||||
name = "datasets",
|
||||
srcs = [
|
||||
"//benchmarks/datasets/google_message1/proto2:datasets",
|
||||
"//benchmarks/datasets/google_message1/proto3:datasets",
|
||||
"//benchmarks/datasets/google_message2:datasets",
|
||||
"//benchmarks/datasets/google_message3:datasets",
|
||||
"//benchmarks/datasets/google_message4:datasets",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "protos",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//benchmarks/datasets/google_message1/proto2:benchmark_message1_proto2_proto",
|
||||
"//benchmarks/datasets/google_message1/proto3:benchmark_message1_proto3_proto",
|
||||
"//benchmarks/datasets/google_message2:benchmark_message2_proto",
|
||||
"//benchmarks/datasets/google_message3:benchmark_message3_proto",
|
||||
"//benchmarks/datasets/google_message4:benchmark_message4_proto",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "cc_protos",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//benchmarks/datasets/google_message1/proto2:benchmark_message1_proto2_cc_proto",
|
||||
"//benchmarks/datasets/google_message1/proto3:benchmark_message1_proto3_cc_proto",
|
||||
"//benchmarks/datasets/google_message2:benchmark_message2_cc_proto",
|
||||
"//benchmarks/datasets/google_message3:benchmark_message3_cc_proto",
|
||||
"//benchmarks/datasets/google_message4:benchmark_message4_cc_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "java_protos",
|
||||
visibility = ["//visibility:public"],
|
||||
exports = [
|
||||
"//benchmarks/datasets/google_message1/proto2:benchmark_message1_proto2_java_proto",
|
||||
"//benchmarks/datasets/google_message1/proto3:benchmark_message1_proto3_java_proto",
|
||||
"//benchmarks/datasets/google_message2:benchmark_message2_java_proto",
|
||||
"//benchmarks/datasets/google_message3:benchmark_message3_java_proto",
|
||||
"//benchmarks/datasets/google_message4:benchmark_message4_java_proto",
|
||||
],
|
||||
)
|
44
benchmarks/datasets/google_message1/proto2/BUILD
Normal file
44
benchmarks/datasets/google_message1/proto2/BUILD
Normal file
@ -0,0 +1,44 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
|
||||
load("@rules_java//java:defs.bzl", "java_proto_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
filegroup(
|
||||
name = "datasets",
|
||||
srcs = [
|
||||
"dataset.google_message1_proto2.pb",
|
||||
],
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "benchmark_message1_proto2_proto",
|
||||
srcs = [
|
||||
"benchmark_message1_proto2.proto",
|
||||
],
|
||||
strip_import_prefix = "/benchmarks",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "benchmark_message1_proto2_cc_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message1_proto2_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "benchmark_message1_proto2_java_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message1_proto2_proto",
|
||||
],
|
||||
)
|
44
benchmarks/datasets/google_message1/proto3/BUILD
Normal file
44
benchmarks/datasets/google_message1/proto3/BUILD
Normal file
@ -0,0 +1,44 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
|
||||
load("@rules_java//java:defs.bzl", "java_proto_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
filegroup(
|
||||
name = "datasets",
|
||||
srcs = [
|
||||
"dataset.google_message1_proto3.pb",
|
||||
],
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "benchmark_message1_proto3_proto",
|
||||
srcs = [
|
||||
"benchmark_message1_proto3.proto",
|
||||
],
|
||||
strip_import_prefix = "/benchmarks",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "benchmark_message1_proto3_cc_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message1_proto3_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "benchmark_message1_proto3_java_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message1_proto3_proto",
|
||||
],
|
||||
)
|
44
benchmarks/datasets/google_message2/BUILD
Normal file
44
benchmarks/datasets/google_message2/BUILD
Normal file
@ -0,0 +1,44 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
|
||||
load("@rules_java//java:defs.bzl", "java_proto_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
filegroup(
|
||||
name = "datasets",
|
||||
srcs = [
|
||||
"dataset.google_message2.pb",
|
||||
],
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "benchmark_message2_proto",
|
||||
srcs = [
|
||||
"benchmark_message2.proto",
|
||||
],
|
||||
strip_import_prefix = "/benchmarks",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "benchmark_message2_cc_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message2_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "benchmark_message2_java_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message2_proto",
|
||||
],
|
||||
)
|
50
benchmarks/datasets/google_message3/BUILD
Normal file
50
benchmarks/datasets/google_message3/BUILD
Normal file
@ -0,0 +1,50 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
|
||||
load("@rules_java//java:defs.bzl", "java_proto_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
filegroup(
|
||||
name = "datasets",
|
||||
srcs = [],
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "benchmark_message3_proto",
|
||||
srcs = [
|
||||
"benchmark_message3.proto",
|
||||
"benchmark_message3_1.proto",
|
||||
"benchmark_message3_2.proto",
|
||||
"benchmark_message3_3.proto",
|
||||
"benchmark_message3_4.proto",
|
||||
"benchmark_message3_5.proto",
|
||||
"benchmark_message3_6.proto",
|
||||
"benchmark_message3_7.proto",
|
||||
"benchmark_message3_8.proto",
|
||||
],
|
||||
strip_import_prefix = "/benchmarks",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "benchmark_message3_cc_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message3_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "benchmark_message3_java_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message3_proto",
|
||||
],
|
||||
)
|
45
benchmarks/datasets/google_message4/BUILD
Normal file
45
benchmarks/datasets/google_message4/BUILD
Normal file
@ -0,0 +1,45 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
|
||||
load("@rules_java//java:defs.bzl", "java_proto_library")
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
filegroup(
|
||||
name = "datasets",
|
||||
srcs = [],
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "benchmark_message4_proto",
|
||||
srcs = [
|
||||
"benchmark_message4.proto",
|
||||
"benchmark_message4_1.proto",
|
||||
"benchmark_message4_2.proto",
|
||||
"benchmark_message4_3.proto",
|
||||
],
|
||||
strip_import_prefix = "/benchmarks",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "benchmark_message4_cc_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message4_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "benchmark_message4_java_proto",
|
||||
visibility = [
|
||||
"//benchmarks/datasets:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"benchmark_message4_proto",
|
||||
],
|
||||
)
|
Loading…
Reference in New Issue
Block a user