From d9231123a798c331f92ca65e515f2cf42c70260a Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Tue, 5 May 2026 21:18:00 +0800 Subject: [PATCH] ci: enforce STEP1A_REQUIRE_GPU=1 on Linux + add Mesa EGL deps --- .github/workflows/rust-check.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust-check.yml b/.github/workflows/rust-check.yml index a50666a37..55d56d61a 100644 --- a/.github/workflows/rust-check.yml +++ b/.github/workflows/rust-check.yml @@ -32,7 +32,7 @@ jobs: submodules: recursive - uses: dtolnay/rust-toolchain@stable with: - toolchain: "1.85" + toolchain: '1.85' components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 # Linux GL prerequisites for winit's x11+wayland feature link. @@ -44,10 +44,22 @@ jobs: sudo apt-get update sudo apt-get install -y \ libxkbcommon-dev libxkbcommon-x11-dev \ - libwayland-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev + libwayland-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \ + libegl1-mesa-dev libgles2-mesa-dev libgbm-dev mesa-utils \ + libfreetype-dev libfontconfig1-dev - run: cargo fmt --all -- --check - run: cargo build --workspace - - run: cargo test --workspace + # Step 1a ยง9.2: Linux GPU smoke must hard-fail on EGL/GL setup failure + # in CI (real Mesa software-rendered EGL pbuffer is available). Local + # dev runners (no GPU + no env var) skip with INCONCLUSIVE marker. + - name: Run tests (Linux with strict GPU gate) + if: runner.os == 'Linux' + env: + STEP1A_REQUIRE_GPU: '1' + run: cargo test --workspace + - name: Run tests (macOS / Windows) + if: runner.os != 'Linux' + run: cargo test --workspace - run: cargo clippy --workspace --all-targets -- -D warnings deny: @@ -58,6 +70,6 @@ jobs: with: submodules: recursive - uses: dtolnay/rust-toolchain@stable - - uses: EmbarkStudios/cargo-deny-action@v2 # auto-updates within v2.x; runner cargo at this stage carries cargo-deny 0.18+ which handles modern transitive manifests (Phase 1 Task 1.8 finding) + - uses: EmbarkStudios/cargo-deny-action@v2 # auto-updates within v2.x; runner cargo at this stage carries cargo-deny 0.18+ which handles modern transitive manifests (Phase 1 Task 1.8 finding) with: command: check