Skip to content

Commit 90ad7e9

Browse files
anandoleecopybara-github
authored andcommitted
Add Bazel9 test
#test-continuous PiperOrigin-RevId: 908263056
1 parent 5be0a43 commit 90ad7e9

20 files changed

Lines changed: 123 additions & 344 deletions

File tree

.bazeliskrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
USE_BAZEL_VERSION=8.0.1
1+
USE_BAZEL_VERSION=8.6.0

.bazelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
33
# TODO: ErrorProne's SelfAssertions are violated in protobuf's test
44
build --javacopt=-Xep:SelfAssertion:WARN
55

6+
# Disable prebuilt protoc on CI. On both main and release branches,
7+
# PROTOBUF_VERSION ordinarily points to the next release, which doesn't
8+
# exist and therefore doesn't have a prebuilt yet.
9+
#build --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=false
10+
611
# This flag works around some issues with Rust linking.
712
build --@rules_rust//rust/settings:experimental_use_cc_common_link=True
813

@@ -39,5 +44,10 @@ common --enable_platform_specific_config
3944

4045
common --incompatible_check_testonly_for_output_files
4146

47+
# Import Bazel 9 specific flags (such as --repo_contents_cache)
48+
# TODO: Remove it when --repo_contents_cache issue
49+
# has been resolved in bazel
50+
try-import-if-bazel-version >=9.0.0 %workspace%/ci/bazel9.bazelrc
51+
4252
# Use clang-cl by default on Windows (see https://github.com/protocolbuffers/protobuf/issues/20085).
4353
build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl --extra_execution_platforms=//build_defs:x64_windows-clang-cl --host_platform=//build_defs:x64_windows-clang-cl

.github/workflows/test_bazel.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
runner: [ ubuntu, windows, macos ]
30-
bazelversion: [ '8.0.0' ]
30+
bazelversion: [ '8.6.0', '9.0.0' ]
3131
bzlmod: [ true, false ]
3232
toolchain_resolution:
3333
# Default flags, uses from prebuilt protoc
@@ -36,6 +36,9 @@ jobs:
3636
- "--incompatible_enable_proto_toolchain_resolution=false"
3737
# Uses protoc from source.
3838
- "--@com_google_protobuf//bazel/flags:prefer_prebuilt_protoc=false"
39+
exclude:
40+
- bazelversion: '9.0.0'
41+
bzlmod: false
3942
runs-on: ${{ matrix.runner }}-latest
4043
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Examples ${{ matrix.runner }} ${{ matrix.bazelversion }}${{ matrix.bzlmod && ' (bzlmod)' || '' }} ${{ matrix.toolchain_resolution && ' (toolchain resolution)' || '' }}
4144
steps:
@@ -84,7 +87,7 @@ jobs:
8487
fail-fast: false
8588
matrix:
8689
runner: [ ubuntu, windows, macos ]
87-
bazelversion: [ '8.0.0' ]
90+
bazelversion: [ '8.6.0', '9.0.0' ]
8891
bzlmod: [ true ]
8992
toolchain_resolution:
9093
# Default flags, uses from prebuilt protoc
@@ -122,7 +125,7 @@ jobs:
122125
- name: Run tests
123126
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
124127
with:
125-
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:8.0.1-d415763a389bb62a6f126b08c992e83f9f7dc1b4
128+
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:9.0.0-7932bf8b25fb76a111e7257d151a6a58d5c3c671
126129
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
127130
bazel-cache: "bazel-tests"
128131
bazel: test //bazel/...
@@ -145,4 +148,4 @@ jobs:
145148
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
146149
bazel-cache: "bazel-tests-${{ matrix.runner }}"
147150
bazel: test //bazel/...
148-
version: 8.0.1
151+
version: 8.6.0

.github/workflows/test_cpp.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ jobs:
4444
cache_key: Bazel8
4545
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:8.0.1-d415763a389bb62a6f126b08c992e83f9f7dc1b4"
4646
targets: "//src/... //third_party/utf8_range/..."
47+
- config: { name: "Bazel9", flags: "--cxxopt=-Wno-self-assign-overloaded" }
48+
cache_key: Bazel9
49+
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:9.0.0-7932bf8b25fb76a111e7257d151a6a58d5c3c671"
50+
targets: "//src/... //third_party/utf8_range/..."
4751
- config: { name: "TCMalloc" }
4852
cache_key: TcMalloc
4953
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc:8.0.1-d415763a389bb62a6f126b08c992e83f9f7dc1b4"

