Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,5 @@ const fizzy_test_sources = [_][]const u8{
"testfizzy.c",
"testautomation_fizzy_gpu.c",
"testautomation_fizzy_xkb.c",
"testautomation_fizzy_wayland.c",
};
13 changes: 6 additions & 7 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -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 = .{
Expand Down
Loading