Skip to content

A action to setup rust at a specific version using rustup.

License

Notifications You must be signed in to change notification settings

mbruno-kr/setup-rust

 
 

Repository files navigation

setup-rust - A actions to install rust (obviously)

Options

Option Required Description
rust-version true The version of rust to install
components false The additional components to install eg. clippy, rustfmt
targets false The additional targets to install

Example

A basic example on how to use this action

name: Rust

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v2
      - name: Setup | Rust
        uses: ATiltedTree/setup-rust@v1
        with:
          rust-version: stable
          components: clippy
      - name: Build | Lint
        run: cargo clippy
  compile:
    name: Compile
    runs-on: ubuntu-latest
    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v2
      - name: Setup | Rust
        uses: ATiltedTree/setup-rust@v1
        with:
          rust-version: stable
      - name: Build | Compile
        run: cargo check
  test:
    name: Test
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
          - macOS-latest
        rust:
          - stable
          - beta
          - nightly
    runs-on: ${{ matrix.os }}
    needs: [compile]
    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v2
      - name: Setup | Rust
        uses: ATiltedTree/setup-rust@v1
        with:
          rust-version: ${{ matrix.rust }}
      - name: Build | Compile
        run: cargo test

About

A action to setup rust at a specific version using rustup.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%