Fix preserve target-triple build artifacts#356
Open
eitsupi wants to merge 2 commits into
Open
Conversation
62c8a3f to
257d117
Compare
257d117 to
92bdd21
Compare
eitsupi
added a commit
to pola-rs/r-polars
that referenced
this pull request
Jul 4, 2026
## Summary - pin Swatinem/rust-cache to the latest commit from Swatinem/rust-cache#356 - preserve Cargo artifacts under target-specific profile directories - update every rust-cache use consistently ## Context The previous cleanup logic treated target/<triple> as a Cargo profile directory and removed nested debug or release artifacts before saving the cache. Swatinem/rust-cache#356 fixes profile detection and adds cross-platform save/restore coverage.
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
--targetProblem
Cargo places artifacts under
target/<target-triple>/<profile>when--targetis specified. The target-triple directory does not containCACHEDIR.TAGor.rustc_info.json.cleanTargetDirtherefore treated the target triple as a profile directory.cleanProfileTargetthen removed itsreleaseordebugchild entirely, so those build artifacts never reached the cache.This was observed in https://github.com/pola-rs/r-polars on Windows, where
target/x86_64-pc-windows-gnu/releasewas deleted during the post-step cleanup.Validation
linefix distzizmor .github/workflows/target-triple.ymlgit diff --checkThe new workflow creates a unique cache on Ubuntu, macOS, and Windows, builds with the host triple passed explicitly to Cargo, restores the cache in a dependent job, and asserts that the target-triple artifact is present.