-
Notifications
You must be signed in to change notification settings - Fork 40
/
WORKSPACE.bazel
155 lines (128 loc) · 5.01 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache Software License 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
# which is available at https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
workspace(name = "org_eclipse_iceoryx_iceoryx2")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
# Setup gtest
GOOGLETEST_VERSION = "1.14.0"
maybe(
name = "googletest",
repo_rule = http_archive,
urls = ["https://github.com/google/googletest/archive/refs/tags/v{version}.zip".format(version = GOOGLETEST_VERSION)],
sha256 = "1f357c27ca988c3f7c6b4bf68a9395005ac6761f034046e9dde0896e3aba00e4",
strip_prefix = "googletest-{version}".format(version = GOOGLETEST_VERSION),
)
# Load Rust rules
# Use v0.26 to support bazel v6.2
maybe(
name = "rules_rust",
repo_rule = http_archive,
sha256 = "9d04e658878d23f4b00163a72da3db03ddb451273eb347df7d7c50838d698f49",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.26.0/rules_rust-v0.26.0.tar.gz"],
)
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
rules_rust_dependencies()
rust_register_toolchains(
edition = "2021",
versions = [
"1.80.0"
],
)
# Load prebuilt bindgen
maybe(
name = "bindgen",
repo_rule = http_archive,
sha256 = "b7e2321ee8c617f14ccc5b9f39b3a804db173ee217e924ad93ed16af6bc62b1d",
strip_prefix = "bindgen-cli-x86_64-unknown-linux-gnu",
urls = ["https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.5/bindgen-cli-x86_64-unknown-linux-gnu.tar.xz"],
build_file_content = """
filegroup(
name = "bindgen-cli",
srcs = ["bindgen"],
visibility = ["//visibility:public"],
)
""",
)
# Load prebuilt cbindgen
maybe(
name = "cbindgen",
repo_rule = http_file,
sha256 = "521836d00863cb129283054e5090eb17563614e6328b7a1610e30949a05feaea",
urls = ["https://github.com/mozilla/cbindgen/releases/download/0.26.0/cbindgen"],
executable = True,
)
# Load external crates
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
crate_universe_dependencies()
load("@rules_rust//crate_universe:defs.bzl", "crates_repository")
maybe(
name = "crate_index",
repo_rule = crates_repository,
cargo_lockfile = "//:Cargo.lock",
lockfile = "//:Cargo.Bazel.lock",
manifests = [
"//:Cargo.toml",
"//:benchmarks/event/Cargo.toml",
"//:benchmarks/publish-subscribe/Cargo.toml",
"//:benchmarks/queue/Cargo.toml",
"//:examples/Cargo.toml",
"//:iceoryx2/Cargo.toml",
"//:iceoryx2-bb/container/Cargo.toml",
"//:iceoryx2-bb/derive-macros/Cargo.toml",
"//:iceoryx2-bb/elementary/Cargo.toml",
"//:iceoryx2-bb/lock-free/Cargo.toml",
"//:iceoryx2-bb/log/Cargo.toml",
"//:iceoryx2-bb/memory/Cargo.toml",
"//:iceoryx2-bb/posix/Cargo.toml",
"//:iceoryx2-bb/system-types/Cargo.toml",
"//:iceoryx2-bb/testing/Cargo.toml",
"//:iceoryx2-bb/threadsafe/Cargo.toml",
"//:iceoryx2-bb/trait-tests/Cargo.toml",
"//:iceoryx2-cal/Cargo.toml",
"//:iceoryx2-cli/Cargo.toml",
"//:iceoryx2-ffi/ffi-macros/Cargo.toml",
"//:iceoryx2-ffi/ffi/Cargo.toml",
"//:iceoryx2-pal/concurrency-sync/Cargo.toml",
"//:iceoryx2-pal/configuration/Cargo.toml",
"//:iceoryx2-pal/posix/Cargo.toml",
],
)
load("@crate_index//:defs.bzl", "crate_repositories")
crate_repositories()
BAZEL_SKYLIB_VERSION = "1.7.1"
# Load skylib for custom build config
maybe(
name = "bazel_skylib",
repo_rule = http_archive,
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = BAZEL_SKYLIB_VERSION),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = BAZEL_SKYLIB_VERSION),
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
# Load iceoryx rules
ICEORYX_VERSION = "2.95.3"
maybe(
name = "iceoryx",
repo_rule = http_archive,
sha256 = "14b854906b58a48140a5d074167d5f3a5af2d578574940501a330954af79b9d4",
strip_prefix = "iceoryx-{}".format(ICEORYX_VERSION),
url = "https://github.com/eclipse-iceoryx/iceoryx/archive/v{}.tar.gz".format(ICEORYX_VERSION),
)
# Load iceoryx dependencies
load("@iceoryx//bazel:load_repositories.bzl", "load_repositories")
load_repositories()
# Setup iceoryx dependencies
load("@iceoryx//bazel:setup_repositories.bzl", "setup_repositories")
setup_repositories()