Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

rs-workspace/rust-toolchain

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Super-Linter CI Check dist/ CodeQL Coverage

Rust Toolchain (GitHub Action)

GitHub actions for installing rust toolchain

Warning

This action has been deprecated. It is recommended to use rustup, which is pre-installed on GitHub-hosted runners, or alternatively, consider using the dtolnay/rust-toolchain action available at https://github.com/dtolnay/rust-toolchain for better support and functionality.

Example Workflow

name: test suite
on: [push, pull_request]

jobs:
  test:
    name: cargo test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: rs-workspace/rust-toolchain@main
      - run: cargo test --all-features

This installs the stable version of rust with default profile. To customize this you need to pass the inputs:

Inputs

All inputs are optional

Name Description
toolchain Rust toolchain specifier e.g. stable, nightly, beta, nightly-2024-10-12, etc. Read More
profile The group of components to be installed. Read More
components The list of space seperated rust components. Read More
Example
name: test suite
on: [push, pull_request]

jobs:
  test:
    name: cargo test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: rs-workspace/rust-toolchain@main
        with:
          toolchain: nightly-2024-10-12 # Optional; Defaults to stable
          profile: minimal # Optional; Defaults to default
          components: miri # Optional
      - run: cargo test --all-features

For another example see ci.yml

Outputs

No outputs are given when running this action

Summary

A Summary table is created with the version of rustc and rustup

License

The scripts and documentation in this project are released under the MIT License.

About

GitHub action for installing rust toolchain

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Contributors 2

  •  
  •