diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b4b41b..c3ebea1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,3 +173,65 @@ jobs: - name: Cargo build --release (verifies the binary links) working-directory: src-tauri run: cargo build --release + + cross-platform: + name: Cross-platform (${{ matrix.label }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 45 + # Compile + link the Tauri binary against each platform's webview so a + # macOS-only Tauri API (like the title_bar_style / RunEvent::Opened blockers + # PR #197 fixed) can't silently regress cross-platform builds on main. + # Promoted from the retired cross-platform-spike.yml — see + # docs/CROSS-PLATFORM-HARDENING.md item 9. Compile/link-only by design; + # bundling + signing stay out of CI (tracked as P2 in that doc). + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + label: Linux + - os: windows-latest + label: Windows + steps: + - uses: actions/checkout@v6 + + - uses: pnpm/action-setup@v6 + with: + version: 10 + + - uses: actions/setup-node@v6 + with: + node-version: 22 + cache: pnpm + + # Linux WebKitGTK toolchain (Tauri v2 → webkit2gtk-4.1). Windows ships + # WebView2 with the runner image, so no system deps there. + - name: Install Linux system deps + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.1-dev \ + libappindicator3-dev \ + librsvg2-dev \ + patchelf \ + libxdo-dev \ + libssl-dev + + - uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo registry + target + uses: Swatinem/rust-cache@v2 + with: + workspaces: src-tauri + + - name: Install frontend deps + run: pnpm install --frozen-lockfile + + # `--no-bundle` compiles + links the binary against the platform webview + # (WebView2 / WebKitGTK) without producing installers, so the macOS-only + # bundle targets in tauri.conf.json are never exercised. `--debug` skips + # release LTO so the job finishes in CI-friendly time while still proving + # the link step. + - name: tauri build (compile + link only) + run: pnpm tauri build --debug --no-bundle diff --git a/.github/workflows/cross-platform-spike.yml b/.github/workflows/cross-platform-spike.yml deleted file mode 100644 index 3977c0c..0000000 --- a/.github/workflows/cross-platform-spike.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Cross-platform spike - -# GTM-SCALE-PLAN.md §3 (unlock 2) / §10 item 7. -# Validates that Markup *compiles and links* the webview on Windows + Linux — -# the gating question for the "go cross-platform" bet. This is a SPIKE, not a -# release pipeline: it builds the binary with `--no-bundle` (no installers, no -# signing) and does NOT touch the macOS release flow. Rendering/IME/file-watch -# behaviour still needs manual testing on real machines — those go into the -# "cross-platform hardening" to-do, not here. -# -# Triggers: manual (workflow_dispatch) + push to spike/** so the branch self-tests. - -on: - workflow_dispatch: {} - push: - branches: ["spike/**"] - -permissions: - contents: read - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - name: tauri build (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - timeout-minutes: 45 - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - steps: - - uses: actions/checkout@v6 - - - uses: pnpm/action-setup@v6 - with: - version: 10 - - - uses: actions/setup-node@v6 - with: - node-version: 22 - cache: pnpm - - # Linux WebKitGTK toolchain (Tauri v2 → webkit2gtk-4.1). Windows ships - # WebView2 with the runner image, so no system deps there. - - name: Install Linux system deps - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y \ - libwebkit2gtk-4.1-dev \ - libappindicator3-dev \ - librsvg2-dev \ - patchelf \ - libxdo-dev \ - libssl-dev - - - uses: dtolnay/rust-toolchain@stable - - - name: Cache cargo registry + target - uses: Swatinem/rust-cache@v2 - with: - workspaces: src-tauri - - - name: Install frontend deps - run: pnpm install --frozen-lockfile - - # `--no-bundle` compiles + links the binary against the platform webview - # (WebView2 / WebKitGTK) without producing installers — the macOS-only - # bundle targets in tauri.conf.json are therefore never exercised. - # `--debug` skips release LTO so the spike finishes in CI-friendly time - # while still proving the link step. - - name: tauri build (compile + link only) - run: pnpm tauri build --debug --no-bundle diff --git a/docs/CROSS-PLATFORM-HARDENING.md b/docs/CROSS-PLATFORM-HARDENING.md index a776fc0..e029030 100644 --- a/docs/CROSS-PLATFORM-HARDENING.md +++ b/docs/CROSS-PLATFORM-HARDENING.md @@ -1,8 +1,10 @@ # Cross-platform hardening to-do (Windows + Linux) > Output of the GTM-SCALE-PLAN.md §3 (unlock 2) / §10 item 7 **spike**. -> The spike workflow ([`.github/workflows/cross-platform-spike.yml`](../.github/workflows/cross-platform-spike.yml)) -> runs `tauri build --no-bundle` on `ubuntu-latest` + `windows-latest`. +> The cross-platform compile/link check (`tauri build --no-bundle` on +> `ubuntu-latest` + `windows-latest`) now runs in CI as the `cross-platform` +> matrix job in [`ci.yml`](../.github/workflows/ci.yml) — see item 9. (It began +> as the standalone `cross-platform-spike.yml`, now retired.) > This file enumerates what the spike found and what's left before a real > Win/Linux beta (GTM §5 P1). > @@ -71,9 +73,16 @@ Ordered by user-visible impact. ### P4 — CI & process -9. **Promote the spike into real CI** once green: add Win/Linux to the matrix in - `ci.yml` (build + Rust tests), and a bundling smoke. Retire - `cross-platform-spike.yml` or fold it in. +9. **✅ Promote the spike into real CI** — *done.* The Win/Linux + `tauri build --debug --no-bundle` compile/link check now runs on every + `pull_request` (and push to `main`) as the `cross-platform` matrix job in + [`ci.yml`](../.github/workflows/ci.yml), and `cross-platform-spike.yml` has + been retired (folded in). The checks **`Cross-platform (Linux)`** and + **`Cross-platform (Windows)`** are required for merge in `main`'s branch + protection, so a macOS-only Tauri API can't silently regress cross-platform + builds again. Kept **compile/link-only** — Rust tests on Win/Linux and a + bundling smoke are deliberately out of scope (bundling is P2 item 3) to keep + CI time reasonable. 10. **Maintenance load**: GTM §9 risk — staff the matrix and lean on the contributor community so cross-platform doesn't rot. diff --git a/docs/marketing/alternativeto-entry.md b/docs/marketing/alternativeto-entry.md index 04f1df1..72d2483 100644 --- a/docs/marketing/alternativeto-entry.md +++ b/docs/marketing/alternativeto-entry.md @@ -65,5 +65,7 @@ Tag Markup as an alternative to: - Honest framing: on macOS, Tauri renders via the system WebView (WKWebView) — it's native, not Electron. Say "native (Tauri/Rust)", don't claim "no webview". - Add a screenshot or two from `marketing/MarkupScreenshots-mac/` during submission. -- Re-list platforms to include Windows/Linux the day those builds ship — the - cross-platform spike (`.github/workflows/cross-platform-spike.yml`) is the gate. +- Re-list platforms to include Windows/Linux the day those builds ship — CI + already compile-checks both (`cross-platform` job in + `.github/workflows/ci.yml`); the remaining bundling/signing gates are tracked + in `docs/CROSS-PLATFORM-HARDENING.md`.