name: ci
on:
push:
branches: [master]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { toolchain: stable, name: check }
- { toolchain: stable, name: check, features: --all-features }
- { toolchain: "1.88", name: check, features: --all-features } - { toolchain: nightly, name: check, features: --all-features }
- { toolchain: stable, name: check, features: --benches }
- { toolchain: stable, name: fmt }
- { toolchain: stable, name: clippy, features: --all-targets --all-features }
- { toolchain: stable, name: test }
- { toolchain: stable, name: test, features: --all-features }
- { toolchain: stable, name: test, features: --doc --all-features }
steps:
- uses: actions/checkout@v7
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2.9.2
- name: ${{ matrix.name }} (${{ matrix.toolchain }} ${{ matrix.features }})
run: |
cargo ${{ matrix.name }} ${{ matrix.features }} \
$([ '${{ matrix.name }}' = clippy ] && echo -- -D warnings) \
$([ '${{ matrix.name }}' = fmt ] && echo -- --check)