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

Allow opting out of caching $CARGO_HOME/bin. #216

Merged
merged 7 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove superfluous comment
  • Loading branch information
benjyw committed Oct 30, 2024
commit 929b95c8737b6d6a4d56cdf6bc7ee94129945bc3
6 changes: 0 additions & 6 deletions dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88396,12 +88396,6 @@ class CacheConfig {
self.keyFiles = sort_and_uniq(keyFiles);
key += `-${lockHash}`;
self.cacheKey = key;
// The original action (https://github.com/Swatinem/rust-cache) cached the entire CARGO_HOME,
// but cleaned out CARGO_HOME/bin of all binaries that weren't built by the CI run itself.
// This had the unfortunate side-effect of nuking rustup/cargo/rustc etc from self-hosted runners.
// (This is usually not a problem on hosted runners, since you get a fresh container on each run).
// So we edit this action to not cache bin/, and to bypass cleaning that directory out.
// TODO: Create an upstream patch for this, controlled by an option.
self.cachePaths = [
external_path_default().join(config_CARGO_HOME, "registry"),
external_path_default().join(config_CARGO_HOME, "git"),
Expand Down
6 changes: 0 additions & 6 deletions dist/save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88396,12 +88396,6 @@ class CacheConfig {
self.keyFiles = sort_and_uniq(keyFiles);
key += `-${lockHash}`;
self.cacheKey = key;
// The original action (https://github.com/Swatinem/rust-cache) cached the entire CARGO_HOME,
// but cleaned out CARGO_HOME/bin of all binaries that weren't built by the CI run itself.
// This had the unfortunate side-effect of nuking rustup/cargo/rustc etc from self-hosted runners.
// (This is usually not a problem on hosted runners, since you get a fresh container on each run).
// So we edit this action to not cache bin/, and to bypass cleaning that directory out.
// TODO: Create an upstream patch for this, controlled by an option.
self.cachePaths = [
external_path_default().join(CARGO_HOME, "registry"),
external_path_default().join(CARGO_HOME, "git"),
Expand Down
6 changes: 0 additions & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,6 @@ export class CacheConfig {
key += `-${lockHash}`;
self.cacheKey = key;

// The original action (https://github.com/Swatinem/rust-cache) cached the entire CARGO_HOME,
// but cleaned out CARGO_HOME/bin of all binaries that weren't built by the CI run itself.
// This had the unfortunate side-effect of nuking rustup/cargo/rustc etc from self-hosted runners.
// (This is usually not a problem on hosted runners, since you get a fresh container on each run).
// So we edit this action to not cache bin/, and to bypass cleaning that directory out.
// TODO: Create an upstream patch for this, controlled by an option.
self.cachePaths = [
path.join(CARGO_HOME, "registry"),
path.join(CARGO_HOME, "git"),
Expand Down