Skip to content

Commit f396506

Browse files
authored
MODULE.bazel fixes for protobuf BCR release. (#16927)
- Specifies bazel version for presubmits - Set C++14 version (default is c++11 otherwise, which is unsupported) - Update MODULE.bazel version + updater since publish-to-bcr can't handle constants and adds a duplicate version number PiperOrigin-RevId: 633729225
1 parent 4baa11f commit f396506

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.bcr/presubmit.yml

+10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
matrix:
22
platform: ["debian10", "macos", "ubuntu2004", "windows"]
3+
bazel: [6.x, 7.x]
34

45
tasks:
56
verify_targets:
67
name: "Verify build targets"
78
platform: ${{ platform }}
9+
bazel: ${{ bazel }}
10+
build_flags:
11+
- '--host_cxxopt=-std=c++14'
12+
- '--cxxopt=-std=c++14'
813
build_targets:
914
- '@protobuf//:protobuf'
1015
- '@protobuf//:protobuf_lite'
@@ -17,9 +22,14 @@ bcr_test_module:
1722
matrix:
1823

1924
platform: ["debian10", "macos", "ubuntu2004", "windows"]
25+
bazel: [6.x, 7.x]
2026
tasks:
2127
run_test_module:
2228
name: "Run test module"
2329
platform: ${{ platform }}
30+
bazel: ${{ bazel }}
31+
build_flags:
32+
- '--host_cxxopt=-std=c++14'
33+
- '--cxxopt=-std=c++14'
2434
build_targets:
2535
- "//..."

MODULE.bazel

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
22
# https://github.com/protocolbuffers/protobuf/issues/14313
3-
PROTOBUF_VERSION = "27.0-dev"
4-
53
module(
64
name = "protobuf",
7-
version = PROTOBUF_VERSION,
5+
version = "27.0-dev", # Automatically updated on release
86
compatibility_level = 1,
97
repo_name = "com_google_protobuf",
108
)
@@ -25,4 +23,4 @@ bazel_dep(name = "platforms", version = "0.0.8")
2523
bazel_dep(name = "zlib", version = "1.2.11")
2624

2725
# TODO: remove after toolchain types are moved to protobuf
28-
bazel_dep(name = "rules_proto", version = "4.0.0")
26+
bazel_dep(name = "rules_proto", version = "4.0.0")

0 commit comments

Comments
 (0)