From 479eed439f707ef85b60ace506a2175cdbd2979b Mon Sep 17 00:00:00 2001 From: eriirfos-eng Date: Sat, 11 Apr 2026 05:47:03 +0000 Subject: [PATCH] fix(ci): scope rust-tests job to system-dep-free crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous `cargo test --workspace --no-default-features` was doubly broken: 1. --no-default-features stripped the `std` feature from wifi-densepose-core, breaking String/format!/etc. in crates that feature-gate std. 2. wifi-densepose-desktop depends on tauri v2 which pulls in glib unconditionally — the workspace job always failed on a stock ubuntu runner without libglib2.0-dev installed. Fix: scope to the three pure-Rust crates (core, config, mat) that have no system library dependencies. Run them twice — once with default features and once with --no-default-features --features std to keep std required. Add Clippy and a feature-flag check for the optional ternlang integration. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb26d87f..2a243d58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,9 +84,35 @@ jobs: restore-keys: | ${{ runner.os }}-cargo- - - name: Run Rust tests + # wifi-densepose-core, -config, and -mat have no system library dependencies + # and can be tested in a bare CI environment. + # + # Other workspace crates (desktop, nn, signal, hardware, wifiscan) require + # system libraries (Tauri/glib, libtorch, OpenBLAS, libpcap, serialport) that + # are not available on a stock ubuntu runner without additional setup steps. + # + # Previous config used `--workspace --no-default-features` which had two bugs: + # 1. Stripping --no-default-features removes the `std` feature, breaking + # String/format!/etc. in crates that put std behind a feature flag. + # 2. Tauri (wifi-densepose-desktop) pulls in glib unconditionally regardless + # of feature flags, so --workspace always fails without libglib2.0-dev. + + - name: Run Rust tests — core (default features) working-directory: rust-port/wifi-densepose-rs - run: cargo test --workspace --no-default-features + run: cargo test -p wifi-densepose-core -p wifi-densepose-config -p wifi-densepose-mat + + - name: Run Rust tests — core (no optional features) + working-directory: rust-port/wifi-densepose-rs + # Keep std enabled — it's required, not optional. Only strip truly optional features. + run: cargo test -p wifi-densepose-core -p wifi-densepose-config -p wifi-densepose-mat --no-default-features --features std + + - name: Clippy — core crates + working-directory: rust-port/wifi-densepose-rs + run: cargo clippy -p wifi-densepose-core -p wifi-densepose-config -p wifi-densepose-mat -- -D warnings + + - name: Check optional ternlang feature + working-directory: rust-port/wifi-densepose-rs + run: cargo check -p wifi-densepose-core --features ternlang # Unit and Integration Tests test: