Razakhel / RaZ

Modern & multiplatform 3D game engine in C++17

Home Page:http://razakhel.github.io/RaZ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[CI] Investigate graphics unit testing under macOS

Razakhel opened this issue · comments

After having tried many different things, launching unit tests which require graphics capabilities (using GLFW in this case) always fail. It is yet unknown if this is due to:

  • A technical issue of macOS VMs/servers without any available workaround (which doesn't seem like it, since there are reports that it can be done, at least could have been some time ago);
  • Something missing concerning the window's initialization: GLFW may need specific settings to be able to start under those conditions;
  • Specific arguments to launch Xvfb and/or the tests executable with.

See:

Note: Xvfb needs the package xquartz to be installed by brew.

Separate steps

- name: Starting Xvfb
  run: |
    export DISPLAY=:99.0;
    ( sudo /usr/X11/bin/Xvfb :99 -ac -screen 0 1280x720x24 +render +iglx )&

- name: Test
  working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }}
  run: ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Unable to create basic Accelerated OpenGL renderer.
Unable to create basic Accelerated OpenGL renderer.
Core Image is now using the software OpenGL renderer. This will be slow.
GLFW error 65545: NSGL: Failed to find a suitable pixel format
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Error: Failed to create GLFW Window
/Users/runner/work/_temp/62d6113c-982d-45c8-abf4-0294b9601198.sh: line 1:  2157 Abort trap: 6           ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Error: Process completed with exit code 134.

See:

Single command

- name: Test
  working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }}
  run: /usr/X11/bin/Xvfb :99 & export DISPLAY=:99 & ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Unable to create basic Accelerated OpenGL renderer.
Unable to create basic Accelerated OpenGL renderer.
Core Image is now using the software OpenGL renderer. This will be slow.
GLFW error 65545: NSGL: Failed to find a suitable pixel format
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
_XSERVTransSocketUNIXCreateListener: mkdir(/tmp/.X11-unix) failed, errno = 2
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Error: Failed to create GLFW Window
/Users/runner/work/_temp/1e2bfa6e-3279-423e-aa75-96161a9cb859.sh: line 1:  2149 Abort trap: 6           ALSOFT_DRIVERS=null ./tests/RaZ_Tests
Error: Process completed with exit code 134.

See: