From a79f183b6d5f54ac095a13e0d190d0021717090a Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 26 May 2026 10:28:58 +0100 Subject: [PATCH] ci(rust): convert rust-ci.yml to thin wrapper (standards#174) Replaces the per-repo `rust-ci.yml` copy with a 5-line wrapper invoking the shared reusable workflow in `hyperpolymath/standards` (PR #174). Pinned to PR #174's HEAD SHA `4fdf4314b4ab54269adbaff10e30e483b5e86845`; will resolve to standards/main once #174 merges. Estate audit found ~87 rust-ci.yml copies across the estate; this is one of them. The reusable provides identical cargo check/clippy/fmt/test behaviour with opt-in `enable_audit` + `enable_coverage` inputs. Pattern precedent: standards#168 (governance-reusable) + downstream wrappers absolute-zero#41 + tma-mark2#41. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/rust-ci.yml | 68 ++++------------------------------- 1 file changed, 6 insertions(+), 62 deletions(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 94879a9..2de97c0 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -1,73 +1,17 @@ # SPDX-License-Identifier: MPL-2.0 +# Rust CI — thin wrapper calling the shared estate reusable in +# hyperpolymath/standards. Configure once, propagate everywhere. +# See: docs/CI-REUSABLE-WORKFLOWS.adoc in standards. name: Rust CI on: push: - branches: [ main ] + branches: [main, master] pull_request: - branches: [ main ] permissions: contents: read jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable - with: - toolchain: stable - components: rustfmt, clippy - - - name: Cache cargo registry - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2 - - - name: Check formatting - run: cargo fmt -- --check - - - name: Run clippy - run: cargo clippy --all-targets --all-features -- -D warnings - - - name: Build - run: cargo build --verbose - - - name: Run tests - run: cargo test --verbose - - - name: Build release - run: cargo build --release --verbose - - - name: Check for warnings - run: | - OUTPUT=$(cargo build --release 2>&1) - if echo "$OUTPUT" | grep -i "warning"; then - echo "❌ Build produced warnings:" - echo "$OUTPUT" | grep -i "warning" - exit 1 - fi - echo "✅ Zero warnings" - - msrv: - name: Check MSRV (1.85.0) - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - - name: Install Rust 1.85.0 - uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable - with: - toolchain: 1.85.0 - - - name: Cache cargo registry - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2 - - - name: Check build - # NB: the `gui` feature pulls eframe/egui which raise MSRV above 1.85. - # Verify the default + non-GUI optional features compile on MSRV. - run: cargo check --features signing,http + rust-ci: + uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@4fdf4314b4ab54269adbaff10e30e483b5e86845