Skip to content

Commit

Permalink
.github/workflows: Split Bazel into two jobs
Browse files Browse the repository at this point in the history
The two Bazel versions are completely separate; no need to run them
serially.
  • Loading branch information
ejona86 authored Dec 3, 2024
1 parent f66d7fc commit c080b52
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit c080b52

Please sign in to comment.