name: CI
on:
pull_request:
paths-ignore:
- README.md
push:
branches:
- master
- "*"
paths-ignore:
- README.md
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
override: true
profile: minimal
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- run: cargo test --tests
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: miri
override: true
profile: minimal
- run: cargo miri test
loom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- run: cargo test --test loom --profile loomtest -- --nocapture
env:
RUSTFLAGS: "--cfg loom"
RUST_BACKTRACE: "full"
build-stable:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- run: cargo build
- run: cargo build --release
build-nightly:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
- run: cargo build --features nightly
- run: cargo build --release --features nightly