@@ -10,10 +10,6 @@ permissions:
1010env :
1111 CARGO_TERM_COLOR : always
1212
13- # ── Shared setup anchors ─────────────────────────────────────────────
14- # Reused across jobs via composite actions would be ideal, but YAML
15- # anchors keep it DRY within a single file.
16-
1713jobs :
1814 # ── Phase 1: Lint (fast, fail-fast) ────────────────────────────────
1915 lint :
4844 cargo install --locked cargo-deny || true
4945 cargo deny check
5046
51- # ── Phase 2: Test (parallel with build) ────────────────────────────
47+ # ── Phase 2: Test (Ubuntu) ───────────── ────────────────────────────
5248 test :
5349 name : Test
5450 runs-on : ubuntu-latest
@@ -70,25 +66,21 @@ jobs:
7066 - name : Test
7167 run : cargo test --workspace
7268
73- # ── Phase 2: Build (matrix: Linux, Windows, macOS) ──────────────────
69+ # ── Phase 2: Build (Linux + macOS matrix) ──────── ──────────────────
7470 build :
7571 name : Build (${{ matrix.os }})
7672 runs-on : ${{ matrix.os }}
7773 needs : lint
7874 strategy :
7975 matrix :
80- os : [ubuntu-latest, windows-latest, macos-latest]
76+ os : [ubuntu-latest, macos-latest]
8177 steps :
8278 - uses : actions/checkout@v4
8379
8480 - name : Install protoc (Linux)
8581 if : runner.os == 'Linux'
8682 run : sudo apt-get update -qq && sudo apt-get install -y -qq protobuf-compiler
8783
88- - name : Install protoc (Windows)
89- if : runner.os == 'Windows'
90- run : choco install protoc -y
91-
9284 - name : Install protoc (macOS)
9385 if : runner.os == 'macOS'
9486 run : brew install protobuf
@@ -123,9 +115,9 @@ jobs:
123115 - name : Build docs
124116 run : pnpm --filter @webui/docs build
125117
126- # ── Phase 2: E2E ( Windows only — screenshots match dev baselines) ──
127- e2e :
128- name : E2E Tests
118+ # ── Phase 2: Build Windows ─────────────────────────────────────── ──
119+ build-windows :
120+ name : Build (Windows)
129121 runs-on : windows-latest
130122 needs : lint
131123 steps :
@@ -158,16 +150,54 @@ jobs:
158150 - name : Build workspace
159151 run : cargo build --workspace --exclude xtask
160152
161- - name : Build example client bundles
153+ - name : Build examples
162154 run : cargo xtask build-examples
163155
156+ - name : Build docs
157+ run : pnpm --filter @webui/docs build
158+
159+ # ── Phase 3: E2E (after Windows build — reuses Rust cache) ─────────
160+ e2e :
161+ name : E2E Tests
162+ runs-on : windows-latest
163+ needs : build-windows
164+ steps :
165+ - uses : actions/checkout@v4
166+
167+ - name : Install protoc
168+ run : choco install protoc -y
169+
170+ - name : Setup Rust
171+ uses : dtolnay/rust-toolchain@stable
172+ with :
173+ toolchain : 1.93
174+
175+ - name : Rust Cache
176+ uses : Swatinem/rust-cache@v2
177+
178+ - name : Setup Node.js
179+ uses : actions/setup-node@v4
180+ with :
181+ node-version : ' 22'
182+
183+ - name : Setup pnpm
184+ uses : pnpm/action-setup@v4
185+ with :
186+ run_install : false
187+
188+ - name : Install dependencies
189+ run : pnpm install
190+
191+ - name : Build workspace
192+ run : cargo build --workspace --exclude xtask
193+
164194 - name : Install Playwright browsers
165195 run : npx playwright install chromium
166196
167197 - name : Run E2E tests
168198 run : cargo xtask e2e
169199
170- # ── Phase 2: WASM (parallel with test and build) ───────────────────
200+ # ── Phase 2: WASM (Ubuntu) ────────────────────── ───────────────────
171201 wasm :
172202 name : WASM
173203 runs-on : ubuntu-latest
0 commit comments