Skip to content

Commit

Permalink
chore(bazel): add MODULE.bazel files for bzlmod (#144)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
  • Loading branch information
mmorel-35 committed Feb 26, 2024
1 parent 0307d83 commit 3816d1f
Show file tree
Hide file tree
Showing 8 changed files with 1,860 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/testing.yml
Expand Up @@ -7,16 +7,18 @@ on:
permissions:
contents: read

env:
USE_BAZEL_VERSION: 5.0.0

jobs:
test:
runs-on: ubuntu-latest

env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
strategy:
matrix:
bazel_version: ["6.0.0", "7.0.0"]
bzlmod: ["--noenable_bzlmod", "--enable_bzlmod"]
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Run bazel build
run: bazelisk build //...
run: bazelisk build ${{ matrix.bzlmod }} //...
2 changes: 1 addition & 1 deletion BUILD.bazel
Expand Up @@ -243,7 +243,7 @@ proto_library(
":rls_config_proto",
"@com_google_googleapis//google/rpc:code_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:wrappers_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:wrappers_proto",
],
)
15 changes: 15 additions & 0 deletions MODULE.bazel
@@ -0,0 +1,15 @@
module(
name = "grpc_proto",
version = "0.0.0",
repo_name = "io_grpc_grpc_proto",
)

bazel_dep(name = "rules_proto", version = "4.0.0")
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
# -- bazel_dep definitions -- #

http_archives_extension = use_extension("//bazel:http_archives_extension.bzl", "http_archives_extension")
use_repo(http_archives_extension, "com_google_googleapis")

switched_rules_extension = use_extension("//bazel:switched_rules_extension.bzl", "switched_rules_extension")
use_repo(switched_rules_extension, "com_google_googleapis_imports")

0 comments on commit 3816d1f

Please sign in to comment.