2121 PLAYWRIGHT_BROWSERS_PATH : ${{ github.workspace }}/.cache/ms-playwright
2222
2323jobs :
24- desktop-core :
25- name : Desktop Core
24+ # Biome, node:test, and the Vite build do not compile Rust, but node:test
25+ # also pins desktop constants to relay/DB crate sources (for example
26+ # relayReconnectReplay.test.mjs), so Rust changes select this job too.
27+ desktop-js :
28+ name : Desktop JS
2629 runs-on : ubuntu-latest
27- # The compiled-flag verification step rebuilds the workspace for each
28- # BUZZ_BUILD_* state and runs the full suite under all three compile
29- # states; the complete recipe needs ~46m, so budget 60m.
30- timeout-minutes : 60
31- if : github.event_name == 'push' || inputs.desktop || inputs.desktop_rust || inputs.rust
30+ timeout-minutes : 20
31+ # Keep in sync with JS_SELECTED in the Desktop gate (pinned by ci-required-gates.test.mjs).
32+ if : github.event_name == 'push' || inputs.desktop || inputs.rust
3233 permissions :
3334 contents : read
3435 steps :
3536 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3637 with :
3738 fetch-depth : 2
3839 - uses : cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
39- - uses : rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
40- - uses : Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
41- with :
42- workspaces : desktop/src-tauri
43- save-if : ${{ github.event_name != 'pull_request' }}
44- - name : Install Tauri dependencies (Linux)
45- env :
46- DEBIAN_FRONTEND : noninteractive
47- run : |
48- sudo apt-get update \
49- -o Acquire::Retries=3 \
50- -o Acquire::http::Timeout=30 \
51- -o Acquire::https::Timeout=30
52- sudo apt-get install -y --no-install-recommends \
53- -o Acquire::Retries=3 \
54- -o Acquire::http::Timeout=30 \
55- -o Acquire::https::Timeout=30 \
56- -o DPkg::Lock::Timeout=120 \
57- build-essential \
58- curl \
59- file \
60- libasound2-dev \
61- libayatana-appindicator3-dev \
62- libgtk-3-dev \
63- librsvg2-dev \
64- libssl-dev \
65- libwebkit2gtk-4.1-dev \
66- libxdo-dev \
67- patchelf \
68- wget
6940 - name : Get pnpm store directory
7041 id : pnpm-cache
7142 run : echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
@@ -83,51 +54,92 @@ jobs:
8354 run : just desktop-test
8455 - name : Desktop build
8556 run : just desktop-build
86- - name : Desktop Tauri clippy
87- run : just desktop-tauri-clippy
88- env :
89- CMAKE_POLICY_VERSION_MINIMUM : " 3.5"
90- - name : Desktop Tauri check
91- run : just desktop-tauri-check
92- env :
93- CMAKE_POLICY_VERSION_MINIMUM : " 3.5"
94- - name : Desktop Tauri tests
95- run : just desktop-tauri-test
96- env :
97- CMAKE_POLICY_VERSION_MINIMUM : " 3.5"
98- - name : Desktop Mesh feature tests
99- run : cargo test --manifest-path desktop/src-tauri/Cargo.toml --features mesh-llm --lib
100- env :
101- CMAKE_POLICY_VERSION_MINIMUM : " 3.5"
102- - name : Desktop Tauri compiled-flag verification
103- run : just desktop-tauri-test-compiled-flags
104- env :
105- CMAKE_POLICY_VERSION_MINIMUM : " 3.5"
106- - name : Upload desktop e2e artifacts
107- if : failure()
108- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
109- with :
110- name : desktop-e2e-artifacts
111- path : |
112- desktop/playwright-report
113- desktop/test-results
114- if-no-files-found : ignore
11557 - name : Save pnpm store cache
11658 if : github.event_name == 'push'
11759 uses : actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
11860 with :
11961 path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
12062 key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
12163
64+ # Tauri Rust lanes run in parallel. The compiled-flags lane only rebuilds
65+ # buzz_lib under other BUZZ_BUILD_* values, so it restores the core lane's
66+ # cache read-only; the mesh-llm feature pulls its own dependency graph.
67+ desktop-tauri :
68+ name : Desktop Tauri (${{ matrix.lane }})
69+ runs-on : ubuntu-latest
70+ # A lane needs up to ~15m. ci-apt-retry.sh bounds the apt step at ~34m worst
71+ # case (update ~8.5m + install ~25m); 55m fits both, so a degraded mirror
72+ # fails with the wrapper's error instead of the job timeout.
73+ timeout-minutes : 55
74+ # Keep in sync with RUST_SELECTED in the Desktop gate (pinned by ci-required-gates.test.mjs).
75+ if : github.event_name == 'push' || inputs.desktop_rust || inputs.rust
76+ strategy :
77+ fail-fast : false
78+ matrix :
79+ include :
80+ - lane : core
81+ cache : desktop-core
82+ save-cache : true
83+ run : just desktop-tauri-clippy && just desktop-tauri-check && just desktop-tauri-test
84+ - lane : mesh
85+ cache : desktop-mesh
86+ save-cache : true
87+ run : just desktop-tauri-test-mesh
88+ - lane : compiled-flags
89+ cache : desktop-core
90+ save-cache : false
91+ run : just desktop-tauri-test-compiled-flags
92+ permissions :
93+ contents : read
94+ steps :
95+ - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
96+ with :
97+ fetch-depth : 2
98+ - uses : cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
99+ - uses : rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
100+ - uses : Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
101+ with :
102+ workspaces : desktop/src-tauri
103+ shared-key : ${{ matrix.cache }}
104+ save-if : ${{ matrix.save-cache && github.event_name != 'pull_request' }}
105+ - name : Install Tauri dependencies (Linux)
106+ env :
107+ DEBIAN_FRONTEND : noninteractive
108+ run : |
109+ CI_APT_ATTEMPT_SECONDS=90 scripts/ci-apt-retry.sh sudo apt-get update
110+ scripts/ci-apt-retry.sh sudo apt-get install -y --no-install-recommends \
111+ build-essential \
112+ curl \
113+ file \
114+ libasound2-dev \
115+ libayatana-appindicator3-dev \
116+ libgtk-3-dev \
117+ librsvg2-dev \
118+ libssl-dev \
119+ libwebkit2gtk-4.1-dev \
120+ libxdo-dev \
121+ patchelf \
122+ wget
123+ - name : Desktop Tauri ${{ matrix.lane }}
124+ run : ${{ matrix.run }}
125+ env :
126+ CMAKE_POLICY_VERSION_MINIMUM : " 3.5"
127+
122128 desktop-smoke-e2e :
123129 name : Desktop Smoke E2E (${{ matrix.shard }})
124130 runs-on : ubuntu-latest
125- timeout-minutes : 30
126- if : github.event_name == 'push' || inputs.desktop || inputs.desktop_rust || inputs.rust
131+ # A smoke shard needs ~12m, and Chromium dependency setup is bounded by
132+ # ci-apt-retry.sh (~25m worst case). Leave time for the full suite
133+ # and its reports to finish.
134+ timeout-minutes : 45
135+ # Keep in sync with FRONTEND_SELECTED in the Desktop gate (pinned by ci-required-gates.test.mjs).
136+ if : github.event_name == 'push' || inputs.desktop
127137 strategy :
128138 fail-fast : false
129139 matrix :
130- shard : [1, 2, 3, 4]
140+ # Playwright shards smoke specs by test count, not duration; ten
141+ # shards keep the slowest one near 11 minutes of test time.
142+ shard : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
131143 permissions :
132144 contents : read
133145 steps :
@@ -157,7 +169,7 @@ jobs:
157169 if : steps.playwright-cache.outputs.cache-hit != 'true'
158170 run : cd desktop && pnpm exec playwright install chromium
159171 - name : Install Playwright system dependencies
160- run : cd desktop && pnpm exec playwright install-deps chromium
172+ run : cd desktop && ../scripts/ci-apt-retry.sh pnpm exec playwright install-deps chromium
161173 - name : Save Playwright browser cache
162174 if : steps.playwright-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && matrix.shard == 1
163175 uses : actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
@@ -167,7 +179,7 @@ jobs:
167179 - name : Desktop E2E build
168180 run : pnpm -C desktop build:e2e
169181 - name : Desktop smoke e2e
170- run : cd desktop && pnpm exec playwright test --project=smoke --shard=${{ matrix.shard }}/4
182+ run : cd desktop && pnpm exec playwright test --project=smoke --shard=${{ matrix.shard }}/${{ strategy.job-total }}
171183 - name : Summarize flaky tests
172184 if : ${{ !cancelled() }}
173185 run : node scripts/summarize-flaky-tests.mjs playwright-report.json "Desktop Smoke E2E (${{ matrix.shard }})"
@@ -188,32 +200,44 @@ jobs:
188200 name : Desktop
189201 runs-on : ubuntu-latest
190202 timeout-minutes : 5
191- needs : [desktop-core , desktop-smoke-e2e, desktop-windows-build]
203+ needs : [desktop-js, desktop-tauri , desktop-smoke-e2e, desktop-windows-build]
192204 if : always() && (github.event_name == 'push' || inputs.desktop || inputs.desktop_rust || inputs.rust)
193205 permissions :
194206 contents : read
195207 steps :
196208 - name : Check desktop jobs
209+ env :
210+ JS_SELECTED : ${{ github.event_name == 'push' || inputs.desktop || inputs.rust }}
211+ RUST_SELECTED : ${{ github.event_name == 'push' || inputs.desktop_rust || inputs.rust }}
212+ FRONTEND_SELECTED : ${{ github.event_name == 'push' || inputs.desktop }}
213+ JS : ${{ needs.desktop-js.result }}
214+ TAURI : ${{ needs.desktop-tauri.result }}
215+ SMOKE : ${{ needs.desktop-smoke-e2e.result }}
216+ WINDOWS : ${{ needs.desktop-windows-build.result }}
197217 run : |
198- if [ "${{ needs.desktop-core.result }}" != "success" ]; then
199- echo "Desktop Core finished with: ${{ needs.desktop-core.result }}"
200- exit 1
201- fi
202- if [ "${{ needs.desktop-smoke-e2e.result }}" != "success" ]; then
203- echo "Desktop Smoke E2E shards finished with: ${{ needs.desktop-smoke-e2e.result }}"
204- exit 1
205- fi
206- if [ "${{ needs.desktop-windows-build.result }}" != "success" ]; then
207- echo "Desktop Windows Build finished with: ${{ needs.desktop-windows-build.result }}"
208- exit 1
209- fi
210- echo "Desktop jobs passed"
218+ # A selected job must succeed; an unselected job must be skipped.
219+ status=0
220+ check() {
221+ local name="$1" selected="$2" result="$3" want=skipped
222+ [ "$selected" = true ] && want=success
223+ if [ "$result" != "$want" ]; then
224+ echo "$name finished with: $result (expected $want)"
225+ status=1
226+ fi
227+ }
228+ check "Desktop JS" "$JS_SELECTED" "$JS"
229+ check "Desktop Tauri lanes" "$RUST_SELECTED" "$TAURI"
230+ check "Desktop Smoke E2E shards" "$FRONTEND_SELECTED" "$SMOKE"
231+ check "Desktop Windows Build" "$FRONTEND_SELECTED" "$WINDOWS"
232+ [ "$status" = 0 ] && echo "Desktop jobs passed"
233+ exit "$status"
211234
212235 desktop-windows-build :
213236 name : Desktop Windows Build
214237 runs-on : windows-latest
215238 timeout-minutes : 20
216- if : github.event_name == 'push' || inputs.desktop || inputs.desktop_rust || inputs.rust
239+ # Keep in sync with FRONTEND_SELECTED in the Desktop gate (pinned by ci-required-gates.test.mjs).
240+ if : github.event_name == 'push' || inputs.desktop
217241 permissions :
218242 contents : read
219243 steps :
0 commit comments