rust-action-rustup

GitHub action for installing rustup

AGPL-3.0 License

Stars
3

GitHub action for installing rustup

This action provides a simple way to install rustup, the official Rust language toolchain management tool. This action sets the default toolchain to the one specified (or the default, if none is specified).

You can use this action in your workflow directly, or use the all-in-one action for all your Rust CI needs.

Inputs

Input Description Default? Example
toolchain The Rust toolchain to install (i.e., stable, nightly, beta, etc). Refer to https://rust-lang.github.io/rustup/concepts/toolchains.html on how to specify the toolchain. stable nightly
components List of individual components to install after installing rustup. Can be a whitespace or comma separated list. n/a clippy, rustfmt
profile Override the default rustup profile (for example, 'minimal'). n/a minimal
allow-downgrade Allow rustup to downgrade the installation until all components are available. true false
targets Install additional targets for cross compilation (i.e., 'x86_64-apple-ios, armv7-unknown-linux-musleabi'). Can be a whitespace or comma separate list of targets. Run rustup target list to list all targets. n/a aarch64-fuchsia
self-update Make sure rustup itself is up-to-date before using it. This may fail on some platforms, so it's disabled by default. false true

Outputs

Output Description
toolchain The Rust toolchain that which was installed.
rustc-version The installed rustc version for the current toolchain.

Recipes

Install with defaults

- uses: brndnmtthws/rust-action-rustup@v1

Install a minimal stable toolchain

- uses: brndnmtthws/rust-action-rustup@v1
  with:
    toolchain: stable
    profile: minimal

Install a minimal stable toolchain with rustfmt and clippy

- uses: brndnmtthws/rust-action-rustup@v1
  with:
    toolchain: stable
    profile: minimal
    components: rustfmt, clippy

Install the default nightly toolchain

- uses: brndnmtthws/rust-action-rustup@v1
  with:
    toolchain: nightly

Install the default toolchain, and ensure rustup is up-to-date

- uses: brndnmtthws/rust-action-rustup@v1
  with:
    self-update: 'true'
Package Rankings
Top 21.81% on Github actions
Badges
Extracted from project README
Build and test