Install Rust Toolchain
This GitHub Action installs a Rust toolchain using rustup. It is designed for one-line concise usage and good defaults.
name: test suite on: [push, pull_request] jobs: test: name: cargo test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo test --all-features
The selection of Rust toolchain is made based on the particular @rev of this Action being requested. For example "dtolnay/rust-toolchain@nightly" pulls in the nightly Rust toolchain, while "email@example.com" pulls in 1.42.0.
All inputs are optional.
Rustup toolchain specifier e.g.
||Comma-separated string of additional targets to install e.g.
||Comma-separated string of additional components to install e.g.
||A short hash of the installed rustc version, appropriate for use as a cache key.
||Rustup's name for the selected version of the toolchain, like
The following forms are available for projects that use a sliding window of compiler support.
# Installs the most recent stable toolchain as of the specified time # offset, which may be written in years, months, weeks, or days. - uses: dtolnay/rust-toolchain@master with: toolchain: stable 18 months ago
# Installs the stable toolchain which preceded the most recent one by # the specified number of minor versions. - uses: dtolnay/rust-toolchain@master with: toolchain: stable minus 8 releases
The scripts and documentation in this project are released under the MIT License.