.github/workflows/test_java.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,27 @@ jobs:
3030
include:
3131
- name: OpenJDK 8
3232
cache_key: '8'
33-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-8-b77fdae6d4771789dfc66a56bf8d806354e8011a
33+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-11-1c31a2985011c75c33dcdf646fc86898aac1ec5d
3434
# TODO: b/318555165 - enable the layering check. Currently it does
3535
# not work correctly with the toolchain in this Docker image.
3636
targets: //java/... //java/internal:java_version --features=-layering_check
3737
flags: --java_language_version=8
3838
- name: OpenJDK 11
3939
cache_key: '11'
40-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-11-b77fdae6d4771789dfc66a56bf8d806354e8011a
40+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-11-1c31a2985011c75c33dcdf646fc86898aac1ec5d
4141
targets: //java/... //java/internal:java_version //compatibility/...
4242
continuous-only: true
4343
- name: OpenJDK 17
4444
cache_key: '17'
45-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-17-168f9c9d015a0fa16611e1e9eede796fe9bfbb69
45+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-17-1c31a2985011c75c33dcdf646fc86898aac1ec5d
46+
targets: //java/... //java/internal:java_version //compatibility/...
47+
- name: OpenJDK 21 bazel 8
48+
cache_key: 'bazel8'
49+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.6.0-21-856ad422dddd3b8fbd85e36129496b37bba174ef
4650
targets: //java/... //java/internal:java_version //compatibility/...
4751
- name: OpenJDK 21
4852
cache_key: '21'
49-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-21-7932bf8b25fb76a111e7257d151a6a58d5c3c671
53+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-21-1c31a2985011c75c33dcdf646fc86898aac1ec5d
5054
targets: //java/... //java/internal:java_version //compatibility/...
5155
# TODO: b/395623141 - restore this test once runtime uses / emulates aarch64.
5256
# - name: aarch64
@@ -101,7 +105,7 @@ jobs:
101105
- name: Generate maven artifacts with bazel and install using maven
102106
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
103107
with:
104-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-11-b77fdae6d4771789dfc66a56bf8d806354e8011a
108+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-11-1c31a2985011c75c33dcdf646fc86898aac1ec5d
105109
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
106110
bazel-cache: java_linux/11
107111
bash: |

.github/workflows/test_ruby.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ jobs:
3535
- { name: Ruby 3.2, ruby: ruby-3.2.6, continuous-only: true }
3636
- { name: Ruby 3.3, ruby: ruby-3.3.6, continuous-only: true }
3737
- { name: Ruby 3.4, ruby: ruby-3.4.1, continuous-only: true }
38-
# TODO: Remove the image property in the two entries below and update the configuration
39-
# used by all the images the next time there is an update to the Dockerfile
40-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
41-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
38+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE }
39+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI }
40+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
41+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.4.4, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
4242
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: NATIVE }
4343
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: FFI }
44+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
45+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
4446

