name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
jobs:
build:
strategy:
matrix:
cmd:
- cargo build --all-targets --verbose
- cargo build --all-targets --verbose --release
- cargo test --verbose
- cargo test --verbose --release
- cargo clippy --all-targets --verbose
- cargo doc --no-deps --document-private-items --verbose
- cargo fmt --check
runs-on: ubuntu-latest
permissions: {}
timeout-minutes: 15
name: ${{ matrix.cmd }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 - run: ${{ matrix.cmd }}