Skip to content

Commit c080b52

Browse files
authored
.github/workflows: Split Bazel into two jobs
The two Bazel versions are completely separate; no need to run them serially.
1 parent f66d7fc commit c080b52

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

.github/workflows/testing.yml

+11-14
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,16 @@ jobs:
7777

7878
bazel:
7979
runs-on: ubuntu-latest
80+
strategy:
81+
matrix:
82+
include:
83+
# Test with and without bzlmod. Bazel 6 doesn't support bzlmod, so use Bazel 7 instead
84+
- bazel: 6.0.0
85+
bzlmod: false
86+
- bazel: 7.0.0
87+
bzlmod: true
8088
env:
81-
USE_BAZEL_VERSION: 6.0.0
89+
USE_BAZEL_VERSION: ${{ matrix.bazel }}
8290

8391
steps:
8492
- uses: actions/checkout@v4
@@ -97,19 +105,8 @@ jobs:
97105
key: ${{ runner.os }}-bazel-${{ env.USE_BAZEL_VERSION }}-${{ hashFiles('WORKSPACE', 'repositories.bzl') }}
98106

99107
- name: Run bazel build
100-
run: bazelisk build //... --enable_bzlmod=false
108+
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
101109

102110
- name: Run example bazel build
103-
run: bazelisk build //... --enable_bzlmod=false
104-
working-directory: ./examples
105-
106-
- name: Run bazel build (bzlmod)
107-
env:
108-
USE_BAZEL_VERSION: 7.0.0
109-
run: bazelisk build //... --enable_bzlmod=true
110-
111-
- name: Run example bazel build (bzlmod)
112-
env:
113-
USE_BAZEL_VERSION: 7.0.0
114-
run: bazelisk build //... --enable_bzlmod=true
111+
run: bazelisk build //... --enable_bzlmod=${{ matrix.bzlmod }}
115112
working-directory: ./examples

0 commit comments

Comments
 (0)