chore(deps): bump houseabsolute/actions-rust-cross from 0 to 1 (#5) #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
push: | |
branches: | |
- "main" | |
paths-ignore: | |
- "**.md" | |
- LICENSE | |
pull_request: | |
branches: | |
- "*" | |
paths-ignore: | |
- "**.md" | |
- LICENSE | |
workflow_dispatch: | |
release: | |
types: [published, edited] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: ${{ matrix.os }} with rust ${{ matrix.toolchain }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
toolchain: [stable, nightly] | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
steps: | |
- name: Remove unused tools | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain for stable | |
if: matrix.toolchain == 'stable' | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: Setup Rust toolchain for nightly | |
if: matrix.toolchain == 'nightly' | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.target }} | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "rust" | |
- name: Install Rust tools | |
run: | | |
rustup component add rustfmt clippy | |
cargo install cargo-audit cargo-outdated | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Lint with clippy | |
run: cargo clippy -- -D warnings | |
- name: Audit dependencies | |
run: cargo audit | |
- name: Check for outdated dependencies | |
run: cargo outdated |