Skip to content

CI

CI #404

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
- cron: '0 1 * * *'
env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -Dwarnings
RUST_BACKTRACE: 1
defaults:
run:
shell: bash
jobs:
test:
name: cargo +nightly build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest nightly
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
targets: thumbv7m-none-eabi
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo test
- run: cargo clippy --all-features
- run: cargo doc --all-features
# Ensure that the library doesn't depend on std/alloc. A binary
# that depends on the library is used for this (instead of
# directly build the library), otherwise accidentally depending on
# `alloc` would not result in an error.
- name: cargo build no_std
run: cargo build --target thumbv7m-none-eabi --no-default-features
working-directory: ci/ensure_no_std
- run: cargo install cargo-readme
- name: Ensure README.md is up-to-date
run: '[ "$(< README.md)" = "$(cargo readme)" ]'