Disable the Bazel disk cache on CI. (#4375)

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.
This commit is contained in:
Chandler Carruth
2024-10-06 18:02:30 +00:00
committed by GitHub
parent 6dbeda612a
commit e38ad83bfd
@@ -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