From 53b8b6e28265a6d9bdf9e2aa62ac2a357cce283a Mon Sep 17 00:00:00 2001 From: kingchenc Date: Fri, 22 May 2026 12:37:15 +0200 Subject: [PATCH] E2: add an MSRV verification job to CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every CI job used dtolnay/rust-toolchain on stable, so the declared minimum supported Rust version was never exercised — an accidental use of a newer API would only break for downstream users on an older compiler. Add an `msrv` job with a two-row matrix: the workspace crates (wickra-core, wickra, wickra-data) build and test on Rust 1.75, and the node binding on Rust 1.77, matching the rust-version each manifest declares. Both rows use the SHA-pinned toolchain action. --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 266f9257..14c9c0b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,40 @@ jobs: cargo build -p wickra --example backtest cargo build -p wickra-data --example live_binance --features live-binance + # Verify the crates still build and test on their declared minimum supported + # Rust version. The workspace pins rust-version = "1.75"; bindings/node needs + # 1.77 because napi-build emits `cargo::` directives. Without this job an + # accidental use of a newer API would only surface for downstream users. + msrv: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - name: MSRV workspace (Rust 1.75) + toolchain: "1.75" + packages: "-p wickra-core -p wickra -p wickra-data" + - name: MSRV node binding (Rust 1.77) + toolchain: "1.77" + packages: "-p wickra-node" + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + + - name: Install Rust ${{ matrix.toolchain }} + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable branch, 2026-03-27 + with: + toolchain: ${{ matrix.toolchain }} + + - name: Cache cargo + uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + + - name: Build on MSRV + run: cargo build ${{ matrix.packages }} --verbose + + - name: Test on MSRV + run: cargo test ${{ matrix.packages }} --verbose + python: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }}