-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
BUILD
186 lines (167 loc) · 5.03 KB
/
BUILD
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
load("@rules_license//rules:license.bzl", "license")
load("//tools:defs.bzl", "build_test", "gazelle", "go_path")
load("//tools/nogo:defs.bzl", "nogo_config")
load("//tools/yamltest:defs.bzl", "yaml_test")
load("//website:defs.bzl", "doc")
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
license(
name = "license",
package_name = "gvisor",
)
exports_files(["LICENSE"])
nogo_config(
name = "nogo_config",
srcs = ["nogo.yaml"],
visibility = [
"//visibility:public",
],
)
doc(
name = "contributing",
src = "CONTRIBUTING.md",
category = "Project",
permalink = "/contributing/",
visibility = ["//website:__pkg__"],
weight = "20",
)
doc(
name = "security",
src = "SECURITY.md",
category = "Project",
permalink = "/security/",
visibility = ["//website:__pkg__"],
weight = "30",
)
doc(
name = "governance",
src = "GOVERNANCE.md",
category = "Project",
permalink = "/community/governance/",
subcategory = "Community",
visibility = ["//website:__pkg__"],
weight = "20",
)
doc(
name = "code_of_conduct",
src = "CODE_OF_CONDUCT.md",
category = "Project",
permalink = "/community/code_of_conduct/",
subcategory = "Community",
visibility = ["//website:__pkg__"],
weight = "99",
)
yaml_test(
name = "nogo_config_test",
srcs = glob(["nogo*.yaml"]),
schema = "//tools/nogo/config:schema.json",
)
yaml_test(
name = "github_workflows_test",
srcs = glob([".github/workflows/*.yml"]),
schema = "@github_workflow_schema//file",
)
filegroup(
name = "buildkite_pipelines",
srcs = glob([".buildkite/*.yaml"]),
visibility = ["//:sandbox"],
)
yaml_test(
name = "buildkite_pipelines_test",
srcs = glob([".buildkite/*.yaml"]),
schema = "@buildkite_pipeline_schema//file",
)
# The sandbox filegroup is used for sandbox-internal dependencies.
package_group(
name = "sandbox",
packages = ["//..."],
)
# For targets that will not normally build internally, we ensure that they are
# least build by a static BUILD test.
build_test(
name = "build_test",
targets = [
"//test/e2e:integration_test",
"//test/image:image_test",
"//test/root:root_test",
"//test/benchmarks/base:startup_test",
"//test/benchmarks/base:size_test",
"//test/benchmarks/base:sysbench_test",
"//test/benchmarks/database:redis_test",
"//test/benchmarks/fs:bazel_test",
"//test/benchmarks/fs:fio_test",
"//test/benchmarks/media:ffmpeg_test",
"//test/benchmarks/ml:tensorflow_test",
"//test/benchmarks/network:httpd_test",
"//test/benchmarks/network:nginx_test",
"//test/benchmarks/network:node_test",
"//test/benchmarks/network:ruby_test",
],
)
# gopath defines a directory that is structured in a way that is compatible
# with standard Go tools. Things like godoc, editors and refactor tools should
# work as expected.
#
# The files in this tree are symlinks to the true sources.
go_path(
name = "gopath",
mode = "archive",
deps = [
# Main binaries.
#
# For reasons related to reproducibility of the generated
# files, in order to ensure that :gopath produces only a
# a single "pure" version of all files, we can only depend
# on go_library targets here, and not go_binary. Thus the
# binaries have been factored into a cli package, which is
# a good practice in any case.
"//runsc/cli",
"//shim/cli",
"//webhook/pkg/cli",
"//tools/checklocks",
# Packages that are not dependencies of the above.
"//pkg/sentry/kernel/memevent",
"//pkg/sentry/socket/plugin/stack",
"//pkg/tcpip/adapters/gonet",
"//pkg/tcpip/faketime",
"//pkg/tcpip/link/channel",
"//pkg/tcpip/link/ethernet",
"//pkg/tcpip/link/muxed",
"//pkg/tcpip/link/pipe",
"//pkg/tcpip/link/sharedmem",
"//pkg/tcpip/link/sharedmem/pipe",
"//pkg/tcpip/link/sharedmem/queue",
"//pkg/tcpip/link/tun",
"//pkg/tcpip/link/waitable",
"//pkg/tcpip/sample/tun_tcp_connect",
"//pkg/tcpip/sample/tun_tcp_echo",
"//pkg/tcpip/transport/tcpconntrack",
],
)
# CC toolchain targets for cross-compilation.
# Required to be explicitly specified in bazel >= 5.
toolchain(
name = "cc_toolchain_k8",
target_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
toolchain = "@crosstool//:cc-compiler-k8",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
toolchain(
name = "cc_toolchain_aarch64",
target_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
toolchain = "@crosstool//:cc-compiler-aarch64",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
# gazelle is a set of build tools.
#
# To update the WORKSPACE from go.mod, use:
# bazel run //:gazelle -- update-repos -from_file=go.mod
gazelle(name = "gazelle")