Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use buildjet cache instead of github cache on buildjet runners #5542

Closed
Voxelot opened this issue Feb 2, 2024 · 0 comments · Fixed by #5545
Closed

Use buildjet cache instead of github cache on buildjet runners #5542

Voxelot opened this issue Feb 2, 2024 · 0 comments · Fixed by #5545
Assignees
Labels
ci enhancement New feature or request

Comments

@Voxelot
Copy link
Member

Voxelot commented Feb 2, 2024

Our customers frequently report issues with actions/cache, ranging from stalling downloads to slow performance. The issues don't only slow down workflow runs significantly, but can even negate the speed gains given by the faster BuildJet hardware when caches get large.
Despite our best efforts to address these issues, they remain unresolved. Coupled with the recent staff changes at GitHub's India team - responsible for maintaining actions/cache - the commit activity has halted and numerous performance and stability issues remain unresolved.

https://buildjet.com/for-github-actions/blog/launch-buildjet-cache#why-buildjet-cache

The rust cache action seems to take up a lot of time to download the cached artifacts in the sway CI. We should migrate to buildjet cache following the examples here:

- uses: buildjet/cache@v3
  with:
    path: |
      ~/.cargo/bin/
      ~/.cargo/registry/index/
      ~/.cargo/registry/cache/
      ~/.cargo/git/db/
      target/
    key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

https://buildjet.com/for-github-actions/docs/guides/migrating-to-buildjet-cache#rust

For comparison, on the fuel-core repo the cache takes mere seconds to run a full clippy pass:
image

Whereas on sway, the rust cache action took several minutes for the mdbook job:
image

@kayagokalp kayagokalp added enhancement New feature or request ci labels Feb 2, 2024
@kayagokalp kayagokalp self-assigned this Feb 2, 2024
JoshuaBatty pushed a commit that referenced this issue Feb 5, 2024
## Description
closes #5542 

Switch to use buildjet cache for steps using buildjet runners.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants