Skip to content

Commit

Permalink
Disable the Bazel disk cache on CI. (#4375)
Browse files Browse the repository at this point in the history
This should free up quite a bit of space and even make our builds faster
by avoiding duplicating every output. The syntax for this flag is
counter intuitive, so I've left a comment explaining it.
  • Loading branch information
chandlerc authored Oct 6, 2024
1 parent 6dbeda6 commit e38ad83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/actions/build-setup-common/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ runs:
shell: bash
run: |
cat >user.bazelrc <<EOF
# Disable the local disk cache as we use a remote cache and don't want
# two copies of every output taking up disk space. The only way to
# disable the disk cache is with an empty string:
# https://github.com/bazelbuild/bazel/issues/5308
build --disk_cache=
# Enable remote cache for our CI but minimize downloads.
build --remote_cache=https://storage.googleapis.com/carbon-builds-github-v${CACHE_VERSION}
build --remote_download_minimal
Expand Down

0 comments on commit e38ad83

Please sign in to comment.