on: [push, pull_request]
name: Continuous integration
jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
strategy:
matrix:
features:
- sptr
- unstable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features --features=${{ matrix.features }} -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets --no-default-features --features=sptr,alloc -- -D warnings
test_stable:
name: test (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features=sptr
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --no-default-features --features=sptr,alloc
test_nightly:
name: test (nightly)
runs-on: ubuntu-latest
strategy:
matrix:
features:
- sptr
- unstable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features=${{ matrix.features }}