Closed filips123 closed 2 years ago
That sound like a good solution to the problem. I would like to have the cache enabled by default.
Add a new input to action.yml
with a default. Gate the rust-cache
step with an if
on the new input. Document the new input in the README. Do you want to create a PR?
Yes, I can create it.
Problem
Currently,
actions-rust-lang/setup-rust-toolchain
automatically usesSwatinem/rust-cache
action to configure Rust cache.This may not work if users want to provide custom options to
Swatinem/rust-cache
themselves. For example, in my case, I need to provideworkspaces
input as my crate is in the subdirectory of a project. This causesSwatinem/rust-cache
to be configured twice, which may impact performance, and also causes build warnings such as "Warning: error: could not findCargo.toml
in ...".Proposed Solution
Add an input
cache
to this action (probably on by default) that determines whetherSwatinem/rust-cache
is configured automatically.