Skip to content

Bazel Remote Cache

Avrea provides a remote cache endpoint for Bazel. Build and test actions can be cached so that unchanged targets are never rebuilt.

Bazel is pre-configured via /etc/bazel.bazelrc:

.bazelrc
build --remote_cache=http://avrea-host:8290/bazel-build

Your workflow needs no changes:

workflow.yml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: bazel build //...
- run: bazel test //...

Add to your project .bazelrc or ~/.bazelrc:

.bazelrc
build --remote_cache=http://avrea-host:8290/bazel-build

You can combine the remote cache with other Bazel flags in your .bazelrc:

.bazelrc
build --remote_cache=http://avrea-host:8290/bazel-build
build --remote_upload_local_results=true
build --remote_accept_cached=true