Repository navigation
CI: Use local cache action. Cache Windows via GitHub - #5951
Merged
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Swatinem/rust-cache's warpbuild provider bundles an @actions/glob that matches no paths on Windows, so those jobs have never saved a cache (Path Validation Error) since the Rollup migration in v2.9.0. Swatinem/rust-cache#355 fixed only the GitHub provider.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the ten
Swatinem/rust-cache@v2blocks and the mark/prunepython3steps inmain.ymlwith a single local action per job, then fixes two cache problems on top (separate commits)..github/actions/rust-cache(composite):Swatinem/rust-cache@v2with the shared settings (cache-all-crates,cache-workspace-crates,save-if: github.ref == 'refs/heads/main'), passing through optionalkeyandworkspacesinputs, followed by:.github/actions/prune-cargo-target(node24, no dependencies):main: mark.jssets every fingerprint file's atime to 0 right after the cache is restored;post: prune.js(post-if: success()) deletes thedeps/build/.fingerprint/examplesentries whose fingerprint cargo never read. Nested actions' post steps run in reverse order, so the prune runs before rust-cache's post-step save. Same algorithm asprune-cargo-target.pyfrom #5950, ported to Node (fs.lutimesSync,lstatSync({ bigint: true }).atimeNs).Each job is now just:
Don't prune when the filesystem doesn't record atime.
pruneonly bailed out if no fingerprint had been read; on anoatimemount freshly compiled units still get nonzero atimes, so every restored-but-reused unit would have been deleted. Nowprunealso reads one fingerprint that is still at atime 0 and skips pruning if its atime did not move.Windows caches go to GitHub's cache service.
Bundle | WindowsandPlaywright | Windowshave never saved a cache since March (restore 404, savePath Validation Error: Path(s) specified in the action for caching do(es) not exist). The cause is not theV:dev drive: rust-cache v2.9.0's Rollup bundle ships a CommonJS copy of@actions/glob@0.6.1that matches no paths on Windows (actions/toolkit#2484), and Swatinem/rust-cache#355 (v2.9.2) fixed only the GitHub provider, leavingcache-provider: warpbuildbroken there. The composite action now selects the provider per OS:Verified on this PR's CI by temporarily allowing Windows saves (commit since reverted): both Windows jobs saved (1.63 GB / 1.30 GB, ~36 s) and mark/prune ran on the dev drive.
Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/63e4b68136954300817972d04a921c7b
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/63e4b68136954300817972d04a921c7b?variant=devin-insiders
Requested by: @nicoburns