4547
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Linux ${{ matrix.name }} ${{ matrix.ffi == 'FFI' && ' FFI' || '' }}
4648
runs-on: ubuntu-latest
@@ -54,7 +56,7 @@ jobs:
5456
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
5557
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
5658
with:
57-
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-{0}-b77fdae6d4771789dfc66a56bf8d806354e8011a', matrix.ruby) }}
59+
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:9.0.0-{0}-9fc33a0c378b5affd3c85d3f5ae4f330993048f7', matrix.ruby) }}
5860
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
5961
bazel-cache: ruby_linux/${{ matrix.ruby }}
6062
bazel: test //ruby/... //ruby/tests:ruby_version --test_env=KOKORO_RUBY_VERSION --test_env=BAZEL=true ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled --test_env=PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION=FFI' || '' }}
@@ -172,7 +174,7 @@ jobs:
172174
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
173175
uses: protocolbuffers/protobuf-ci/bazel@v5
174176
with:
175-
version: 8.0.1 # Bazel version
177+
version: 9.0.0 # Bazel version
176178
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
177179
bazel-cache: ruby_macos/${{ matrix.version }}
178180
bazel: test //ruby/... --test_env=KOKORO_RUBY_VERSION=${{ matrix.version }} --test_env=BAZEL=true ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled --test_env=PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION=FFI' || '' }}
@@ -187,13 +189,17 @@ jobs:
187189
# Ruby versions for CRuby and JRuby.
188190
- { name: Ruby 3.1, ruby: ruby-3.1.6, ffi: NATIVE }
189191
- { name: Ruby 3.1, ruby: ruby-3.1.6, ffi: FFI }
190-
- { name: Ruby 3.2, ruby: ruby-3.2.6, continuous-only: true}
191-
- { name: Ruby 3.3, ruby: ruby-3.3.6, continuous-only: true}
192+
- { name: Ruby 3.2, ruby: ruby-3.2.6, continuous-only: true }
193+
- { name: Ruby 3.3, ruby: ruby-3.3.6, continuous-only: true }
192194
- { name: Ruby 3.4, ruby: ruby-3.4.1, continuous-only: true }
193-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
194-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
195+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE }
196+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI }
197+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
198+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.4.4, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
195199
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: NATIVE }
196200
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: FFI, continuous-only: true }
201+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
202+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
197203
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Install ${{ matrix.name }}${{ matrix.ffi == 'FFI' && ' FFI' || '' }}
198204
runs-on: ubuntu-latest
199205
steps:
@@ -206,14 +212,15 @@ jobs:
206212
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
207213
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
208214
with:
209-
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-{0}-b77fdae6d4771789dfc66a56bf8d806354e8011a', matrix.ruby) }}
215+
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:9.0.0-{0}-9fc33a0c378b5affd3c85d3f5ae4f330993048f7', matrix.ruby) }}
210216
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
211217
bazel-cache: ruby_install/${{ matrix.ruby }}_${{ matrix.bazel }}
212218
bash: >
213219
bazel --version;
214220
ruby --version;
215221
./regenerate_stale_files.sh $BAZEL_FLAGS;
216-
bazel build //ruby:release //:protoc ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled' || '' }} $BAZEL_FLAGS;
222+
# TODO: Add --action_env=PATH to release builds before upgrade them to Bazel 9
223+
bazel build //ruby:release //:protoc ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled' || '' }} --action_env=PATH $BAZEL_FLAGS;
217224
gem install bazel-bin/ruby/google-protobuf-*;
218225
bazel-bin/protoc --proto_path=src --proto_path=ruby/tests --proto_path=ruby --ruby_out=ruby tests/test_import_proto2.proto;
219226
bazel-bin/protoc --proto_path=src --proto_path=ruby/tests --proto_path=ruby --ruby_out=ruby tests/basic_test.proto;

MODULE.bazel

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module(
1414
# https://bazel.build/versions/6.0.0/build/bzlmod#version-resolution
1515
# Thus the highest version in their module graph is resolved.
1616

17-
bazel_dep(name = "apple_support", version = "1.16.0", repo_name = "build_bazel_apple_support")
17+
bazel_dep(name = "apple_support", version = "2.3.0", repo_name = "build_bazel_apple_support")
1818

1919
# Unused but must be pinned to avoid old broken versions
2020
bazel_dep(name = "rules_proto", version = "7.1.0")
@@ -33,14 +33,14 @@ bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
3333
# other dependencies
3434
bazel_dep(name = "bazel_features", version = "1.33.0", repo_name = "proto_bazel_features")
3535
bazel_dep(name = "bazel_skylib", version = "1.9.0")
36-
bazel_dep(name = "jsoncpp", version = "1.9.6.bcr.1")
36+
bazel_dep(name = "jsoncpp", version = "1.9.6.bcr.2")
3737
bazel_dep(name = "rules_java", version = "8.6.1")
3838
bazel_dep(name = "rules_jvm_external", version = "6.7")
39-
bazel_dep(name = "rules_kotlin", version = "2.2.2")
39+
bazel_dep(name = "rules_kotlin", version = "2.3.20")
4040
bazel_dep(name = "rules_license", version = "1.0.0")
4141
bazel_dep(name = "rules_pkg", version = "1.0.1")
4242
bazel_dep(name = "rules_python", version = "1.6.0")
43-
bazel_dep(name = "rules_rust", version = "0.63.0")
43+
bazel_dep(name = "rules_rust", version = "0.69.0")
4444

4545
bazel_dep(name = "rules_ruby", version = "0.20.1", dev_dependency = True)
4646

@@ -307,17 +307,16 @@ archive_override(
307307
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.0/protobuf-25.0.tar.gz"],
308308
)
309309

310-
bazel_dep(name = "com_google_protobuf_previous_release", version = "29.0", dev_dependency = True)
310+
bazel_dep(name = "com_google_protobuf_previous_release", version = "33.0", dev_dependency = True)
311311
archive_override(
312312
module_name = "com_google_protobuf_previous_release",
313-
integrity = "sha256-EKDVjzmhqQnpXgDougtbHcZNApl/dBFRlTorNln254w=",
313+
integrity = "sha256-y8U2BkcGtijc/lB77zhu8+IhTVY2V2EilvF4GqFV7gc=",
314314
patch_strip = 1,
315315
patches = [
316-
"@com_google_protobuf//:patches/protobuf_v29/0001-Update-module-name.patch",
317-
"@com_google_protobuf//:patches/protobuf_v29/0002-bazel9.patch",
316+
"@com_google_protobuf//:patches/protobuf_v33/0001-Update-module-name.patch",
318317
],
319-
strip_prefix = "protobuf-29.0",
320-
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v29.0/protobuf-29.0.tar.gz"],
318+
strip_prefix = "protobuf-33.0",
319+
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protobuf-33.0.tar.gz"],
321320
)
322321

323322
# Register C++ toolchains for cross-compilation. These are used for compiling release binaries of

bazel/tests/cc_toolchain_tests.bzl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def cc_toolchain_test_suite(name):
1919
name = name,
2020
tests = [
2121
_test_cc_toolchain_uses_protoc_minimal_when_prefer_prebuilt_flag_unset,
22-
_test_cc_toolchain_uses_full_protoc_by_default,
22+
_test_cc_toolchain_uses_prebuilt_protoc_when_prefer_prebuilt_flag_set,
2323
],
2424
)
2525

