name: CI
on:
push:
branches: [master, main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check
- name: clippy (windows, everything)
if: runner.os == 'Windows'
run: cargo clippy --all-targets
- name: clippy (linux, portable targets)
if: runner.os != 'Windows'
run: cargo clippy --lib --bins
- name: test (windows, everything)
if: runner.os == 'Windows'
run: cargo test --all-targets
- name: test (linux, portable targets)
if: runner.os != 'Windows'
run: cargo test --lib --bins
- run: cargo test --doc
msrv:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88.0
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-targets
- run: cargo test --all-targets