-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE.bazel
123 lines (94 loc) · 4.05 KB
/
WORKSPACE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A minimal WORKSPACE file showing how to use the Google Cloud Storage C++
# client library in Bazel-based projects.
workspace(name = "storage_quickstart")
# Add the necessary Starlark functions to fetch google-cloud-cpp.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch the Google Cloud C++ libraries.
# NOTE: Update this version and SHA256 as needed.
http_archive(
name = "com_github_googleapis_google_cloud_cpp",
sha256 = "e4e9eac1e7999eff195db270bc2a719004660b3730ebb5d2f444f2d2057e49b2",
strip_prefix = "google-cloud-cpp-1.35.0",
url = "https://github.com/googleapis/google-cloud-cpp/archive/v1.35.0.tar.gz",
)
# Load indirect dependencies due to
# https://github.com/bazelbuild/bazel/issues/1943
load("@com_github_googleapis_google_cloud_cpp//bazel:google_cloud_cpp_deps.bzl", "google_cloud_cpp_deps")
google_cloud_cpp_deps()
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
switched_rules_by_language(
name = "com_google_googleapis_imports",
cc = True,
grpc = True,
)
# grpc
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
grpc_extra_deps()
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# boost
# copied from here: https://github.com/nelhage/rules_boost
_RULES_BOOST_COMMIT = "630cf5dbad418ee8cfa637b1e33125b11807721d"
http_archive(
name = "com_github_nelhage_rules_boost",
sha256 = "8be3ad3578231579f3d289c0330fd90975fe437451830a569a9a35661104a211",
strip_prefix = "rules_boost-%s" % _RULES_BOOST_COMMIT,
urls = [
"https://github.com/nelhage/rules_boost/archive/%s.tar.gz" % _RULES_BOOST_COMMIT,
],
)
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
boost_deps()
# otel
http_archive(
name = "io_opentelemetry_cpp",
strip_prefix = "opentelemetry-cpp-main",
urls = ["https://github.com/open-telemetry/opentelemetry-cpp/archive/main.zip"],
)
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
# OTLP Protocol definition
maybe(
http_archive,
name = "com_github_opentelemetry_proto",
build_file = "@io_opentelemetry_cpp//bazel:opentelemetry_proto.BUILD",
#sha256 = "08f090570e0a112bfae276ba37e9c45bf724b64d902a7a001db33123b840ebd6",
#sha256 = "9657f2f70739433d27412fe99d81479676814e26",
strip_prefix = "opentelemetry-proto-0.16.0",
urls = [
"https://github.com/open-telemetry/opentelemetry-proto/archive/v0.16.0.tar.gz",
],
)
# used https://github.com/GoogleCloudPlatform/opentelemetry-operations-cpp/blob/main/WORKSPACE
http_archive(
name = "bazel_skylib",
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz"],
sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
)
# for tests
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/011959aafddcd30611003de96cfd8d7a7685c700.zip"],
strip_prefix = "googletest-011959aafddcd30611003de96cfd8d7a7685c700",
)
# for benchmarks
http_archive(
name = "com_github_google_benchmark",
urls = ["https://github.com/google/benchmark/archive/bf585a2789e30585b4e3ce6baf11ef2750b54677.zip"],
strip_prefix = "benchmark-bf585a2789e30585b4e3ce6baf11ef2750b54677",
sha256 = "2a778d821997df7d8646c9c59b8edb9a573a6e04c534c01892a40aa524a7b68c",
)