bazel-contrib / bazel-contrib/setup-bazel
Option to turn off post action for PR branches to reduce overall build time
- Dominant language
- JavaScript
- Stars
- 83
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
I'm working on a mono repo project (with multi language support) and we have large cache built over time ~2GB. The cache download usually takes about 2 minute and saving the cache in post action takes about 5 minutes. The build without cache usually run about 17 minutes and with cache about 7 minutes (if there are any source changes in java project).
So with cache enabled the total build takes about 14minutes and we are wondering if we can remove the post action (to save cache) in PR branches and keep it only in main branch, so that we can save additional 5 minutes on most of the PR builds.
Is there an existing option to do this? If not, is it something worth considering?
Contributor guide
Research direction
Review the setup-bazel cache behavior and its post-action handling, then inspect how branch context and existing configuration options are exposed. Done means a documented option can skip cache saving for pull request branches while retaining it for the main branch, with the relevant behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100