Building in boxes.
I have just spent a week cleaning up the gamecake build process which has been suffering from bitrot.
Originally, many years ago, I was trying to use cross builds where possible and chroots where that wasn't. This ended up being problematic. It is much easier to set everything up inside virtual machines even if this is slower and more of a resource hog, especially if using QEMU for the ARM builds.
So this has been a cleanup that, hopefully, simplifies the builds, removes some complexity left over from old cross compiling attempts and make using CircleCI for automatically build and testing a little bit faster.
Take a look in each vbox_* directory for how this is all working; some of which are still experimental, eg. getting windows working well under Linux so I can try and step out of win32. Apart from these boxes which are used for building releases, there has been some major cleanup in the following public builds.
** We have a docker build box. **
This is ubuntu 16.04 with premake4, SDL2 and LuaJIT built from source; we need to build them from source as the version you will find in apt is often out of date especially when using an older version of Ubuntu.
We really do want the older version of Ubuntu as we want to work on older machines with older libraries available and we really do need the newer versions of SDL2 and LuaJIT for added features and bug fixes.
16.04 is a compromise here as 12.04 and 14.04 caused too many build problems and it was easier to bump to 16.04 which is only a couple of years difference in terms of code base and stability.
https://hub.docker.com/r/xriss/gamecake/ is now used as the base box for https://circleci.com/gh/xriss/gamecake builds.
** Due to significantly improved build time by not including SDL2 and LuaJIT from source, we now also build for Windows and Emscripten with every push. **
CircleCI has switched to a new configuration system which meant we needed to update our config files before they stop working later this year. It seems the build artifacts are no longer available to the public. We do, however, save the actual build outputs with every build.
** We have decided to dump the pagecake build. **
This was an OpenResty nginx with extra libs but I did not keep nginx very well up-to-date. So instead we now just use a standard OpenResty. Extra libraries are made available to the nginx lua host as rocks so this keeps us nicely up-to-date and gives us a reason to start publishing rocks.
** I've decided to keep all of the libraries together in one rock.**
See https://luarocks.org/modules/xriss/gamecake for the rocks.
For now, these are just the most essential ones to keep all our websites running but eventually a luarocks install of gamecake will be the same as downloading one of our prebuilt executables.
** We have snap builds.**
These can be found at https://dashboard.snapcraft.io/snaps/gamecake/ and is probably one of the easiest ways of getting a Linux version which also supports ARM machines.
Keeping all of this running is an awful amount of annoying work as no matter what I do, sooner or later one of the platforms will break something we rely on. Hopefully this update will give us another few years before it all begins to rot again.