Skip to content

remove xvfb: use EGL surfaceless for headless CI#37361

Open
adeebshihadeh wants to merge 4 commits intomasterfrom
xvfb2
Open

remove xvfb: use EGL surfaceless for headless CI#37361
adeebshihadeh wants to merge 4 commits intomasterfrom
xvfb2

Conversation

@adeebshihadeh
Copy link
Contributor

Summary

  • Replace Xvfb + GLFW with EGL surfaceless platform for CI rendering
  • Creates OpenGL context directly via EGL_MESA_platform_surfaceless — no display server needed
  • Mesa llvmpipe provides software OpenGL 4.5 rendering
  • Removes xvfb system dependency

Changes

  • third_party/raylib/build.sh: build with PLATFORM_OFFSCREEN when CI=1
  • selfdrive/ui/SConscript: link with EGL+GL in CI
  • .github/workflows/tests.yaml: remove setup_xvfb.sh, add LIBGL_ALWAYS_SOFTWARE=1 and raylib rebuild step
  • tools/setup_dependencies.sh: drop xvfb, add libegl-dev and libgl-dev

Dependencies

Test plan

  • unit_tests pass without Xvfb
  • create_ui_report generates correct UI replay videos
  • Build succeeds on all CI runners

🤖 Generated with Claude Code

adeebshihadeh and others added 2 commits February 23, 2026 18:25
Replace Xvfb + GLFW with EGL surfaceless platform (PLATFORM_OFFSCREEN)
for CI rendering. This creates an OpenGL context directly via EGL without
needing any display server, using Mesa's llvmpipe for software rendering.

Changes:
- build.sh: build raylib with PLATFORM_OFFSCREEN when CI=1
- SConscript: link with EGL+GL in CI instead of just GL
- tests.yaml: replace `source setup_xvfb.sh` with LIBGL_ALWAYS_SOFTWARE=1,
  add raylib rebuild step before scons
- setup_dependencies.sh: remove xvfb, add libegl-dev and libgl-dev

Depends on: commaai/raylib#23

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update raylib commit to include the KHRONOS_APIENTRY fix for
PLATFORM_OFFSCREEN. GLAD's embedded khrplatform.h was preventing the
system khrplatform.h from defining KHRONOS_APIENTRY, breaking all EGL
function declarations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The pyray pip package bundles its own GLFW-based raylib which requires
X11. Build custom Python bindings with PLATFORM_OFFSCREEN raylib and
install them in CI to replace the pip version. This enables Python UI
tests to run headless via EGL surfaceless.

Also updates raylib-python-cffi commit to include PLATFORM_OFFSCREEN
link args support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

UI Preview

mici: Videos are identical! View Diff Report
big: Videos are identical! View Diff Report

libegl-dev and libgl-dev are already installed by setup_dependencies.sh.
The -dev packages are only needed at build time (headers + symlinks);
the runtime libraries (libegl1, libgl1) are pre-installed on the runner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant