.github/workflows: Split Bazel into two jobs

The two Bazel versions are completely separate; no need to run them
serially.
This commit is contained in:
Eric Anderson 2024-12-02 16:31:04 -08:00 committed by GitHub
parent f66d7fc54d
commit c080b52f95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 14 deletions

View File

@ -77,8 +77,16 @@ jobs:
bazel:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Test with and without bzlmod. Bazel 6 doesn't support bzlmod, so use Bazel 7 instead
- bazel: 6.0.0
bzlmod: false
- bazel: 7.0.0
bzlmod: true
env:
USE_BAZEL_VERSION: 6.0.0
USE_BAZEL_VERSION: ${{ matrix.bazel }}
steps:
- uses: actions/checkout@v4
@ -97,19 +105,8 @@ jobs:
key: ${{ runner.os }}-bazel-${{ env.USE_BAZEL_VERSION }}-${{ hashFiles('WORKSPACE', 'repositories.bzl') }}
- name: Run bazel build
run: bazelisk build //... --enable_bzlmod=false
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
- name: Run example bazel build
run: bazelisk build //... --enable_bzlmod=false
working-directory: ./examples
- name: Run bazel build (bzlmod)
env:
USE_BAZEL_VERSION: 7.0.0
run: bazelisk build //... --enable_bzlmod=true
- name: Run example bazel build (bzlmod)
env:
USE_BAZEL_VERSION: 7.0.0
run: bazelisk build //... --enable_bzlmod=true
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
working-directory: ./examples