name: CI
on: [push]
env:
RUST_BACKTRACE: 1
jobs:
check:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [ stable, nightly ]
use_std: [ std, nostd ]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
name: Toolchain setup
if: ${{ matrix.use_std == 'std' }}
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions-rs/cargo@v1
name: Test
if: ${{ matrix.use_std == 'std' }}
with:
command: test
args: --features=std
- uses: actions-rs/toolchain@v1
name: Toolchain setup
if: ${{ matrix.use_std == 'nostd' }}
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: thumbv6m-none-eabi
override: true
- uses: actions-rs/cargo@v1
name: Check (nostd)
if: ${{ matrix.use_std == 'nostd' }}
with:
command: check
args: --target thumbv6m-none-eabi
doc-check:
name: Doc check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Toolchain setup
with:
profile: minimal
toolchain: stable
- uses: actions-rs/install@v0.1
name: Install cargo-deadlinks
with:
crate: cargo-deadlinks
version: 0.8.0
- name: Run cargo-deadlinks
run: cargo deadlinks