Run cargo doc in CI
#193
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ~/.cargo/.crates.toml | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install latest nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: nightly | |
| targets: thumbv7m-none-eabi | |
| components: rustfmt, clippy | |
| - run: cargo install cargo-readme | |
| - run: cargo fmt --check | |
| - run: cargo test | |
| - name: cargo build no_std | |
| run: cargo build --target thumbv7m-none-eabi --no-default-features | |
| - run: cargo clippy --all-features | |
| - run: cargo doc --all-features | |
| - name: Ensure README.md is updated | |
| run: '[ "$(< README.md)" = "$(cargo readme)" ]' |