Adeeb Shihadeh 122939fdf2 raylib: add PLATFORM_OFFSCREEN support (#38)
* raylib: add PLATFORM_OFFSCREEN support for headless CI rendering

- build.sh: use commaai/raylib platform-offscreen commit, build offscreen
  variant (libraylib_offscreen.a) alongside desktop for x86_64, bundle
  GLVND dispatchers (libEGL, libOpenGL, libGLdispatch) in install/lib/mesa/
- build.py: add PLATFORM_OFFSCREEN elif — uses offscreen lib + bundled
  GLVND with RPATH, links -lOpenGL -lEGL instead of -lGL -lX11
- __init__.py: auto-rebuild CFFI when RAYLIB_PLATFORM env changes
  (tracks built platform in .raylib_platform marker file)
- Bump version to 5.5.0.5

This lets openpilot CI render headlessly via EGL surfaceless + Mesa
llvmpipe without needing xvfb or any additional apt packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* raylib: auto-detect CI and use PLATFORM_OFFSCREEN

__init__.py now auto-detects CI on Linux x86_64 and uses
PLATFORM_OFFSCREEN + LIBGL_ALWAYS_SOFTWARE=1 automatically.
No env vars needed in the consuming CI workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:44:19 -08:00
2026-02-25 20:17:13 -08:00
2026-02-27 12:01:40 -08:00
2026-02-25 20:17:13 -08:00
2026-02-22 21:39:17 -08:00
2026-02-25 20:17:13 -08:00
2026-02-23 22:59:08 -08:00
2026-03-01 11:29:13 -08:00
2026-02-24 18:57:54 -08:00
2026-03-01 10:36:21 -08:00
2026-02-24 18:57:54 -08:00
2026-02-24 18:57:54 -08:00
2026-02-23 21:46:40 -08:00
2026-02-24 18:57:54 -08:00
2026-02-24 18:57:54 -08:00
2026-02-25 20:17:13 -08:00
2026-02-25 20:17:13 -08:00
2026-03-01 11:29:13 -08:00
2026-02-27 11:57:01 -08:00
2026-02-25 20:17:13 -08:00

dependencies

a central repo for vendoring all third party dependencies for comma projects.

since all our projects are Python, we wrap each vendored dependency as a pip package. git clone and uv sync is all you need.

motivations for this approach

  • apt-get is slow
  • apt-get updates its packages on a schedule we don't control
  • apt-get package versions don't match brew versions
  • apt-get doesn't come with Arch Linux
  • apt-get packages come with more than we need, bloating our project footprint

uv, as opposed to apt-get, brew, and friends, is fast and already used in our projects.

we target the following platforms:

  • Linux x86_64
  • Linux aarch64
  • Darwin aarch64 (Apple Silicon)

contributions welcome for other platforms!

usage

dependencies = [
  # use the releases branch for pre-built wheels
  "capnproto @ git+https://github.com/commaai/dependencies.git@releases#subdirectory=capnproto",
  "ffmpeg @ git+https://github.com/commaai/dependencies.git@releases#subdirectory=ffmpeg",

  # use the master branch to build the package on pip install
  "capnproto @ git+https://github.com/commaai/dependencies.git@master#subdirectory=capnproto",
  "ffmpeg @ git+https://github.com/commaai/dependencies.git@master#subdirectory=ffmpeg",
]

workflow

to add a new package:

  • start a new top-level directory as a new package
  • ./test.sh tests the building of all packages
  • on pushes to master, wheels are built for our target platforms and pushed to a GitHub release
  • the releases branch contains shim packages that allow pointing to a git branch and always getting the appropriate wheel for your platform
Description
No description provided
Readme 7 MiB
2026-03-14 16:06:40 -05:00
Languages
Python 60%
Shell 40%