Skip to content

test(bcr): cover both prefer_prebuilt_protoc cases in presubmit configs - #29545

Open
meteorcloudy wants to merge 1 commit into
protocolbuffers:mainfrom
meteorcloudy:bcr-prefer-prebuilt-protoc
Open

test(bcr): cover both prefer_prebuilt_protoc cases in presubmit configs#29545
meteorcloudy wants to merge 1 commit into
protocolbuffers:mainfrom
meteorcloudy:bcr-prefer-prebuilt-protoc

Conversation

@meteorcloudy

Copy link
Copy Markdown
Contributor

Description

This PR improves .bcr/presubmit.yml and .bazelci/presubmit.yml to:

  1. Add prefer_prebuilt_protoc: ["true", "false"] to the matrix definition.
  2. Pass --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=${{ prefer_prebuilt_protoc }} in both build_flags and test_flags.
  3. Add test_targets: ["//..."] so tests in examples are actually executed during presubmit.

This ensures both building from source and downloading prebuilt protoc toolchains are continuously tested across all supported platforms before publishing to BCR, preventing regressions like #29537.

Add prefer_prebuilt_protoc to matrix in .bcr/presubmit.yml and .bazelci/presubmit.yml
to verify examples both with and without the prebuilt protoc toolchain.
Also add test_targets: ['//...'] so test targets in examples are executed during presubmit.
@meteorcloudy

Copy link
Copy Markdown
Contributor Author

Tested on Bazel CI: https://buildkite.com/bazel/protobuf/builds/5774

@runzw runzw added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Sep 1, 2026
@github-actions github-actions Bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Sep 1, 2026
Comment thread .bazelci/presubmit.yml
matrix:
platform: ["debian12", "macos_arm64", "ubuntu2404", "windows"]
bazel: [8.x, 9.x]
prefer_prebuilt_protoc: ["true", "false"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding this to .bcr/presubmit.yml would help, but the .bazelci/presubmit.yml won't really work right since the prebuilt protoc artifacts are generated during release. We don't actually have prebuilts for these to point to at HEAD so --prefer_prebuilt_protoc=true isn't expected to work (this is why our .bazelrc sets this to false in the first place)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants