Skip to content

Fix min-versions; add min-version CI check #66

Fix min-versions; add min-version CI check

Fix min-versions; add min-version CI check #66

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# Ensure Rust code formatting is consistent across all source code.
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup component add rustfmt
- name: Check library formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --verbose --all -- --check
# For each chip, build and lint the main library
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
target: thumbv7em-none-eabihf
override: true
profile: minimal
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --verbose --all-features --target thumbv7em-none-eabihf -- -D warnings
name: Lint the library
# Run unit and documentation tests for a chip
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run unit and documentation tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
# Check if dependency versions in Cargo.toml are updated correctly
min-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: thumbv7em-none-eabihf
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Install cargo-minimal-versions
uses: taiki-e/install-action@cargo-minimal-versions
- name: Check with minimal versions
run: cargo minimal-versions check
- name: Run tests with minimal versions
run: cargo minimal-versions test
# Make sure documentation builds, and doclinks are valid
doc:
env:
RUSTDOCFLAGS: -D warnings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check documentation and doclinks
uses: actions-rs/cargo@v1
with:
command: rustdoc