The major contribution of this PR is a CI system that, on every new commit or PR, will:
Spin up a fresh new ubuntu VM
Install the system dependencies
Build the pack
Upload the built pack so anyone can download the compiled binaries
I hope that this will help prevent the following problems, which I found when building the pack by myself:
Outdated dependencies: Given that the builds will be done on base images, all the dependencies will need to be up to date, as otherwise the build will fail. This also prevents problems where a dependency is not identified because it's already installed on the workstation of a developer.
Outdated build artifacts: This CI will make it possible to get access to compiled packages, similar to what is being done with releases but with two main differences:
It's possible to download the release associated with any commit, not only a few selected ones
The builds will be completely from scratch, so it will be impossible for outdated build artifacts to remain from previous builds. This is important because, currently, in the latest release the file startlnp.sh has a wrong reference to a file named "bin/DwarfTherapist" (the correct filename is "bin/dwarftherapist"). Now, the source files point to the correct file and when you build the package the resulting script points to the correct file, but I guess that wrong pointer ended up there because the build script determined that the startlnp.sh script had already been built before and thus didn't build it again (I might be wrong here, this is just my hypothesis), causing an outdated build artifact.
Non-reproducible builds: CI will make sure that the build scripts will work on external machines and not rely on idiosyncrasies of the maintainer's machine. From my point of view, this is the root cause of almost all the issues that have been created for this repo, so this should help a lot.
Apart from all this, this PR changes autoconf to use python3 instead of the default python command provided by each specific distro. This may seem like a minor change but it helps a lot if your distribution defaults to python2, which causes the autoconf script to trigger an error saying that the tkinter module cannot be found, while python is reported to be fine. This happened to me when building on ubuntu 18.04 and it lead to a lot of hair pulling, as I kept focusing on trying to debug why was the tkinter not being properly installed when it was actually properly installed.
The reason why autoconf failed in this specific case is that the check on the availability of the tkinter package uses the code python -c "import tkinter" 2>/dev/null, which works for python3 but doesn't for python2 due to the fact that the tkinter module in python2 is Tkinter.
On a final note, you may want to add the module python3-tk to the list of dependencies (as mentioned in #11) because the tk dependency that is currently included, python-tk, is for python2.
The major contribution of this PR is a CI system that, on every new commit or PR, will:
I hope that this will help prevent the following problems, which I found when building the pack by myself:
Apart from all this, this PR changes autoconf to use
python3
instead of the defaultpython
command provided by each specific distro. This may seem like a minor change but it helps a lot if your distribution defaults to python2, which causes the autoconf script to trigger an error saying that the tkinter module cannot be found, while python is reported to be fine. This happened to me when building on ubuntu 18.04 and it lead to a lot of hair pulling, as I kept focusing on trying to debug why was the tkinter not being properly installed when it was actually properly installed. The reason why autoconf failed in this specific case is that the check on the availability of the tkinter package uses the codepython -c "import tkinter" 2>/dev/null
, which works for python3 but doesn't for python2 due to the fact that the tkinter module in python2 isTkinter
.On a final note, you may want to add the module
python3-tk
to the list of dependencies (as mentioned in #11) because the tk dependency that is currently included,python-tk
, is for python2.