mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 00:05:57 +08:00
Replace xvfb with headless raylib backend (#38298)
This commit is contained in:
@@ -110,8 +110,9 @@ jobs:
|
||||
run: scons
|
||||
- name: Run unit tests
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 20 }}
|
||||
env:
|
||||
RAYLIB_BACKEND: headless
|
||||
run: |
|
||||
source openpilot/selfdrive/test/setup_xvfb.sh
|
||||
# Pre-compile Python bytecode so each pytest worker doesn't need to
|
||||
$PYTEST --collect-only -m 'not slow' -qq
|
||||
MAX_EXAMPLES=1 $PYTEST -m 'not slow'
|
||||
@@ -206,9 +207,10 @@ jobs:
|
||||
run: scons
|
||||
- name: Driving test
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
source openpilot/selfdrive/test/setup_xvfb.sh
|
||||
pytest -s openpilot/tools/sim/tests/test_metadrive_bridge.py
|
||||
env:
|
||||
# MetaDrive renders offscreen through panda3d's EGL pipe on llvmpipe
|
||||
EGL_PLATFORM: surfaceless
|
||||
run: pytest -s openpilot/tools/sim/tests/test_metadrive_bridge.py
|
||||
|
||||
create_ui_report:
|
||||
name: Create UI Report
|
||||
@@ -226,8 +228,9 @@ jobs:
|
||||
- name: Build openpilot
|
||||
run: scons
|
||||
- name: Create UI Report
|
||||
env:
|
||||
RAYLIB_BACKEND: headless
|
||||
run: |
|
||||
source openpilot/selfdrive/test/setup_xvfb.sh
|
||||
python3 openpilot/selfdrive/ui/tests/diff/replay.py
|
||||
python3 openpilot/selfdrive/ui/tests/diff/replay.py --big
|
||||
- name: Upload UI Report
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Sets up a virtual display for running map renderer and simulator without an X11 display
|
||||
|
||||
if uname -r | grep -q "WSL2"; then
|
||||
DISP_ID=0 # WSLg uses display :0
|
||||
else
|
||||
DISP_ID=99 # Standard Xvfb display
|
||||
fi
|
||||
export DISPLAY=:$DISP_ID
|
||||
|
||||
Xvfb $DISPLAY -screen 0 2160x1080x24 2>/dev/null &
|
||||
|
||||
# check for x11 socket for the specified display ID
|
||||
while [ ! -S /tmp/.X11-unix/X$DISP_ID ]
|
||||
do
|
||||
echo "Waiting for Xvfb..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
touch ~/.Xauthority
|
||||
export XDG_SESSION_TYPE="x11"
|
||||
@@ -42,7 +42,6 @@ dependencies = [
|
||||
"json11 @ git+https://github.com/commaai/dependencies.git@release-json11#subdirectory=json11",
|
||||
"git-lfs @ git+https://github.com/commaai/dependencies.git@release-git-lfs#subdirectory=git-lfs",
|
||||
"gcc-arm-none-eabi @ git+https://github.com/commaai/dependencies.git@release-gcc-arm-none-eabi#subdirectory=gcc-arm-none-eabi",
|
||||
"xvfb @ git+https://github.com/commaai/dependencies.git@release-xvfb#subdirectory=xvfb",
|
||||
|
||||
# body / webrtcd
|
||||
"av",
|
||||
|
||||
@@ -932,7 +932,6 @@ dependencies = [
|
||||
{ name = "tqdm" },
|
||||
{ name = "websocket-client" },
|
||||
{ name = "xattr" },
|
||||
{ name = "xvfb" },
|
||||
{ name = "zeromq" },
|
||||
{ name = "zstandard" },
|
||||
{ name = "zstd" },
|
||||
@@ -1030,7 +1029,6 @@ requires-dist = [
|
||||
{ name = "ty", marker = "extra == 'testing'" },
|
||||
{ name = "websocket-client" },
|
||||
{ name = "xattr" },
|
||||
{ name = "xvfb", git = "https://github.com/commaai/dependencies.git?subdirectory=xvfb&rev=release-xvfb" },
|
||||
{ name = "zensical", marker = "extra == 'docs'" },
|
||||
{ name = "zeromq", git = "https://github.com/commaai/dependencies.git?subdirectory=zeromq&rev=release-zeromq" },
|
||||
{ name = "zstandard" },
|
||||
@@ -1065,7 +1063,6 @@ dependencies = [
|
||||
{ name = "libusb-package" },
|
||||
{ name = "libusb1" },
|
||||
{ name = "opendbc" },
|
||||
{ name = "spidev", marker = "sys_platform == 'linux'" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
@@ -1085,7 +1082,6 @@ requires-dist = [
|
||||
{ name = "ruff", marker = "extra == 'dev'" },
|
||||
{ name = "scons", marker = "extra == 'dev'" },
|
||||
{ name = "setuptools", marker = "extra == 'dev'" },
|
||||
{ name = "spidev", marker = "sys_platform == 'linux'" },
|
||||
]
|
||||
provides-extras = ["dev"]
|
||||
|
||||
@@ -1449,8 +1445,8 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "raylib"
|
||||
version = "6.0.0.0"
|
||||
source = { git = "https://github.com/commaai/dependencies.git?subdirectory=raylib&rev=release-raylib#c5ba350ea0b9f6454a71cfc1f7250811db98dbff" }
|
||||
version = "6.0.0.1"
|
||||
source = { git = "https://github.com/commaai/dependencies.git?subdirectory=raylib&rev=release-raylib#b5439c0c8178e5c2fee90eb396708ae1524a2662" }
|
||||
dependencies = [
|
||||
{ name = "cffi" },
|
||||
]
|
||||
@@ -1606,12 +1602,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/4e/39/a61d4b83a7746b70d23d9173be688c0c6bfc7173772344b7442c2c155497/sounddevice-0.5.5-py3-none-win_arm64.whl", hash = "sha256:3861901ddd8230d2e0e8ae62ac320cdd4c688d81df89da036dcb812f757bb3e6", size = 317115, upload-time = "2026-01-23T18:36:42.235Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spidev"
|
||||
version = "3.8"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/67/87/039b6eeea781598015b538691bc174cc0bf77df9d4d2d3b8bf9245c0de8c/spidev-3.8.tar.gz", hash = "sha256:2bc02fb8c6312d519ebf1f4331067427c0921d3f77b8bcaf05189a2e8b8382c0", size = 13893, upload-time = "2025-09-15T18:56:20.672Z" }
|
||||
|
||||
[[package]]
|
||||
name = "sympy"
|
||||
version = "1.14.0"
|
||||
@@ -1808,11 +1798,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/38/63/188f7cb41ab35d795558325d5cc8ab552171d5498cfb178fd14409651e18/xattr-1.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2aaa5d66af6523332189108f34e966ca120ff816dfa077ca34b31e6263f8a236", size = 37754, upload-time = "2025-10-13T22:16:15.306Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xvfb"
|
||||
version = "1.20.11.post1"
|
||||
source = { git = "https://github.com/commaai/dependencies.git?subdirectory=xvfb&rev=release-xvfb#bd5a45c85c86d1cc6fe2bd36381b4ff8d7f728c4" }
|
||||
|
||||
[[package]]
|
||||
name = "yarl"
|
||||
version = "1.24.2"
|
||||
|
||||
Reference in New Issue
Block a user