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

chore(workflows): cache build artifacts #420

Merged
merged 5 commits into from
Feb 29, 2024
Merged

chore(workflows): cache build artifacts #420

merged 5 commits into from
Feb 29, 2024

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Feb 20, 2024

  1. Enables sscache using mozilla-actions/sccache-action.
  2. Caches Cargo dependencies (via ~/.cargo/registries/{index,cache}/ using actions/cache.

@caugner caugner changed the title chore(workflows): use sccache chore(workflows): cache build artifacts Feb 20, 2024
@caugner caugner marked this pull request as ready for review February 20, 2024 16:37
@caugner caugner requested a review from a team as a code owner February 20, 2024 16:37
@fiji-flo
Copy link
Contributor

Did you look at https://github.com/mozilla/sccache/blob/main/docs/GHA.md

I think we should either use that or cache the sccache dir.

Also afaik the sccache default location is ~/.cache/sccache.

@caugner
Copy link
Contributor Author

caugner commented Feb 22, 2024

Did you look at https://github.com/mozilla/sccache/blob/main/docs/GHA.md

I think we should either use that or cache the sccache dir.

Also afaik the sccache default location is ~/.cache/sccache.

Why should we implement/configure the GHA caching ourself or naively cache the whole sccache directory rather than using the dedicated sccache-action that does this for us almost out of the box? It looks like it uses multiple caches, which avoids that the sccache directory grows continuously in size or that you have to recompile everything when the Cargo.lock changes.

I could imagine that the sccache doc regarding GHA is outdated (last edited 9 months ago) and should mention the sccache-action (last commit a few days ago).

Copy link
Contributor

@fiji-flo fiji-flo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this out.

@caugner caugner merged commit d32d6cf into main Feb 29, 2024
3 checks passed
@caugner caugner deleted the sscache branch February 29, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants