How to keep binaries between separate runs and jobs?


I’ve got a use-case that I need to use the macOS vm (a rust package that does is not supported in Linux yet), to compile, add to path (rust, packages, etc). This is quite costly since I build it on every run, and if I want to keep jobs separate I’d have to do so too.

Started by running a set of commands from a shell script, but found GitHub - actions-rs/cargo: 📦 GitHub Action for Rust `cargo` command among others (need rustup although, will check if supported or have to run the command myself), which I’m running in a new workflow rewrite at time of writing (will take a bit of time).

Ultimately, would be nice to “cache” the binaries and reuse between separate runs and jobs (this is hard as I’d have to know about all the generated binaries and associated files, might be a lot of a single file, will check), but not sure if that’d be a good practice.

I can’t speak from experience here, but there is an example for how to use actions/cache with Rust: cache/ at 0638051e9af2c23d10bb70fa9beffcad6cff9ce3 · actions/cache · GitHub