actions-rust-lang / setup-rust-toolchain

Setup a specific Rust toolchain with extra features like problem matchers
MIT License
180 stars 32 forks source link

Please add rust profile for the action #46

Open mikolajsobolewski opened 1 week ago

mikolajsobolewski commented 1 week ago

For example usage:

      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          profile: production
jonasbb commented 1 week ago

Please expand what you want to achieve here and how you want to achieve it. It sounds like you are talking about cargo custom profiles and not about rustup profiles. setup-rust-toolchain really is more concerned with rustup and setting up a nice environment to use cargo in later on.

Cargo profiles are not really global. You don't want to set a custom profile globally, as that would break cargo install. There are good reasons to use different profiles for test, doc, release. That is why multiple are pre-defined.

amaanq commented 3 days ago

I don't mean to hijack, but since the author didn't clarify if they meant cargo profiles or not, what about Rustup profiles? I'd like to use the minimal profile with this action, if possible. Maybe I missed the docs but I couldn't see any mention of that anywhere

jonasbb commented 3 days ago

I don't mean to hijack, but since the author didn't clarify if they meant cargo profiles or not, what about Rustup profiles? I'd like to use the minimal profile with this action, if possible. Maybe I missed the docs but I couldn't see any mention of that anywhere

The action uses the minimal profile. This avoids installing unused components and forces you to be explicit about what you depend on, for the CI pipeline. As such, I don't think switching to default is a good choice. As for complete, the linked page even discourages the usage. I feel like @mikolajsobolewski asked about cargo profiles, since there is no production rustup profile.

amaanq commented 3 days ago

Oh great, that's awesome. Thank you!