Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Investigate graphics unit testing under macOS #21

Open
Razakhel opened this issue Jan 2, 2021 · 2 comments
Open

[CI] Investigate graphics unit testing under macOS #21

Razakhel opened this issue Jan 2, 2021 · 2 comments
Labels
Help wanted Idea To be considered; may need testing and/or time macOS Issues related to macOS

Comments

@Razakhel
Copy link
Owner

Razakhel commented Jan 2, 2021

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:

@Razakhel Razakhel added Help wanted Idea To be considered; may need testing and/or time labels Jan 2, 2021
@Razakhel Razakhel added the macOS Issues related to macOS label Sep 22, 2023
@HinTak
Copy link

HinTak commented May 28, 2024

I am trying to replicate a mac os x -specific skia-python issue on CI (me being Linux only)
kyamagu/skia-python#214 , and seems to have come to the same conclusion: github CI 's mac os x runner images don't do hard-ware accelerated graphics.

BTW, Xvfb is irrelevant for mac os x: OpenGL on mac os x works directly against core graphics, without needing an X server.

@HinTak
Copy link

HinTak commented May 28, 2024

FWIW, I found that software renderer works, but with a very limited/older OpenGL version on github's CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Idea To be considered; may need testing and/or time macOS Issues related to macOS
Projects
None yet
Development

No branches or pull requests

2 participants