Merge pull request 'add ci' (#4) from add-ci into main
Some checks failed
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled

Reviewed-on: rust/vorago-shared-periphs#4
This commit was merged in pull request #4.
This commit is contained in:
2025-07-22 09:56:24 +02:00

42
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: ci
on: [push, pull_request]
jobs:
check:
name: Check build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "thumbv7em-none-eabihf, thumbv6m-none-eabi"
- run: cargo check --target thumbv7em-none-eabihf
- run: cargo check --target thumbv6m-none-eabi
fmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --all -- --check
docs:
name: Check Documentation Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv6m-none-eabi --features vor1x
- run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv7em-none-eabihf --features vor4x
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "thumbv7em-none-eabihf, thumbv6m-none-eabi"
- run: cargo clippy --target thumbv7em-none-eabihf -- -D warnings
- run: cargo clippy --target thumbv6m-none-eabi -- -D warnings