Skip to content

Commit

Permalink
Fix Bazel version to 7.1.2, update lock file, fix no bzlmod builds (#217
Browse files Browse the repository at this point in the history
)
  • Loading branch information
comius authored Jun 17, 2024
1 parent 8df2b70 commit db09d58
Show file tree
Hide file tree
Showing 8 changed files with 1,704 additions and 4 deletions.
60 changes: 57 additions & 3 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,83 @@ buildifier:
tasks:
ubuntu2004:
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
macos:
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
windows:
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
ubuntu2004_bzlmod:
platform: ubuntu2004
build_targets: *build_targets
build_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
test_targets: *test_targets
test_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
macos_bzlmod:
platform: macos
build_targets: *build_targets
build_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
test_targets: *test_targets
test_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
windows_bzlmod:
platform: windows
build_targets: *build_targets
build_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
test_targets: *test_targets
test_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
ubuntu2004_head:
bazel: last_green
platform: ubuntu2004
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
macos_head:
bazel: last_green
platform: macos
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
windows_head:
bazel: last_green
platform: windows
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
ubuntu2004_bzlmod:
test_flags:
- "--config=nobzlmod"
ubuntu2004_head_bzlmod:
bazel: last_green
platform: ubuntu2004
build_flags:
Expand All @@ -49,7 +103,7 @@ tasks:
test_flags:
- "--config=bzlmod"
test_targets: *test_targets_bzlmod
macos_bzlmod:
macos_head_bzlmod:
bazel: last_green
platform: macos
build_flags:
Expand All @@ -58,7 +112,7 @@ tasks:
test_flags:
- "--config=bzlmod"
test_targets: *test_targets_bzlmod
windows_bzlmod:
windows_head_bzlmod:
bazel: last_green
platform: windows
build_flags:
Expand Down
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
build:bzlmod --enable_bzlmod
build:nobzlmod --noenable_bzlmod

1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.1.2
1,617 changes: 1,617 additions & 0 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ load("//proto:repositories.bzl", "rules_proto_dependencies")

rules_proto_dependencies()

load("//proto:setup.bzl", "rules_proto_setup")

rules_proto_setup()

load("//proto:toolchains.bzl", "rules_proto_toolchains")

rules_proto_toolchains()
Expand Down
4 changes: 4 additions & 0 deletions dev_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ def rules_proto_dev_deps():
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v23.1.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v23.1.tar.gz",
],
remote_patch_strip = 1,
remote_patches = {
"https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/modules/protobuf/23.1/patches/0007-bazel-Get-rid-of-exec_tools.-13401.patch": "sha256-Thj5ZYqMpgaUrjZv8XyWqyD+I6XQNcZjo4jI14a7QxE=",
},
)
1 change: 0 additions & 1 deletion proto/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Dependencies required to use rules_proto."""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Expand Down
19 changes: 19 additions & 0 deletions proto/setup.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2024 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Setup required to use rules_proto."""

load("@bazel_features//:deps.bzl", "bazel_features_deps")

def rules_proto_setup():
bazel_features_deps()

0 comments on commit db09d58

Please sign in to comment.