Closed madebr closed 1 year ago
Imho, the default should remain the same so it's fast by default.
But some option should be added that installs dependencies. This will need to work with various package managers: apk/apt-get/dnf/pacman.
Is there a reason it can't just target apt-get, since the GitHub VMs only offer Ubuntu?
The action can be run inside a docker image.
Should the linux dependencies be installed every time? Or only when building the SDL library?
In a test build with installation of Linux dependencies with a cached SDL build, the libsdl-org/setup-sdl action takes ~45s. In contrast with 0-4s when not installing anything.
Definitely only when building. An sdl app shouldn't rely on X11, etc, directly, and if they do, they should also install the dependency (which will be fast if setup-sdl also just did it).
In the cached case, we want speed, speed, speed. (imho.)
That makes sense. This is implemented in https://github.com/libsdl-org/setup-sdl/commit/d9870d5a2752ad998372a508d6d1b4cf8536ec11 and 4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3d.
A little caveat is that this gives a difference in build environment between cached and non-cached SDL builds. Let's hope this does not matter much :crossed_fingers:
The action supports building SDL in a fedora and ubuntu docker container.
I didn't add the needed packages for alpine and arch linux. When users run into an issue, please open a pr: https://github.com/libsdl-org/setup-sdl/blob/0a1cbd654d88c5db05778102fa5996afb79ad637/src/main.ts#L389-L390
Currently,
setup-sdl
does not install any system dependencies. This means the resulting library will not support Wayland/X11.This is okay for build purpose: you can check whether your project successfully builds against SDL. This is not okay for run purposes: the dummy video driver will not open a window.