From a02dda8d4c12bfd6132f24f4d00bcdbc8a274b52 Mon Sep 17 00:00:00 2001 From: foxnne Date: Fri, 9 Oct 2026 12:44:40 -0500 Subject: [PATCH] ci: run the Wayland frame-insets suite under headless weston fizzyedit/SDL's suite for patch 6 (`FizzyWayland`, test/testautomation_fizzy_wayland.c) joins `zig build test-fizzy`, and a job of its own runs it under weston's headless backend with its desktop shell, at output scale 1 and 2, in the Ubuntu 26.04 container. The suite reads libwayland's request trace, so it needs a real compositor; lavapipe presents the frames that map its windows. The pin moves to SDL's `test/fizzy-wayland-insets` (the suite for patch 6 on `fizzy-3.4`), which needs a permanent tag before this merges. Part of fizzyedit/fizzy#280 (step A2). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yaml | 55 +++++++++++++++++++++++++++++++++++++++ build.zig | 1 + build.zig.zon | 13 +++++---- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b4d169cbf..33ab060a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -123,6 +123,61 @@ jobs: zig build test-fizzy --summary all -- --require-gpu vulkan kill "$weston_pid" + # fizzyedit/SDL's suite for patch 6, Wayland frame insets (`FizzyWayland`). It reads the requests + # SDL sends from libwayland's own trace (WAYLAND_DEBUG), so it needs a real compositor: weston's + # headless backend, with its default desktop shell, which maximizes and fullscreens. At output + # scale 1 and 2, as the insets are in window coordinates whatever the scale. lavapipe presents + # the frames that map the windows. Ubuntu 26.04 for the same libxkbcommon reason as above. + test-fizzy-wayland-insets: + strategy: + fail-fast: false + matrix: + scale: [1, 2] + runs-on: ubuntu-latest + container: ubuntu:26.04 + steps: + - name: Install tools, lavapipe and weston + run: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates git xz-utils \ + mesa-vulkan-drivers libvulkan1 weston \ + libwayland-client0 libwayland-cursor0 libwayland-egl1 libxkbcommon0 + dpkg-query -W libwayland-client0 mesa-vulkan-drivers weston + echo "VK_DRIVER_FILES=$(ls /usr/share/vulkan/icd.d/lvp_icd*.json | head -n 1)" >> "$GITHUB_ENV" + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Zig + uses: mlugg/setup-zig@v2 + with: + version: 0.16.0 + + - name: Workaround Zig 0.16.0 ZIP unpack failure + # https://codeberg.org/ziglang/zig/issues/31964 + run: mkdir -p "${ZIG_GLOBAL_CACHE_DIR}/tmp" + + - name: Build test-fizzy + run: zig build test-fizzy --summary all -- --list + + - name: Run FizzyWayland under headless weston (scale ${{ matrix.scale }}) + env: + SDL_VIDEO_DRIVER: wayland + WAYLAND_DISPLAY: wayland-fizzy + run: | + export XDG_RUNTIME_DIR="$(mktemp -d)" + chmod 700 "$XDG_RUNTIME_DIR" + weston --backend=headless --scale=${{ matrix.scale }} --socket="$WAYLAND_DISPLAY" --idle-time=0 > weston.log 2>&1 & + weston_pid=$! + for i in $(seq 50); do [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ] && break; sleep 0.1; done + status=0 + zig build test-fizzy --summary all -- --filter FizzyWayland || status=$? + kill "$weston_pid" || true + echo "--- weston.log" + cat weston.log + exit "$status" + # Do GitHub's hosted macOS runners have a Metal device? The probe says, and the suite requires # Metal wherever the probe found one, so a runner with Metal can't skip the Metal tests. (On # macos-14, MTLCreateSystemDefaultDevice() is nil from a command-line tool though diff --git a/build.zig b/build.zig index b919bbbf4..2f82b0c7e 100644 --- a/build.zig +++ b/build.zig @@ -235,4 +235,5 @@ const fizzy_test_sources = [_][]const u8{ "testfizzy.c", "testautomation_fizzy_gpu.c", "testautomation_fizzy_xkb.c", + "testautomation_fizzy_wayland.c", }; diff --git a/build.zig.zon b/build.zig.zon index 6bdafbf58..98b1aa4af 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,14 +5,13 @@ .minimum_zig_version = "0.16.0", .dependencies = .{ // fizzyedit/SDL: release-3.4.16 with fizzy's patches on top. TEST PIN: branch - // `wayland/xkb-mod-mask-optional`, `fizzy-3.4` (tag `fizzy-3.4.16-6`) plus the suite for - // the Wayland driver on an older libxkbcommon and patch 8 making `xkb_keymap_mod_get_mask` - // optional at runtime, untagged until it is reviewed and moved onto `fizzy-3.4`. Pinned by - // commit. `.version` is still the SDL release it is based on: `build.zig` reads it for - // the library's SO version. + // `test/fizzy-wayland-insets`, `fizzy-3.4` (tag `fizzy-3.4.16-7`) plus the test suite for + // patch 6, untagged until it is reviewed and moved onto `fizzy-3.4`. Pinned by commit. + // `.version` is still the SDL release it is based on: `build.zig` reads it for the + // library's SO version. .sdl = .{ - .url = "https://github.com/fizzyedit/SDL/archive/36dda37b20cb70ce0feb79ba1340858e9cd41ac5.tar.gz", - .hash = "N-V-__8AANe4-AK4xmMHFWdXiPun3hihTxQJCHKC4gmCsDEQ", + .url = "https://github.com/fizzyedit/SDL/archive/a518aaf9e3b915330c5ae80771efbbca5523d29e.tar.gz", + .hash = "N-V-__8AAMhY-QJGBfy_DcJQIubyngZlFT5ebaIR5IU4MxCS", .version = "3.4.16", }, .dbus = .{