From c39694e3cc1be261233c239ebe28543b74566d10 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 14 Feb 2025 16:39:28 +0100 Subject: [PATCH] update CI --- va416xx/.github/workflows/ci.yml | 76 ++++++++++++-------------------- 1 file changed, 28 insertions(+), 48 deletions(-) diff --git a/va416xx/.github/workflows/ci.yml b/va416xx/.github/workflows/ci.yml index 63cf53c..1afe688 100644 --- a/va416xx/.github/workflows/ci.yml +++ b/va416xx/.github/workflows/ci.yml @@ -1,64 +1,44 @@ -on: [push] - -name: build +name: ci +on: [push, pull_request] jobs: check: - name: Check + name: Check build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - target: thumbv7em-none-eabihf - override: true - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: check - args: --target thumbv7em-none-eabihf + targets: "thumbv7em-none-eabihf" + - run: cargo check --target thumbv7em-none-eabihf + - run: cargo check --target thumbv7em-none-eabihf --examples + - run: cargo check -p va416xx --target thumbv7em-none-eabihf --all-features + - run: cargo check -p va416xx-hal --target thumbv7em-none-eabihf --features "defmt" fmt: - name: Rustfmt + name: Check formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - 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 -p va416xx --all-features + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx-hal --features "defmt va41630" + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-peb1 clippy: name: Clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - target: thumbv7em-none-eabihf - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: clippy - args: --target thumbv7em-none-eabihf -- -D warnings - - ci: - if: ${{ success() }} - # all new jobs must be added to this list - needs: [check, fmt, clippy] - runs-on: ubuntu-latest - steps: - - name: CI succeeded - run: exit 0 \ No newline at end of file + targets: "thumbv7em-none-eabihf" + - run: cargo clippy --target thumbv7em-none-eabihf -- -D warnings