From 8b2d7f158bd0ffe08636bfdc40f5a613c39c722d Mon Sep 17 00:00:00 2001 From: Finomnis Date: Sat, 2 Nov 2024 00:29:24 +0100 Subject: [PATCH] Fix examples not building in CI (#90) --- .github/workflows/ci.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b85318..22ab910 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,23 @@ jobs: uses: taiki-e/install-action@cross - name: Build - run: cross build --all-features --all-targets --release --target=${{ matrix.target }} + run: cross build --all-features --release --target=${{ matrix.target }} + + build-examples: + name: Build Examples + runs-on: ubuntu-latest + needs: [lints, docs] + env: + RUSTFLAGS: "-D warnings" + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Build + run: cargo build --examples --all-features --release test: name: Test Suite @@ -45,8 +61,6 @@ jobs: - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable - #- uses: Swatinem/rust-cache@v1 - - name: Run cargo test run: cargo test -- --test-threads 1 @@ -66,8 +80,6 @@ jobs: - name: Install cargo-msrv run: cargo binstall --version 0.16.0-beta.17 --no-confirm cargo-msrv - #- uses: Swatinem/rust-cache@v1 - - name: Check MSRV run: cargo msrv verify --log-target=stdout --output-format=json @@ -185,8 +197,6 @@ jobs: - name: Install nightly toolchain uses: dtolnay/rust-toolchain@nightly - #- uses: Swatinem/rust-cache@v1 - - name: Build env: RUSTFLAGS: "-Z sanitizer=address" @@ -205,7 +215,7 @@ jobs: runs-on: ubuntu-latest environment: production if: github.event_name == 'release' - needs: [build, test, msrv, lints, docs, leaks, semver, min-versions, min-versions-msrv] + needs: [build, build-examples, test, msrv, lints, docs, leaks, semver, min-versions, min-versions-msrv] steps: - name: Checkout sources uses: actions/checkout@v4