Skip to content

ci: Improve bazel caching#133

Draft
lurtz wants to merge 13 commits into
mainfrom
improved-caching
Draft

ci: Improve bazel caching#133
lurtz wants to merge 13 commits into
mainfrom
improved-caching

Conversation

@lurtz

@lurtz lurtz commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

At the moment the bazel caches can become huge and outdated at the same time. Thus this changes the cache handling as follows:

  • repository cache is keying is unchanged. However the user repository needs a job, which rebuilds it when especially the MODULE.bazel.lock changes. Otherwise it will be incomplete and some jobs still need to download stuff from the internet instead of reusing the cache.
  • disk cache is unique per job and updated with each job run

This requires the presence of a dedicated cache maintenance job. This must at least rebuild the repository cache on MODULE.bazel.lock changes. In addition it shall delete the disk caches to ensure their growth is limited and outdated files are removed.

@lurtz lurtz force-pushed the improved-caching branch from bf210b4 to ca8f343 Compare July 1, 2026 12:40
@lurtz lurtz changed the title Improved caching ci: Improve bazel caching Jul 1, 2026
lurtz added 7 commits July 1, 2026 15:38
…ssing

- Remove OLD_CACHES_JSON environment variable definition
- Update repository-cache-check to use new output-based pattern
- Update repository-cache-refresh to consume old-caches-json from check step output
- Eliminate filesystem dependency for passing cache data between steps

This change works with the updated cicd-actions repository which now properly
uses GitHub's native input/output variable mechanism instead of file paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants