Skip to content

Commit

Permalink
ci: pin bazel version to .bazelversion for utilities tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhan committed Dec 14, 2024
1 parent 972d9f1 commit fc64a1a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/utilities-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@ jobs:
- ubuntu-20.04
- windows-2019
bazel-version:
# FIXME: temporary disable due to the WORKSPACE file is disabled by default in Bazel 8
# - latest
- 7.4.1
# NOTE: read from .bazelversion so that we don't randomly break our
# ci due to latest bazel version change
- .bazelversion
- 6.5.0
- 5.4.1
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
steps:
- uses: actions/checkout@v4

# conditionally override USE_BAZEL_VERSION
- run: if [ "${{ matrix.bazel-version }}" = ".bazelversion" ]; then echo "USE_BAZEL_VERSION=$(cat .bazelversion)" >> $GITHUB_ENV; fi
if: ${{ !startsWith(matrix.os, 'windows') }}
- run: if ("${{ matrix.bazel-version }}" -eq ".bazelversion") { echo "USE_BAZEL_VERSION=$(cat .bazelversion)" >> $env:GITHUB_ENV }
if: ${{ startsWith(matrix.os, 'windows') }}

- uses: bazelbuild/setup-bazelisk@v3
- name: Mount bazel cache
if: ${{ !startsWith(matrix.os, 'windows') }}
Expand Down

0 comments on commit fc64a1a

Please sign in to comment.