Skip to content
box

GitHub Action

brndnmtthws/rust-action-rustup

v1.1.0 Latest version

brndnmtthws/rust-action-rustup

box

brndnmtthws/rust-action-rustup

Rustup install action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: brndnmtthws/rust-action-rustup

uses: brndnmtthws/[email protected]

Learn more about this action in brndnmtthws/rust-action-rustup

Choose a version

Build and test

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

Show me the code
- uses: brndnmtthws/rust-action-rustup@v1

Install a minimal stable toolchain

Show me the code
- uses: brndnmtthws/rust-action-rustup@v1
  with:
    toolchain: stable
    profile: minimal

Install a minimal stable toolchain with rustfmt and clippy

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

Install the default nightly toolchain

Show me the code
- uses: brndnmtthws/rust-action-rustup@v1
  with:
    toolchain: nightly

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

Show me the code
- uses: brndnmtthws/rust-action-rustup@v1
  with:
    self-update: 'true'