rust-toolchain files take precedence over input
aviramha opened this issue · 6 comments
Thanks for this action!
I just migrated from the actions-rs
one and there the input overriden the rust-toolchain
file. wondered if we can do the same here?
Hi, prioritizing the rust-toolchain makes more sense to me. After all, you use a toolchain file if you want to control the Rust version of any contributor and consumer of a project. That does include CI. Why do you want to use a different toolchain?
Our use case is that we have a rust toolchain file for pinning the channel (nightly-date
) but in the CI we compile against various targets so we'd want to use the action to install specific targets for each build.
If I understand you correctly, you want to pin the tool chain version, but in your CI environment you want to use more/different targets. In that case maybe merging the two sets of target definitions is a better option. Having more targets available should not be downside. Concretely that means first getting rustup to install everything given in the rust-toolchain
file. Then callinhg rustup to add all the targets which are given to the action via the input.
I added support for installing additional target
s and components
via input parameters in #19.
Hi, I have the same problem in avr-hal. There is a rust-toolchain.toml
at the root of the repository which is used for building most things. However, one component (ravedude) is built with a different toolchain which is specified in a rust-toolchain.toml
file in the relevant subdirectory.
In the CI job, however, setup-rust-toolchain
always uses the toolchain from the root rust-toolchain.toml
and I can't find a way to override it for this one job.