ci(desktop-smoke): cache global openclaw install and cargo-installed drivers#84
Merged
Merged
Conversation
…drivers Windows Desktop Smoke ran 13m per job — 6m 12s in npm install -g openclaw (native-module rebuilds), 57s in cargo install tauri-driver, 37s in cargo install msedgedriver-tool. None were cached across runs. - Pin openclaw CLI to the version from tests/desktop/harness.mjs (2026.4.11 today) instead of installing latest, so cache keys are stable and CI uses the same version the test harness expects. - actions/cache@v4 keyed on openclaw-cli-<os>-<version> covers the global install directory (lib/node_modules/openclaw + shim scripts). Cache miss still installs from registry; subsequent runs skip the install entirely. - Replace two cargo install ... --locked calls with baptiste0928/cargo-install@v3 (tauri-driver + msedgedriver-tool). The action caches the compiled binary keyed on crate+git+version+toolchain; cache hit copies rather than recompiles. - Split the msedgedriver-tool step into two: cached crate install, then a separate "Materialize Edge WebDriver binary" step that runs the tool to download the matching msedgedriver.exe (the download still needs to happen per-run since the Edge version on the runner can change). Expected Windows Desktop Smoke on cache hit: ~5m (down from 13m). Linux and macOS also benefit from cached openclaw + tauri-driver. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…8 dir First attempt used baptiste0928/cargo-install@v3, which installs crates into its own managed cache dir and prepends it to PATH. But tests/desktop/harness.mjs hardcodes the path ~/.cargo/bin/tauri-driver, so smoke fails after install even though the binary is on PATH elsewhere. Revert to plain \`cargo install --locked\` (which installs to ~/.cargo/bin) and add an actions/cache@v4 keyed on OS that covers both tauri-driver and msedgedriver-tool binaries. Cache miss falls through to the install; cache hit skips it entirely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Cache three artifacts that Desktop Smoke previously rebuilt from scratch on every run:
Why
Windows Desktop Smoke was running 13 minutes per PR and the Windows machine spent all its extra time in three compiles that never varied between runs:
All three are deterministic given the version pin, so caching is trivially safe. Linux and macOS benefit too — openclaw and tauri-driver caches apply there.
Expected Windows Desktop Smoke on cache hit: ~5m, down from 13m. First run after this merges pays the old cost once to populate the cache.
Behavior changes worth noting
Test plan
Target branch
`release/0.3.0` — pure CI optimization, no code changes. Lands first where it's most useful (rc.2 stabilization has several more PRs coming). Forward-propagates to main and develop via standard release merge.
🤖 Generated with Claude Code