moonrepo / setup-rust

A maintained GitHub action for setting up Rust and Cargo.
93 stars 8 forks source link

cache rustup binary #12

Open prabirshrestha opened 1 year ago

prabirshrestha commented 1 year ago

setup-rust action takes around 1min even though it is cached. Most likely the rustup binary and few other items are not cached.

https://github.com/moonrepo/setup-rust/blob/deec13b3d0b5422af3f5cf858ddacfde8dfa254f/src/cargo.ts#L105-L112

Setting cargo environment variables
Adding ~/.cargo/bin to PATH
rustup does not exist, attempting to install
Downloaded installation script to /tmp/rustup-init
[command]/tmp/rustup-init --default-toolchain none -y
info: downloading installer
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: skipping toolchain installation