Skip to content

Add cargo check workflow for embedded targets #6

Add cargo check workflow for embedded targets

Add cargo check workflow for embedded targets #6

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [ main ]
env:
RUSTFLAGS: -Dwarnings
jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
- 1.64.0
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Run cargo check
run: cargo check --all-features
check-no-std:
name: Check (no-std)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- armv7-unknown-linux-gnueabihf
- thumbv7em-none-eabihf
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Run cargo check
run: cargo check --target ${{ matrix.target }} --no-default-features
test:
name: Test suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run cargo test
run: cargo test --all-features
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --all-features
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Run cargo doc
run: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps --document-private-items --all-features