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

Prune build artifacts for CI caching speed up #23

Open
Eh2406 opened this issue Jan 28, 2019 · 1 comment
Open

Prune build artifacts for CI caching speed up #23

Eh2406 opened this issue Jan 28, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Eh2406
Copy link
Collaborator

Eh2406 commented Jan 28, 2019

Some high profile projects have seen speed ups on CI by removing the final artifacts before caching. Specifically crates.io. However when crater tried a generalized version of this it broke a lot of things.

Plan of attack:

  1. use cargo_metadata::Target to get the list of all names to remove.
  2. look at cargos code to see how the name is normalized into the file structure. (crates.io is just replacing - with _, but we should make sure that is correct in general.)
  3. add a sub command that removes the appropriate files.
  4. test that it works on crates.io code.
  5. test that it works on several of the crates that broke on crater.

I meant to look at this this past weekend but did not have time. This is mostly notes for when I next have time.

@holmgr holmgr added the enhancement New feature or request label May 22, 2020
@jyn514
Copy link
Collaborator

jyn514 commented Feb 2, 2023

Some high profile projects have seen speed ups on CI by removing the final artifacts before caching. Specifically crates.io. However when crater tried a generalized version of this it broke a lot of things.

My reading of that issue is that it was a bug in the crater implementation, and not the idea itself: rust-lang/crater#387 (comment). Anyway, I think crater is mostly unrelated and we should be able to implement this in cargo-sweep.

(crates.io is just replacing - with _, but we should make sure that is correct in general.)

I don't think that's true? If you look at the target dir for cargo-sweep itself, it has the original dash:

; file target/debug/cargo-sweep
target/debug/cargo-sweep: Mach-O 64-bit executable arm64

Is there something you were referring to other than the final executable?

cc #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants