From 59adebf14b63bef377cbdd830e5d21ce855b7435 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 22 Jul 2025 09:56:00 +0200 Subject: [PATCH] add CI --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c474487 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +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 --features vor4x + - run: cargo check --target thumbv6m-none-eabi --features vor1x + + 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 + with: + targets: "thumbv7em-none-eabihf, thumbv6m-none-eabi" + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv7em-none-eabihf --features vor4x + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --target thumbv6m-none-eabi --features vor1x + + 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 --features vor4x -- -D warnings + - run: cargo clippy --target thumbv6m-none-eabi --features vor1x -- -D warnings