Use setup-bazel GHA for disk and repository caching #177
Workflow file for this run
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
| # SPDX-License-Identifier: BSD-3-Clause | |
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| bazel_test: | |
| runs-on: ubuntu-latest | |
| env: | |
| # This is where bazelisk caches its downloads of Bazel. | |
| BAZELISK_HOME: /home/runner/.cache/bazel_ci/bazelisk | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Ubuntu dependencies | |
| run: .github/ci_setup.bash | |
| # TODO: explain the setup-bazel params below | |
| - uses: bazel-contrib/setup-bazel@0.15.0 | |
| with: | |
| # Store build cache globally | |
| disk-cache: true | |
| # Share repository cache globally as well. | |
| repository-cache: "" | |
| - name: Report cache sizes | |
| run: | | |
| du -ms ~/.cache/* || true | |
| # Actual testing. | |
| - name: Bazel Test | |
| run: | | |
| ln -s .github/ci.bazelrc user.bazelrc | |
| bazelisk test //... |