Require Bazel 8+ #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| bazel: ["latest"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Bazel | |
| uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| bazelisk-version: "1.27.0" | |
| disk-cache: ${{ github.workflow }}-linux-${{ matrix.bazel }} | |
| repository-cache: ${{ github.workflow }} | |
| - name: Build | |
| run: bazel build //... | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} | |
| - name: Test | |
| run: bazel test //... | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} | |
| build-macos: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| bazel: ["latest"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Bazel | |
| uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| bazelisk-version: "1.27.0" | |
| disk-cache: ${{ github.workflow }}-macos-${{ matrix.bazel }} | |
| repository-cache: ${{ github.workflow }} | |
| - name: Build | |
| run: bazel build //... | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} | |
| # Docker is not available on GitHub-hosted macOS runners | |
| # https://github.com/actions/runner/issues/1456 | |
| - name: Test (excluding docker tests) | |
| run: bazel test //... --test_tag_filters=-docker | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} |