From 1cf250e22d8ece8de6a5923b23ea20ae1c366713 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Tue, 23 Jan 2024 00:59:03 +0200 Subject: [PATCH] fix: ci workflow and add docs build Signed-off-by: Lachezar Lechev --- .github/workflows/ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e476ed..3ed95fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,13 +17,16 @@ jobs: submodules: true - uses: dtolnay/rust-toolchain@nightly with: - components: rustfmt, clippy + components: rustfmt, clippy, rust-docs - name: Rustfmt lints run: cargo fmt --all -- --check - name: Clippy lints run: cargo clippy --no-deps -- -D warnings + + - name: Build docs + run: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps build-and-test: name: Build and test @@ -39,18 +42,15 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - - if: ${{ matrix.rust }} != '1.65' - run: cargo build --all-features - - if: ${{ matrix.rust }} != '1.65' - run: cargo test --all-features - # embedded-hal-async has MSRV of 1.75, this is why we exclude `asynch` feature - - if: ${{ matrix.rust }} == '1.65' - run: cargo build -F defmt-03 -F serde -F config-builder - - if: ${{ matrix.rust }} == '1.65' - run: cargo test -F defmt-03 -F serde -F config-builder - + - if: ${{ matrix.rust }} != '1.65' + run: cargo build --all-features + - if: ${{ matrix.rust }} != '1.65' + run: cargo test --all-features + # embedded-hal-async has MSRV of 1.75, this is why we exclude `asynch` feature + - if: ${{ matrix.rust }} == '1.65' + run: cargo build -F defmt-03 -F serde -F config-builder + - if: ${{ matrix.rust }} == '1.65' + run: cargo test -F defmt-03 -F serde -F config-builder