name: 'Usage of rust-toolchain GitHub Action'
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
Rust Toolchain
Concise GitHub Action for installing a Rust toolchain
What is Rust Toolchain?
Incorporating Rust into our projects requires a reliable and efficient setup for the Rust toolchain. The Install Rust Toolchain GitHub Action simplifies the installation of the Rust environment using rustup. It is optimized for simplicity and effectiveness, ensuring our workflows are streamlined and maintainable.
Configuration Options
toolchain
Specifies the Rustup toolchain, such as stable, nightly, 1.42.0, or nightly-2022-01-01. If you pass an explicit toolchain as an input instead of using @rev, you should use "dtolnay/rust-toolchain@master" as the revision of the action.
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
targets
A comma-separated string of additional targets to install, e.g., wasm32-unknown-unknown.
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components
A comma-separated string of additional components to install, e.g., clippy, rustfmt.
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
Monitoring GitHub Actions Workflows
CICube is a GitHub Actions monitoring tool that provides you with detailed insights into your workflows to further optimize your CI/CD pipeline. With CICube, you will be able to track your workflow runs, understand where the bottlenecks are, and tease out the best from your build times. Go to cicube.io now and create a free account to better optimize your GitHub Actions workflows!