| load("//tools:defs.bzl", "build_test", "gazelle", "go_path") |
| load("//tools/nogo:defs.bzl", "nogo_config") |
| |
| package(licenses = ["notice"]) |
| |
| exports_files(["LICENSE"]) |
| |
| nogo_config( |
| name = "nogo_config", |
| srcs = ["nogo.yaml"], |
| visibility = ["//:sandbox"], |
| ) |
| |
| # 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 = "link", |
| 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/v1/cli", |
| "//shim/v2/cli", |
| "//webhook/pkg/cli", |
| |
| # Packages that are not dependencies of the above. |
| "//pkg/sentry/kernel/memevent", |
| "//pkg/tcpip/adapters/gonet", |
| "//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", |
| ], |
| ) |
| |
| # 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") |