From 370a319c3ddaea12d2f94d31be0bf29df27b389b Mon Sep 17 00:00:00 2001 From: dormouse-bot <287024035+dormouse-bot@users.noreply.github.com> Date: Fri, 21 Aug 2026 07:17:59 +0000 Subject: [PATCH 1/2] ci(standalone): run the crate's tests, and compile the platform-gated Rust --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa3c78c6..d084a679 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,6 +87,58 @@ jobs: run: npx tsc --noEmit working-directory: standalone - - name: Cargo check - run: cargo check + # `cargo test` rather than `cargo check`: the crate carries unit tests + # (path/session/sidecar resolution in lib.rs) that no job ran, so they + # compiled at most as `cargo check` and never executed. Building the test + # harness also links, which `check` does not. + - name: Cargo test + run: cargo test + working-directory: standalone/src-tauri + + standalone-platform-check: + # The job above runs on Linux only, so it compiles none of the crate's + # `#[cfg(windows)]` / `#[cfg(target_os = "macos")]` code — two whole modules + # (clipboard_win.rs, pe_subsystem.rs), the platform arms throughout lib.rs + # and build.rs, and the unit tests gated with them. Without this job their + # first compile is the Windows / macOS leg of release.yml, which runs only on + # a `v*` tag: a typo in Windows-only Rust surfaces as a failed release rather + # than as a failed PR. Deliberately a separate job from the smoketest above, + # so that job keeps its registered check name. + name: Standalone Platform Check (${{ matrix.platform }}) + strategy: + # Each platform's compile is independent; a Windows failure must not hide + # what macOS would have said. + fail-fast: false + matrix: + platform: [windows-latest, macos-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + # Same pin-driven setup as the smoketest above: build.rs fails unless the + # Node.js on PATH matches package.json's devEngines.runtime.version. + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version-file: package.json + + - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 + + - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable + + # Windows and macOS runners bill at a multiple of Linux, so the dependency + # compile is cached rather than paid on every PR. + - name: Rust cache + uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 + with: + workspaces: standalone/src-tauri + + - name: Install npm dependencies + run: pnpm install + working-directory: standalone + + # No TypeScript check here — it is platform-independent and the smoketest + # above already runs it. This job exists for the Rust the smoketest cannot + # see. + - name: Cargo test + run: cargo test working-directory: standalone/src-tauri From ce8a2e217186a44bc37cbd9df976d8b0d3c1c0a8 Mon Sep 17 00:00:00 2001 From: dormouse-bot <287024035+dormouse-bot@users.noreply.github.com> Date: Fri, 21 Aug 2026 07:28:39 +0000 Subject: [PATCH 2/2] ci(standalone): drop the platform job's unused npm install, cap its runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The platform-check job runs no npm script — the TypeScript check is deliberately left to the smoketest — and the Rust build never reads node_modules: build.rs resolves Node from PATH (`node -p process.execPath`) and reads the version pin straight out of the root package.json. So `pnpm install` and the pnpm setup it needs cost 16s (macOS) and 48s (Windows) per PR for nothing. Also cap the job at 20 minutes. Cold-cache runs are ~2min on macOS and ~5min on Windows, so a hung compile riding the 6-hour default is pure premium-runner burn. --- .github/workflows/ci.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d084a679..a5583993 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,6 +112,11 @@ jobs: matrix: platform: [windows-latest, macos-latest] runs-on: ${{ matrix.platform }} + + # A hung compile on a premium-billed runner must not ride the 6-hour job + # default. Cold-cache runs land at ~2min (macOS) and ~5min (Windows). + timeout-minutes: 20 + steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -121,8 +126,6 @@ jobs: with: node-version-file: package.json - - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 - - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable # Windows and macOS runners bill at a multiple of Linux, so the dependency @@ -132,13 +135,12 @@ jobs: with: workspaces: standalone/src-tauri - - name: Install npm dependencies - run: pnpm install - working-directory: standalone - - # No TypeScript check here — it is platform-independent and the smoketest - # above already runs it. This job exists for the Rust the smoketest cannot - # see. + # No pnpm install and no TypeScript check here. The TS check is + # platform-independent and the smoketest above already runs it; and the Rust + # build never reads node_modules — build.rs needs only `node` on PATH (it + # resolves the binary with `node -p process.execPath`) plus the root + # package.json version pin. This job exists for the Rust the smoketest + # cannot see. - name: Cargo test run: cargo test working-directory: standalone/src-tauri