Skip to content

Use setup-bazel GHA for disk and repository caching #174

Use setup-bazel GHA for disk and repository caching

Use setup-bazel GHA for disk and repository caching #174

Workflow file for this run

# 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:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# 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 //...