You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "SanyamSuyal (via GitHub)" <gi...@apache.org> on 2025/10/10 09:18:24 UTC
[PR] feat(ci): cache Bazel binary in Python CI workflow [fory]
SanyamSuyal opened a new pull request, #2745:
URL: https://github.com/apache/fory/pull/2745
### Problem
Fixes #2742
Python CI downloads Bazel binary on every run, which:
- Takes 2-5 seconds per run
- Can fail due to transient network errors
- Wastes bandwidth and CI resources
### Solution
Implemented GitHub Actions caching for Bazel binary to avoid repeated downloads.
### Changes
- `.github/workflows/ci.yml`: Added actions/cache@v4 step to cache Bazel binary
- Caches ~/bin/bazel and ~/.local/bin/bazel
- Cache key includes OS, architecture, and Bazel version hash
- Invalidates cache when Bazel version changes
- `ci/tasks/common.py`: Updated install_bazel() function
- Checks if cached Bazel binary exists before downloading
- Verifies cached binary works by running bazel --version
- Automatically re-downloads if cached binary is corrupted
- Skips download entirely when cache is valid
### Testing
Tested all scenarios:
- Fresh install (no cache) - downloads successfully
- Cache hit (valid binary) - skips download, saves time
- Corrupted cache - detects corruption and recovers automatically
- All Python syntax and YAML validation passed
### Benefits
- Faster builds: Saves 2-5 seconds per CI run when cache hits
- More reliable: Reduces dependency on network availability
- Cost savings: Less bandwidth usage and shorter CI runtime
### Related
Follow-up to #2733 (retry logic for Bazel downloads)
Fixes #2742
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [PR] feat(ci): cache Bazel binary in Python CI workflow [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang merged PR #2745:
URL: https://github.com/apache/fory/pull/2745
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org