SFML community forums

Help => General => Topic started by: lavinrp on March 20, 2020, 09:17:25 am

Title: SFML with GitHub actions
Post by: lavinrp on March 20, 2020, 09:17:25 am
This is only tangentially related to SFML so I apologize if this doesn't belong here; however, I suspect that a solution to this could be helpful to SFML users in the future.

I’m currently working on adding GitHub Actions to a project of mine that is using SFML. I’m only using the `ubuntu-latest` runner for now to keep things simple. The runners for these actions don’t have any monitors so I’m running with Xvfb (http://elementalselenium.com/tips/38-headless).

I consistently get the following errors:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

I’ve done a bit of research into this and I’ve seen that this can be caused by ambiguous references to ligGL.so (https://askubuntu.com/questions/834254/steam-libgl-error-no-matching-fbconfigs-or-visuals-found-libgl-error-failed-t), but I don't currently have that issue. I’ve tried updating mesa  (http://ubuntuhandbook.org/index.php/2018/05/install-mesa-18-0-4-ubuntu-18-04-lts/) and get the same issue. I’ve also tried renaming the ligGL.so files as recommended here (https://askubuntu.com/a/978112) but that had no effect.

Here is a project that shows a minimum reproducible case: https://github.com/lavinrp/sfml_actions_test/actions

Am I missing something here? Does anyone have any ideas? Has anyone got SFML (or any gui application) to work with GitHub Actions?
Title: Re: SFML with GitHub actions
Post by: eXpl0it3r on March 26, 2020, 08:33:45 am
This is probably more something related to Xvfb than SFML. Like the other threads say, it's often caused by nvidia and mesa driver mixing or similar.

Btw you don't really need this libglew1.5-dev libjpeg8-dev libsndfile1-dev. SFML doesn't use libsndfile, nor libjpeg, nor glew anymore.
Title: Re: SFML with GitHub actions
Post by: lavinrp on March 27, 2020, 03:54:26 am
Thanks for the reply (and the note about the unnecessary libs).

In my testing I also tried to run on Ubuntu via windows subsystem for linux and got a nearly identical error.
I saw from other posts that WSL is not currently supported in SFML. I wonder if these GitHub ubuntu runners are set up similarly to WSL.

I'm experimenting with other CI vendors at the moment, but I'll probably double back and poke around with actions some more in the next few days.