mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2025-06-07 11:16:37 +00:00
1.4 KiB
1.4 KiB
Install Rust Toolchain via rust-toolchain.toml
Fork of https://github.com/dtolnay/rust-toolchain that supports and makes it mandatory to use a rust-toolchain.toml file.
Example workflow
Create a rust-toolchain.toml
file:
[toolchain]
channel = "1.68"
components = [ "rustfmt", "clippy" ]
Then add an entry to this action in your github actions:
name: test suite
on: [push, pull_request]
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@1
- run: cargo test --all-features
The selection of Rust toolchain is made based on the rust-toolchain.toml file.
Inputs
None. You must define everything in the rust-toolchain.toml file.
Outputs
Name | Description |
---|---|
cachekey |
A short hash of the installed rustc version, appropriate for use as a cache key. "20220627a831" |
name |
Rustup's name for the selected version of the toolchain, like "1.62.0" . Suitable for use with cargo +${{steps.toolchain.outputs.name}} . |
License
The scripts and documentation in this project are released under the MIT License.