name: CI
on: [push, pull_request]
jobs:
ci:
name: CI
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: [stable, nightly]
os: [ubuntu-latest, windows-latest]
target: [thumbv7em-none-eabihf]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache target
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: clippy
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Build lib
uses: actions-rs/cargo@v1
with:
command: build
args: --lib
- name: Build examples
uses: actions-rs/cargo@v1
with:
command: build
args: --examples --target ${{ matrix.target }}
- name: Test Library
uses: actions-rs/cargo@v1
with:
command: test
args: --lib -- --test-threads=1
- name: Test Documentation
uses: actions-rs/cargo@v1
with:
command: test
args: --doc
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --lib --examples --target ${{ matrix.target }}
- name: Doc Generation
uses: actions-rs/cargo@v1
with:
command: doc