name: CI
on:
push:
branches:
- '**'
tags-ignore: ['*']
pull_request:
branches:
- '**'
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Build and test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- name: Check formatting
if: ${{ !cancelled() }}
run: cargo fmt --all -- --check
- name: Run clippy
if: ${{ !cancelled() }}
run: cargo clippy --workspace -- -D warnings
- name: Build (all targets)
if: ${{ !cancelled() }}
run: cargo build --workspace --all-targets --verbose
- name: Run tests
if: ${{ !cancelled() }}
run: cargo test --workspace --verbose