From 75bab70861aa290e9937ba8032a925979fbe1288 Mon Sep 17 00:00:00 2001 From: Orrin Frazier <51936997+orrinfrazier@users.noreply.github.com> Date: Sun, 24 May 2026 18:09:32 -0400 Subject: [PATCH] chore(ci): test-gate release builds with clippy + cargo test release.yml built release binaries via `cargo build --release --package cuprated` with no test or clippy step, so the exact release commit+toolchain was never test-gated (only `main` CI and a manual checklist covered it). Add Clippy + Test steps before Build in the release job, mirroring ci.yml: clippy component, Windows cmake (randomx-rs), monerod download, and CMD_CLIPPY/CMD_TEST + RUST_BACKTRACE/RUST_MIN_STACK env. Steps run per-OS in the matrix so each binary is gated on its own OS+toolchain, and a lint/test failure fails the job before any binary is built or uploaded. Resolves issues/S06-2-release-test-gate.md --- .github/workflows/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08ecfeecf..f5e9bd932 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,13 @@ on: env: # Show colored output in CI. CARGO_TERM_COLOR: always + # Show full panics. + RUST_BACKTRACE: "full" + # Increase thread stack size to 8 megabytes. + RUST_MIN_STACK: 8000000 + # Build commands. + CMD_CLIPPY: cargo clippy --all-features --all-targets -- -D warnings + CMD_TEST: cargo test --all-features # The folder used to store release files - this will be uploaded. ARCHIVE: "__ARCHIVE" @@ -42,6 +49,20 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: stable + components: clippy + + - name: Install dependencies (Windows) + if: matrix.os == 'windows-2022' + uses: lukka/get-cmake@v3.31.6 # Needed for `randomx-rs` + + - name: Download monerod + uses: ./.github/actions/monerod-download + + - name: Clippy (fail on warnings) + run: ${{ env.CMD_CLIPPY }} + + - name: Test + run: ${{ env.CMD_TEST }} - name: Build run: cargo build --release --package cuprated