axodotdev / cargo-dist

📦 shippable application packaging
https://axodotdev.github.io/cargo-dist/
Apache License 2.0
1.31k stars 56 forks source link

feat: cache cargo-dist binary in global builds #1165

Closed mistydemeo closed 1 week ago

mistydemeo commented 1 week ago

Currently, we fetch or build the cargo-dist binary every single time. If we're building for git, this gets repetitive and slow. This speeds it up by uploading the binary we fetched to the build artifacts, where we can fetch it back for later runs without rebuilding from source.

This doesn't affect local builds, only things which use the global build runner.

This bakes in an assumption we're running the global tasks on Unix. It's already the case that this will blow up on Windows, but it may be better to be more forward-thinking about it.

In testing, this cut ~5 minutes off of from-git testing builds, which is a nice time savings.