ci: real-window smoke gate (Xvfb + software Vulkan)#9
Open
kingb wants to merge 1 commit into
Open
Conversation
cargo test never creates a window or GPU surface, so a winit/wgpu/X11 regression or a missing runtime dep (libxcursor1, libxkbcommon-x11-0, a monospace font) sails through CI. Add a smoke job that launches the real binary under Xvfb with mesa's lavapipe and drives it through the control socket: launch, ctl state, a typed shell round-trip, tab drag/reorder/cancel, and a stability soak — failing the build on any windowing regression, and uploading the rendered frame as an artifact. Assertions are extracted into scripts/smoke/window-smoke.sh (strict: every failure exits non-zero) and shared with the standalone container harness, refactored to delegate, so the two can't drift. Validated in an ubuntu:24.04 container against the checked-out tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new “real-window” smoke test gate to CI to exercise the winit+wgpu X11 window/surface path (which cargo test doesn’t cover), and refactors the standalone X11 container harness to reuse the same assertions so the two can’t drift.
Changes:
- Added a dedicated GitHub Actions
smokejob that runs ember-term under Xvfb with software Vulkan (lavapipe) and uploads screenshots as artifacts. - Introduced
scripts/smoke/window-smoke.shas the shared, strict assertion script used by both CI and the container harness. - Refactored
scripts/smoke/x11-container-smoke.shto install required deps, build, set up Xvfb/Vulkan, then delegate towindow-smoke.sh.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/smoke/x11-container-smoke.sh | Refactors the container smoke harness to delegate assertions to the shared script. |
| scripts/smoke/window-smoke.sh | Adds the shared real-window assertion suite for driving ember-term via the control socket. |
| .github/workflows/ci.yml | Adds a new smoke CI job to run the real-window gate under Xvfb + lavapipe and upload screenshots. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+25
to
+33
| fail() { echo " FAIL: $*"; [ -f /tmp/ember-smoke.log ] && tail -20 /tmp/ember-smoke.log | sed 's/^/ /'; exit 1; } | ||
| st() { "$BIN" ctl state 2>/dev/null; } | ||
| jq_py() { python3 -c "$1"; } | ||
|
|
||
| echo "=== SMOKE 1: windowed app launches on the real display ===" | ||
| EMBER_CONTROL=1 "$BIN" >/tmp/ember-smoke.log 2>&1 & | ||
| APP=$! | ||
| sleep 8 | ||
| kill -0 "$APP" 2>/dev/null && echo " PASS: app alive after 8s (pid $APP)" || fail "app died on launch" |
Comment on lines
41
to
43
| export DISPLAY=:99 | ||
| export VK_ICD_FILENAMES="$(ls /usr/share/vulkan/icd.d/lvp_icd*.json | head -1)" | ||
| export WGPU_BACKEND=vulkan |
Comment on lines
+96
to
+99
| export DISPLAY=:99 | ||
| export VK_ICD_FILENAMES="$(ls /usr/share/vulkan/icd.d/lvp_icd*.json | head -1)" | ||
| export WGPU_BACKEND=vulkan WINIT_UNIX_BACKEND=x11 | ||
| export EMBER_SMOKE_BIN="$PWD/target/release/ember-term" |
Comment on lines
+84
to
+89
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends \ | ||
| libwayland-dev libxkbcommon-dev libx11-dev libxcursor-dev libxi-dev \ | ||
| libxrandr-dev libxcb1-dev libvulkan-dev mesa-vulkan-drivers \ | ||
| libfontconfig1-dev fonts-dejavu-core \ | ||
| xvfb x11-apps imagemagick libxi6 libxcursor1 libxkbcommon-x11-0 |
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.
Real-window smoke CI gate. Supersedes #8 (auto-closed when the main-history scrub deleted/restored this branch; rebased onto the rewritten main).
What
Adds a
smokeCI job exercising the real winit+wgpu window path — whichcargo testnever touches. A winit/wgpu/X11 regression, or a missing runtime dep (libxcursor1,libxkbcommon-x11-0, a monospace font), currently sails through CI. Same class of gap that let a bottle ship without its launcher assets.How
smokejob (ubuntu-24.04): install build + runtime deps + Xvfb + mesa's software Vulkan (lavapipe), build the binary, run assertions against a real window via the control socket, upload the rendered frame as an artifact.scripts/smoke/window-smoke.sh— strict (every failure exits non-zero): launch →ctl state→ typed shell round-trip → tab drag/reorder/cancel → stability soak.Validation
Ran end-to-end in an
ubuntu:24.04container against the checked-out tree — all six stages green, frame rendered. The prior run (as #8) also passed on GitHub's x86_64 runner.🤖 Generated with Claude Code