From cbc67e1c556e8be9dae244b162b85fe56c414eab Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Wed, 18 Sep 2024 13:06:32 -0700 Subject: [PATCH] Fix toolchain resolution flag for bazel 6 PiperOrigin-RevId: 676101880 --- .github/workflows/test_bazel.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_bazel.yml b/.github/workflows/test_bazel.yml index 778fc9e122..ef273306b6 100644 --- a/.github/workflows/test_bazel.yml +++ b/.github/workflows/test_bazel.yml @@ -28,20 +28,19 @@ jobs: matrix: runner: [ ubuntu, windows, macos ] bazelversion: [ '7.1.2' ] - bzlmod: [true, false ] - toolchain_resolution: [false ] + bzlmod: [ true, false ] + toolchain_resolution: [ "" ] include: - runner: ubuntu bazelversion: '6.4.0' # Not running Bazel 6 with bzlmod, because it doesn't support use_repo_rule in rules_jvm_external bzlmod: false - continuous-only: true - runner: ubuntu bzlmod: false - toolchain_resolution: true + toolchain_resolution: --incompatible_enable_proto_toolchain_resolution=true - runner: ubuntu bzlmod: true - toolchain_resolution: true + toolchain_resolution: --incompatible_enable_proto_toolchain_resolution=true runs-on: ${{ matrix.runner }}-latest name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Examples ${{ matrix.runner }} ${{ matrix.bazelversion }}${{ matrix.bzlmod && ' (bzlmod)' || '' }} ${{ matrix.toolchain_resolution && ' (toolchain resolution)' || '' }} steps: @@ -70,4 +69,4 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: examples version: ${{ matrix.bazelversion }} - bash: cd examples && bazel build //... $BAZEL_FLAGS --enable_bzlmod=${{ matrix.bzlmod }} --incompatible_enable_proto_toolchain_resolution=${{ matrix.toolchain_resolution }} + bash: cd examples && bazel build //... $BAZEL_FLAGS --enable_bzlmod=${{ matrix.bzlmod }} ${{ matrix.toolchain_resolution }}