forked from stratum/stratum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
153 lines (119 loc) · 5.23 KB
/
WORKSPACE
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
#
# Copyright 2018 Google LLC
# Copyright 2018-present Open Networking Foundation
#
# 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
#
# http://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.
#
workspace(name = "com_github_stratum_stratum")
# ---------------------------------------------------------------------------
# Dependency overrides
#
# If you would like to override a dependency, you can do so in
# this section. Be sure to use the same name as the dependency
# that you are overriding. You can use a local version of the
# dependency or a remote one.
#
# Example:
#
# local_repository(
# name = "com_github_opennetworklinux",
# path = "~/OpenNetworkLinux",
# )
#
# Please do not push changes to this section upstream.
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
# Load tools to build Stratum
# ---------------------------------------------------------------------------
load("//bazel/rules:build_tools.bzl", "build_tools_deps")
build_tools_deps()
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()
load("//bazel/rules:proto_gen.bzl", "proto_gen_deps")
proto_gen_deps()
# ---------------------------------------------------------------------------
# Load Stratum dependencies
# ---------------------------------------------------------------------------
load("//bazel:deps.bzl", "stratum_deps")
stratum_deps()
# ---------------------------------------------------------------------------
# Load transitive dependencies
# ---------------------------------------------------------------------------
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@io_bazel_rules_python//python:pip.bzl", "pip_repositories", "pip_import")
pip_import(
name = "grpc_python_dependencies",
requirements = "@com_github_grpc_grpc//:requirements.bazel.txt",
)
load("@com_github_grpc_grpc//bazel:grpc_python_deps.bzl", "grpc_python_deps")
grpc_python_deps()
load("//stratum/hal/bin/bmv2:bmv2.bzl", "bmv2_configure")
bmv2_configure(name = "local_bmv2_bin")
load("//stratum/hal/lib/barefoot:barefoot.bzl", "barefoot_configure")
barefoot_configure(name = "local_barefoot_bin")
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
boost_deps()
load("//stratum/hal/lib/phal/onlp:onlp.bzl", "onlp_configure")
onlp_configure(name = "local_onlp_bin")
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
switched_rules_by_language(
name = "com_google_googleapis_imports",
grpc = True,
cc = True,
python = True,
)
# ---------------------------------------------------------------------------
# Load Golang dependencies.
# ---------------------------------------------------------------------------
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
# ---------------------------------------------------------------------------
# Load CDLang dependencies.
# ---------------------------------------------------------------------------
load("//stratum/testing/cdlang:deps.bzl", "cdlang_rules_dependencies")
cdlang_rules_dependencies()
# ---------------------------------------------------------------------------
# Load dependencies for `latex_document` rule.
# ---------------------------------------------------------------------------
load("@bazel_latex//:repositories.bzl", "latex_repositories")
latex_repositories()
# ---------------------------------------------------------------------------
# Load dependencies for `python_grpc_library` rule
# ---------------------------------------------------------------------------
load("@build_stack_rules_proto//python:deps.bzl", "python_grpc_library")
python_grpc_library()
load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")
pip_repositories()
pip_import(
name = "protobuf_py_deps",
requirements = "@build_stack_rules_proto//python/requirements:protobuf.txt",
)
load("@protobuf_py_deps//:requirements.bzl", protobuf_pip_install = "pip_install")
protobuf_pip_install()
pip_import(
name = "grpc_py_deps",
requirements = "@build_stack_rules_proto//python:requirements.txt",
)
load("@grpc_py_deps//:requirements.bzl", grpc_pip_install = "pip_install")
grpc_pip_install()
# ---------------------------------------------------------------------------
# Load dependencies for pipeline PTF rules
# ---------------------------------------------------------------------------
pip_import(
name = "ptf_deps",
requirements = "//stratum/pipelines/ptf:requirements.txt",
)
load("@ptf_deps//:requirements.bzl", ptf_pip_install = "pip_install")
ptf_pip_install()