github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/BUILD (about)

     1  load("//tools:defs.bzl", "build_test", "gazelle", "go_path")
     2  load("//tools/nogo:defs.bzl", "nogo_config")
     3  load("//tools/yamltest:defs.bzl", "yaml_test")
     4  load("//website:defs.bzl", "doc")
     5  
     6  package(licenses = ["notice"])
     7  
     8  exports_files(["LICENSE"])
     9  
    10  nogo_config(
    11      name = "nogo_config",
    12      srcs = ["nogo.yaml"],
    13      visibility = ["//:sandbox"],
    14  )
    15  
    16  doc(
    17      name = "contributing",
    18      src = "CONTRIBUTING.md",
    19      category = "Project",
    20      permalink = "/contributing/",
    21      visibility = ["//website:__pkg__"],
    22      weight = "20",
    23  )
    24  
    25  doc(
    26      name = "security",
    27      src = "SECURITY.md",
    28      category = "Project",
    29      permalink = "/security/",
    30      visibility = ["//website:__pkg__"],
    31      weight = "30",
    32  )
    33  
    34  doc(
    35      name = "governance",
    36      src = "GOVERNANCE.md",
    37      category = "Project",
    38      permalink = "/community/governance/",
    39      subcategory = "Community",
    40      visibility = ["//website:__pkg__"],
    41      weight = "20",
    42  )
    43  
    44  doc(
    45      name = "code_of_conduct",
    46      src = "CODE_OF_CONDUCT.md",
    47      category = "Project",
    48      permalink = "/community/code_of_conduct/",
    49      subcategory = "Community",
    50      visibility = ["//website:__pkg__"],
    51      weight = "99",
    52  )
    53  
    54  yaml_test(
    55      name = "nogo_config_test",
    56      srcs = glob(["nogo*.yaml"]),
    57      schema = "//tools/nogo:config-schema.json",
    58  )
    59  
    60  yaml_test(
    61      name = "github_workflows_test",
    62      srcs = glob([".github/workflows/*.yml"]),
    63      schema = "@github_workflow_schema//file",
    64  )
    65  
    66  yaml_test(
    67      name = "buildkite_pipelines_test",
    68      srcs = glob([".buildkite/*.yaml"]),
    69      schema = "@buildkite_pipeline_schema//file",
    70  )
    71  
    72  # The sandbox filegroup is used for sandbox-internal dependencies.
    73  package_group(
    74      name = "sandbox",
    75      packages = ["//..."],
    76  )
    77  
    78  # For targets that will not normally build internally, we ensure that they are
    79  # least build by a static BUILD test.
    80  build_test(
    81      name = "build_test",
    82      targets = [
    83          "//test/e2e:integration_test",
    84          "//test/image:image_test",
    85          "//test/root:root_test",
    86          "//test/benchmarks/base:startup_test",
    87          "//test/benchmarks/base:size_test",
    88          "//test/benchmarks/base:sysbench_test",
    89          "//test/benchmarks/database:redis_test",
    90          "//test/benchmarks/fs:bazel_test",
    91          "//test/benchmarks/fs:fio_test",
    92          "//test/benchmarks/media:ffmpeg_test",
    93          "//test/benchmarks/ml:tensorflow_test",
    94          "//test/benchmarks/network:httpd_test",
    95          "//test/benchmarks/network:nginx_test",
    96          "//test/benchmarks/network:node_test",
    97          "//test/benchmarks/network:ruby_test",
    98      ],
    99  )
   100  
   101  # gopath defines a directory that is structured in a way that is compatible
   102  # with standard Go tools. Things like godoc, editors and refactor tools should
   103  # work as expected.
   104  #
   105  # The files in this tree are symlinks to the true sources.
   106  go_path(
   107      name = "gopath",
   108      mode = "link",
   109      deps = [
   110          # Main binaries.
   111          #
   112          # For reasons related to reproducibility of the generated
   113          # files, in order to ensure that :gopath produces only a
   114          # a single "pure" version of all files, we can only depend
   115          # on go_library targets here, and not go_binary. Thus the
   116          # binaries have been factored into a cli package, which is
   117          # a good practice in any case.
   118          "//runsc/cli",
   119          "//shim/cli",
   120          "//webhook/pkg/cli",
   121  
   122          # Packages that are not dependencies of the above.
   123          "//pkg/sentry/kernel/memevent",
   124          "//pkg/tcpip/adapters/gonet",
   125          "//pkg/tcpip/faketime",
   126          "//pkg/tcpip/link/channel",
   127          "//pkg/tcpip/link/ethernet",
   128          "//pkg/tcpip/link/muxed",
   129          "//pkg/tcpip/link/pipe",
   130          "//pkg/tcpip/link/sharedmem",
   131          "//pkg/tcpip/link/sharedmem/pipe",
   132          "//pkg/tcpip/link/sharedmem/queue",
   133          "//pkg/tcpip/link/tun",
   134          "//pkg/tcpip/link/waitable",
   135          "//pkg/tcpip/sample/tun_tcp_connect",
   136          "//pkg/tcpip/sample/tun_tcp_echo",
   137          "//pkg/tcpip/transport/tcpconntrack",
   138      ],
   139  )
   140  
   141  # gazelle is a set of build tools.
   142  #
   143  # To update the WORKSPACE from go.mod, use:
   144  #   bazel run //:gazelle -- update-repos -from_file=go.mod
   145  gazelle(name = "gazelle")