name: CI
on:
push:
branches: ['main', 'v*.x']
pull_request:
branches: ['main', 'v*.x']
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
jobs:
ci-msrv:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.56.1
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: build
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --cfg loom -Dwarnings
LOOM_MAX_PREEMPTIONS: 2
SCOPE: ${{ matrix.scope }}
with:
command: test
args: --lib --release -- --nocapture $SCOPE
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy