name: Rust
on: [push, pull_request, workflow_dispatch]
jobs:
check:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v6
- name: Setup | Toolchain
run: rustup toolchain install --profile minimal
- name: Setup | Build cache
uses: Swatinem/rust-cache@v2
- name: Check (VEXos)
run: cargo check --all-targets --target=armv7a-vex-v5
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v6
- name: Setup | Toolchain
run: rustup toolchain install --profile minimal
- name: Setup | Install clippy
run: rustup component add clippy
- name: Setup | Build cache
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --all-targets --target=armv7a-vex-v5
env:
RUSTFLAGS: "-Dwarnings"
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v6
- name: Setup | Toolchain
run: rustup toolchain install --profile minimal
- name: Setup | Install Rustfmt
run: rustup component add rustfmt
- name: Check formatting
run: cargo fmt --all --check