-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Improve Ci cache #16709
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
Improve Ci cache #16709
Changes from all commits
26e1f74
81d1418
de4bb0a
165b288
8017c92
46484e4
d5b0eaa
481641a
30986a4
6488f47
53d54ed
1a87552
5000ae5
12c1a18
4da7d1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,5 +45,7 @@ runs: | |
| rustup component add rustfmt | ||
| - name: Setup rust cache | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| save-if: ${{ github.ref_name == 'main' }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this also have the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a macos run, so I don't this we should use shared key with other runs (which are on linux) If shared key isn't set, job-based one is used: https://github.com/Swatinem/rust-cache/blob/7e1e2d0a10862b34e5df481373b2b0f295d1a2ef/action.yml#L10
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So should be good as is! This line is added because we now cache CI runs on any branch, which takes up all our free CI space 😱 (which also made it hard to test during development) |
||
| - name: Configure rust runtime env | ||
| uses: ./.github/actions/setup-rust-runtime | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL that
rust-cachecaches the Rust binaries toohttps://github.com/Swatinem/rust-cache?tab=readme-ov-file#cache-details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, something I noticed was maybe we should pin to an actual hash rather than a tag that is updated
https://github.com/Swatinem/rust-cache/tags
I think security best practice would be to pin to Swatinem/rust-cache@98c8021 for example rather than https://github.com/Swatinem/rust-cache/releases/tag/v2
However, this wasn't introduced in this PR so I don't think it needs to be fixed here