Merge pull request #165 from jasongraffius/toolchain-matrix
Update actions to run both clang and GCC
diff --git a/.github/workflows/run-bazel-tests.yml b/.github/workflows/run-bazel-tests.yml
deleted file mode 100644
index 71331a6..0000000
--- a/.github/workflows/run-bazel-tests.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-name: Run Bazel tests
-on: [pull_request]
-
-jobs:
- run-bazel-tests:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: bazel-contrib/setup-bazel@0.8.5
- with:
- bazelisk-cache: true
- disk-cache: ${{ github.workflow }}
- repository-cache: true
- - run: bazel test ...
diff --git a/.github/workflows/verify-pull-request.yml b/.github/workflows/verify-pull-request.yml
new file mode 100644
index 0000000..b7464a5
--- /dev/null
+++ b/.github/workflows/verify-pull-request.yml
@@ -0,0 +1,19 @@
+name: Verify PR
+on: [pull_request]
+
+jobs:
+ run-bazel-tests:
+ name: "Run Bazel tests"
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ cpp-compiler: ["clang", "gcc"]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: bazel-contrib/setup-bazel@0.8.5
+ with:
+ bazelisk-cache: true
+ disk-cache: "verify-pr:run-bazel-tests:${{ matrix.cpp-compiler }}"
+ repository-cache: true
+ - run: echo "CC=${{ matrix.cpp-compiler }}" >> $GITHUB_ENV
+ - run: bazel test ...