Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Supply specific list of components to install #71

Open
nagisa opened this issue Apr 4, 2020 · 4 comments
Open

Supply specific list of components to install #71

nagisa opened this issue Apr 4, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@nagisa
Copy link

nagisa commented Apr 4, 2020

Motivation

I’m trying to make a CI that tests x86_64-unknown-openbsd target. There is no rust-std component for this target so I thought I’d just get actions to build libstd in the first place (via e.g. -Zbuild-std).

Alas, I’m not seeing how to disable rust-std component with this workflow, so I’ll probably have to write one myself...

Workflow example

      - name: Install Rust nightly
        uses: actions-rs/toolchain@v1
        with:
            toolchain: nightly
            target: x86_64-unknown-openbsd
            profile: minimal
            default: true
            components: rust-src
@nagisa nagisa added the enhancement New feature or request label Apr 4, 2020
@nagisa
Copy link
Author

nagisa commented Apr 4, 2020

Notably, there is no profile that’s less than minimal AFAICT?

@svartalf
Copy link
Member

svartalf commented Apr 4, 2020

Hey, @nagisa!

Is it possible to achieve what you want with the rustup directly? This Action just delegates all work to the rustup and so far I'm not sure if it can install rust-src component only, so it would be really helpful to understand if and how it could be done at all.

And profiles are just the rustup profles, you can check them out.

@nagisa
Copy link
Author

nagisa commented Apr 5, 2020

I managed to do it by just doing:

# install rustup (with rustc and cargo for the host)
rustup component add rust-src --toolchain nightly --target ${{ matrix.rust_target }}
# at this stage you only have 1 component – rust-src for the target. and a host toolchain.

@svartalf
Copy link
Member

svartalf commented Apr 5, 2020

I see, thanks for the clarification.

In a current state components: input values are passed into the rustup toolchain install and not tied to target: input at all; for example, components: rustfmt, clippy will result in rustup toolchain install stable --component rustfmt --component clippy call.
As a quick workaround you can use this Action to install host toolchain first (it will also guarantee that your environment will have latest rustup installed and available from $PATH) and then use steps.run with your rustup component add rust-src … line.

Yet, this case looks important and should be supported and it should be investigated further on how this Action should be modified in order to support it (ideally without introducing breaking changes).
Let's leave this issue opened and I'll see what should be done with it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants