Skip to content

Commit 6489655

Browse files
dev-swarupclaude
andcommitted
ci: give headless Blender EGL and a virtual display
On Linux, Blender loads libEGL.so.1 for any OpenGL work even with -b, and libepoxy aborts the process when it's missing, so the tool suite died at its first Workbench render on both matrix entries. Install Mesa's EGL and software driver and run the suite under xvfb-run. run_tools.py now prints each case as it starts and finishes and enables faulthandler, so a crash inside Blender names the case and the Python stack instead of losing all buffered output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8ee14d3 commit 6489655

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v4
4444
- name: System libraries
45-
run: sudo apt-get update && sudo apt-get install -y libxi6 libxkbcommon0 libxxf86vm1 libxfixes3 libxrender1 libgl1 libsm6
45+
run: >-
46+
sudo apt-get update && sudo apt-get install -y
47+
libxi6 libxkbcommon0 libxxf86vm1 libxfixes3 libxrender1 libgl1 libsm6
48+
libegl1 libegl-mesa0 libgl1-mesa-dri libglx-mesa0 xvfb
4649
- name: Download Blender ${{ matrix.blender }}
4750
env:
4851
BLENDER_VERSION: ${{ matrix.blender }}
@@ -51,4 +54,4 @@ jobs:
5154
curl -fsSL "https://download.blender.org/release/Blender${series}/blender-${BLENDER_VERSION}-linux-x64.tar.xz" | tar -xJ
5255
echo "BLENDER=$PWD/blender-${BLENDER_VERSION}-linux-x64/blender" >> "$GITHUB_ENV"
5356
- name: Tool suite
54-
run: '"$BLENDER" -b --factory-startup --python-exit-code 1 --python tests/run_tools.py'
57+
run: xvfb-run -a -s "-screen 0 1280x720x24" "$BLENDER" -b --factory-startup --python-exit-code 1 --python tests/run_tools.py

‎tests/run_tools.py‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import contextlib
4+
import faulthandler
45
import os
56
import sys
67
import tempfile
@@ -671,19 +672,17 @@ def factory(cfg: Any) -> Scripted:
671672

672673

673674
def main() -> int:
675+
faulthandler.enable()
674676
only = os.environ.get("BLENDER_AI_TESTS")
675677
for fn in CASES:
676678
if only and fn.__name__ not in only.split(","):
677679
continue
680+
print(f"RUN {fn.__name__}", flush=True)
678681
fn()
679-
width = max(len(n) for n, _, _ in RESULTS)
680-
failed = 0
681-
for name, ok, detail in RESULTS:
682-
print(f"{'PASS' if ok else 'FAIL'} {name.ljust(width)}")
683-
if not ok:
684-
failed += 1
685-
print(" " + detail.replace("\n", "\n "))
686-
print(f"\n{len(RESULTS) - failed}/{len(RESULTS)} passed")
682+
name, ok, detail = RESULTS[-1]
683+
print(f"{'PASS' if ok else 'FAIL'} {name}" + ("" if ok else "\n " + detail.replace("\n", "\n ")), flush=True)
684+
failed = [name for name, ok, _ in RESULTS if not ok]
685+
print(f"\n{len(RESULTS) - len(failed)}/{len(RESULTS)} passed" + (f"; failed: {', '.join(failed)}" if failed else ""), flush=True)
687686
return 1 if failed else 0
688687

689688

0 commit comments

Comments
 (0)