Files

187 lines
5.0 KiB
Python
Raw Permalink Normal View History

2024-03-26 10:36:16 -07:00
load("@rules_license//rules:license.bzl", "license")
load("//tools:defs.bzl", "build_test", "gazelle", "go_path")
2020-10-26 11:09:34 -07:00
load("//tools/nogo:defs.bzl", "nogo_config")
load("//tools/yamltest:defs.bzl", "yaml_test")
load("//website:defs.bzl", "doc")
2019-04-04 17:04:30 -07:00
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
license(
name = "license",
package_name = "gvisor",
)
2020-01-27 10:04:07 -08:00
exports_files(["LICENSE"])
2020-10-26 11:09:34 -07:00
nogo_config(
name = "nogo_config",
srcs = ["nogo.yaml"],
2024-08-23 14:44:01 -07:00
visibility = [
"//visibility:public",
],
2020-10-26 11:09:34 -07:00
)
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__"],
2020-08-04 01:05:42 -07:00
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"]),
2022-01-19 10:22:48 -08:00
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",
)
2018-04-27 10:37:02 -07:00
# 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",
2020-12-09 11:55:06 -08:00
"//test/benchmarks/database:redis_test",
"//test/benchmarks/fs:bazel_test",
"//test/benchmarks/fs:fio_test",
2020-12-09 11:55:06 -08:00
"//test/benchmarks/media:ffmpeg_test",
"//test/benchmarks/ml:tensorflow_test",
2020-12-09 13:49:41 -08:00
"//test/benchmarks/network:httpd_test",
"//test/benchmarks/network:nginx_test",
"//test/benchmarks/network:node_test",
"//test/benchmarks/network:ruby_test",
2018-04-27 10:37:02 -07:00
],
)
2019-04-04 17:04:30 -07:00
# 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",
2023-03-13 16:04:12 -07:00
mode = "archive",
2019-04-04 17:04:30 -07:00
deps = [
2020-10-19 16:26:42 -07:00
# 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/v1/cli",
2020-10-30 12:00:11 -07:00
"//webhook/pkg/cli",
"//tools/checklocks",
2020-10-19 16:26:42 -07:00
# Packages that are not dependencies of the above.
2019-12-11 13:26:30 -08:00
"//pkg/sentry/kernel/memevent",
"//pkg/sentry/socket/plugin/stack",
2019-12-11 13:26:30 -08:00
"//pkg/tcpip/adapters/gonet",
2021-03-03 12:35:26 -08:00
"//pkg/tcpip/faketime",
"//pkg/tcpip/link/channel",
2020-12-22 16:19:17 -08:00
"//pkg/tcpip/link/ethernet",
2019-12-11 13:26:30 -08:00
"//pkg/tcpip/link/muxed",
2020-12-22 16:19:17 -08:00
"//pkg/tcpip/link/pipe",
2019-12-11 13:26:30 -08:00
"//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",
2019-04-04 17:04:30 -07:00
],
)
2019-06-01 23:09:26 -07:00
# 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",
)
2019-06-01 23:09:26 -07:00
# 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")