@@ -51,7 +51,7 @@ def _test_cc_toolchain_uses_protoc_minimal_when_prefer_prebuilt_flag_unset_impl(
5151
# so the cc_toolchain should use protoc_minimal.
5252
action.argv().contains_predicate(matching.str_matches("*protoc_minimal*"))
5353

54-
def _test_cc_toolchain_uses_full_protoc_by_default(name):
54+
def _test_cc_toolchain_uses_prebuilt_protoc_when_prefer_prebuilt_flag_set(name):
5555
util.helper_target(
5656
proto_library,
5757
name = name + "_proto",
@@ -67,15 +67,14 @@ def _test_cc_toolchain_uses_full_protoc_by_default(name):
6767
analysis_test(
6868
name = name,
6969
target = name + "_compile",
70-
impl = _test_cc_toolchain_uses_full_protoc_by_default_impl,
70+
impl = _test_cc_toolchain_uses_prebuilt_protoc_when_prefer_prebuilt_flag_set_impl,
71+
config_settings = {_PREFER_PREBUILT_PROTOC: True},
7172
)
7273

73-
def _test_cc_toolchain_uses_full_protoc_by_default_impl(env, target):
74+
def _test_cc_toolchain_uses_prebuilt_protoc_when_prefer_prebuilt_flag_set_impl(env, target):
7475
# Find the compile action
7576
action = env.expect.that_target(target).action_named("GenProto")
7677

77-
# By default (prefer_prebuilt_protoc is True), protoc_minimal_do_not_use is None,
78-
# so the cc_toolchain should use the full protoc (not protoc_minimal).
79-
# The protoc path should end with "/protoc" not contain "protoc_minimal"
80-
action.argv().contains_predicate(matching.str_matches("*/protoc"))
78+
# When prefer_prebuilt_protoc is True, protoc_minimal_do_not_use is not set,
79+
# so the cc_toolchain should use prebuilt protoc instead of protoc_minimal.
8180
action.argv().not_contains_predicate(matching.str_matches("*protoc_minimal*"))

ci/Windows.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ build --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
99
build:clang-cl --extra_execution_platforms=//build_defs:x64_windows-clang-cl --host_platform=//build_defs:x64_windows-clang-cl
1010
build:msvc-cl --extra_execution_platforms=//build_defs:x64_windows-msvc-cl --host_platform=//build_defs:x64_windows-msvc-cl
1111
build --config=clang-cl
12+
# Set BAZEL_SH, this is needed for bazel 8.6.0 WORKSPACE on windows
13+
build --action_env=BAZEL_SH="C:/Program Files/Git/bin/bash.exe"

ci/bazel9.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
build --incompatible_exclude_starlark_flags_from_exec_config
2+
# TODO: Remove --repo_contents_cache
3+
common --repo_contents_cache=

0 commit comments

Comments
 (0)