Closed smolkaj closed 11 months ago
--disk_cache
hashFiles('**/*_deps.bzl', '**/*.bazelrc')
Using --disk_cache has the following advantage [source]:
running bazel build without --disk_cache will result in re-builds if you make changes and change them back, even inside the same directory
Adding new Action cache entries increases the expected relevance ("freshness") of cache hits.
Faster CI runs. Reduction in slow CI runs.
The time for a re-run of the bazel CI script with no code changes drops from ~ 2 minutes to < 1 min.
Changes
--disk_cache
in CI runs.hashFiles('**/*_deps.bzl', '**/*.bazelrc')
changed.Motivation
Using
--disk_cache
has the following advantage [source]:Adding new Action cache entries increases the expected relevance ("freshness") of cache hits.
Expected result
Faster CI runs. Reduction in slow CI runs.
Empirical result
The time for a re-run of the bazel CI script with no code changes drops from ~ 2 minutes to < 1 min.
Before
After