From df630fa6f15c4b6581d6e8c24b76be420c8367ef Mon Sep 17 00:00:00 2001 From: Sandy Zhang Date: Tue, 14 May 2024 15:41:40 -0700 Subject: [PATCH] MODULE.bazel fixes for protobuf BCR release. - 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 --- .bcr/presubmit.yml | 10 ++++++++++ MODULE.bazel | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index a8ed870656..4e1cdff44d 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -1,10 +1,15 @@ matrix: platform: ["debian10", "macos", "ubuntu2004", "windows"] + bazel: [6.x, 7.x] tasks: verify_targets: name: "Verify build targets" platform: ${{ platform }} + bazel: ${{ bazel }} + build_flags: + - '--host_cxxopt=-std=c++14' + - '--cxxopt=-std=c++14' build_targets: - '@protobuf//:protobuf' - '@protobuf//:protobuf_lite' @@ -17,9 +22,14 @@ bcr_test_module: matrix: platform: ["debian10", "macos", "ubuntu2004", "windows"] + bazel: [6.x, 7.x] tasks: run_test_module: name: "Run test module" platform: ${{ platform }} + bazel: ${{ bazel }} + build_flags: + - '--host_cxxopt=-std=c++14' + - '--cxxopt=-std=c++14' build_targets: - "//..." diff --git a/MODULE.bazel b/MODULE.bazel index a389538d3c..b91ab82941 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,10 +1,9 @@ # TODO: migrate all dependencies from WORKSPACE to MODULE.bazel # https://github.com/protocolbuffers/protobuf/issues/14313 -PROTOBUF_VERSION = "28.0-dev" module( name = "protobuf", - version = PROTOBUF_VERSION, + version = "28.0-dev", # Automatically updated on release compatibility_level = 1, repo_name = "com_google_protobuf", )