This Action installs a Rust toolchain using rustup. It is designed to be easy to use with good defaults.
This project is a fork of dtolnay/rust-toolchain with a greater focus on stability and ease of use at the cost of one-line usage. It intends to expressly support all of GitHub, Gitea, and Forgejo Actions.
This repository is mirrored on a few different remotes:
Please only submit issues and pull requests on Codeberg.
name: CI
on:
push:
pull_request:
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wackbyte/rust-toolchain@trunk
with:
toolchain: stable
- run: cargo test --all-features
Name | Description | Default value |
---|---|---|
toolchain |
rustup toolchain name. It is recommended to use quotes in order to avoid versions being parsed as floating-point numbers. Example values:
|
(required) |
targets |
Comma-separated list of target triples to be additionally installed for this toolchain. Example value: |
(empty) |
components |
Comma-separated list of components to be additionally installed for this toolchain. Example value: |
(empty) |
profile |
Group of components to install for this toolchain.
It is recommended to use Available values:
|
minimal |
default |
Set this toolchain as default.
Equivalent to running |
false |
override |
Set this toolchain as an override for this directory.
Equivalent to running |
false |
Name | Description |
---|---|
cachekey |
A short hash of the installed rustc version. Appropriate for use as a cache key. Example value: |
name |
rustup's name for the selected version of the toolchain.
Suitable for use with the Example value: |
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: wackbyte/rust-toolchain@trunk
with:
toolchain: stable 18 months ago
# Installs the stable toolchain which preceded the most recent one by the
# specified number of minor versions.
- uses: wackbyte/rust-toolchain@trunk
with:
toolchain: stable minus 8 releases
The scripts and documentation in this project are released under the MIT License.