Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
name: Linux display servers
# Opens the main viewport and a data viewer under X11 and under native
# Wayland (scripts/gl_context_probe.py), with no -dev GL packages installed:
# a stock desktop has libGL.so.1/libEGL.so.1 and not the unversioned names,
# and moderngl's own loader asked for the unversioned ones. Nothing else in
# CI runs a real display server, so nothing else would notice either break.
on:
pull_request:
paths:
- src/belfryscad/window/viewport.py
- src/belfryscad/engine/renderer.py
- scripts/gl_context_probe.py
- .github/workflows/linux-display.yml
- pyproject.toml
- uv.lock
push:
branches: [main]
paths:
- src/belfryscad/window/viewport.py
- src/belfryscad/engine/renderer.py
- scripts/gl_context_probe.py
- .github/workflows/linux-display.yml
- pyproject.toml
- uv.lock
jobs:
probe:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
display: [x11, wayland]
# The control: with -dev packages installed, a failure is the
# display server; without, it may be the library names.
dev_libs: [removed, installed]
env:
LIBGL_ALWAYS_SOFTWARE: "1" # no GPU on the runner: Mesa llvmpipe
steps:
- uses: actions/checkout@v5
- name: Install runtime libraries only
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libgl1 libopengl0 libgl1-mesa-dri \
libxkbcommon0 libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 \
libxcb-keysyms1 libxcb-shape0 libxcb-xinerama0 libxcb-randr0 \
libxcb-render-util0 libxcb-image0 libdbus-1-3 libfontconfig1 \
libwayland-client0 libwayland-cursor0 libwayland-egl1 \
xvfb weston
if [ "${{ matrix.dev_libs }}" = removed ]; then
sudo apt-get remove -y libegl-dev libgl-dev libgles-dev libglx-dev \
libopengl-dev libglvnd-dev libegl1-mesa-dev libgl1-mesa-dev || true
# The point of this column: prove the unversioned names are gone.
if ldconfig -p | grep -E 'lib(EGL|GL)\.so '; then
echo "unversioned GL library still present"; exit 1
fi
else
sudo apt-get install -y libegl-dev libgl-dev
fi
ldconfig -p | grep -E 'lib(EGL|GL)\.so' || true
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- run: uv sync --frozen
- name: Probe under X11 (xvfb)
if: matrix.display == 'x11'
env:
QT_QPA_PLATFORM: xcb
run: xvfb-run -a -s "-screen 0 1280x1024x24" uv run --no-sync python -X faulthandler scripts/gl_context_probe.py
- name: Probe under Wayland (headless Weston)
if: matrix.display == 'wayland'
env:
QT_QPA_PLATFORM: wayland
WAYLAND_DISPLAY: wayland-probe
XDG_RUNTIME_DIR: /tmp/xdg-runtime
run: |
mkdir -p -m 700 "$XDG_RUNTIME_DIR"
weston --backend=headless --renderer=pixman --socket=wayland-probe \
--width=1280 --height=1024 > weston.log 2>&1 &
for i in $(seq 50); do [ -S "$XDG_RUNTIME_DIR/wayland-probe" ] && break; sleep 0.2; done
[ -S "$XDG_RUNTIME_DIR/wayland-probe" ] || { cat weston.log; exit 1; }
uv run --no-sync python -X faulthandler scripts/gl_context_probe.py || { s=$?; cat weston.log; exit $s; }
62c9a9e10This file is pinned to the selected release. Download the original to open it in your design tool.