name: Build and test
on:
push:
branches:
- main
tags:
- v*
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install toolchain no-std
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv6m-none-eabi
override: true
- name: Install rustfmt
run: rustup component add rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --verbose -- --check
- name: Build no-std
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --target thumbv6m-none-eabi --no-default-features
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
- name: Docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps