name: CI
on:
push:
branches:
- "main"
paths:
- ".github/workflows/ci.yaml"
- "Cargo.toml"
- "Cargo.lock"
- 'src/**'
- "tests/**"
- "benches/**"
- "fuzz/**"
pull_request: {}
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
strategy:
matrix:
rust-version:
- stable
- beta
runner:
- "ubuntu-22.04"
- "ubuntu-24.04"
- "ubuntu-24.04-arm"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt, clippy
- name: Lint (clippy)
run: cargo clippy --all-features
- name: Lint (rustfmt)
run: cargo fmt --all --check
build:
name: Build and test
strategy:
matrix:
rust-version:
- stable
- beta
runner:
- "ubuntu-22.04"
- "ubuntu-24.04"
- "ubuntu-24.04-arm"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-version }}
- uses: taiki-e/install-action@nextest
- name: Run all tests
run: cargo nextest run --all-features