From 0ebb9ab05fe05e9d24aca14e8abb3a714ddb9848 Mon Sep 17 00:00:00 2001 From: Russell Martin Date: Wed, 19 Jun 2024 18:00:12 -0400 Subject: [PATCH] Run testbed with Wayland --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++-- changes/2668.misc.rst | 1 + 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 changes/2668.misc.rst diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d871bceb62..f85594d74f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,7 +188,7 @@ jobs: strategy: fail-fast: false matrix: - backend: [ "macOS-x86_64", "macOS-arm64", "windows", "linux", "android", "iOS" ] + backend: [ "macOS-x86_64", "macOS-arm64", "windows", "linux-x11", "linux-wayland","android", "iOS" ] include: - pre-command: "" briefcase-run-prefix: "" @@ -208,7 +208,7 @@ jobs: # We use a fixed Ubuntu version rather than `-latest` because at some point, # `-latest` will be updated, but it will be a soft changeover, which would cause # the system Python version to become inconsistent from run to run. - - backend: "linux" + - backend: "linux-x11" platform: "linux" runs-on: "ubuntu-22.04" # The package list should be the same as in tutorial-0.rst, and the BeeWare @@ -236,6 +236,35 @@ jobs: setup-python: false # Use the system Python packages app-user-data-path: "$HOME/.local/share/testbed" + - backend: "linux-wayland" + platform: "linux" + runs-on: "ubuntu-24.04" + # The package list should be the same as in tutorial-0.rst, and the BeeWare + # tutorial, plus mutter to provide a window manager, and libjpeg-dev for Pillow. + pre-command: | + sudo apt update -y + sudo apt install -y --no-install-recommends \ + mutter libjpeg-dev \ + pkg-config python3-dev libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.1 + + # Start Virtual X server + echo "Start X server..." + Xvfb :99 -screen 0 2048x1536x24 & + sleep 1 + + # Start Window manager + echo "Start window manager..." + DISPLAY=:99 MUTTER_DEBUG_DUMMY_MODE_SPECS=2048x1536 \ + mutter --nested --wayland --no-x11 --wayland-display toga & + sleep 1 + + # Bypass guardrails for installing over system packages + export PIP_BREAK_SYSTEM_PACKAGES=1 + export PIP_IGNORE_INSTALLED=1 + briefcase-run-prefix: "WAYLAND_DISPLAY=toga" + setup-python: false # Use the system Python packages + app-user-data-path: "$HOME/.local/share/testbed" + - backend: "windows" platform: "windows" runs-on: "windows-latest" diff --git a/changes/2668.misc.rst b/changes/2668.misc.rst new file mode 100644 index 0000000000..d974f313bc --- /dev/null +++ b/changes/2668.misc.rst @@ -0,0 +1 @@ +Add Wayland to the matrix for testbed CI testing.