mirror of https://github.com/nirenjan/libx52.git
Previously, the build workflow was restricted to running only on Ubuntu 22.04, Ubuntu 24.04 and macOS, which are the only available native runners on Github Actions. However, the Ubuntu runner does allow us to run the build inside a container. Therefore, this commit adds the ability to pull a prebuilt container with all the necessary dependencies and build libx52 inside of that container. This commit also adds support scripts to build the containers and run the CI build against those prebuilt containers locally for testing, without having to rely exclusively on Github Actions. This change also adds support for testing libx52 against Alpine Linux, in order to verify the portability, given that Alpine uses musl instead of glibc. The limitation is that we need to mount the `/dev/bus/usb` device tree inside the container, otherwise libusb inside the Alpine image fails with LIBUSB_ERROR_OTHER. This is not a concern on the other distributions, but due to limitations in the Github actions environment, there is no `/dev/bus/usb` tree to export. For this reason, Alpine is not a part of the CI build, but is available for testing locally. Also, because a default bare container would need several minutes of package installation just to get to a point where we could run build-and-test.sh, this includes a prebuild workflow which generates the container images and pushes them to ghcr.io, and the build workflow pulls from there. There is also logic to ensure that we only keep the latest image, since there is no value in retaining older images. |
||
|---|---|---|
| .. | ||
| build-and-test.sh | ||
| build-doxygen.sh | ||
| generate_build_matrix.py | ||
| generate_changelog.py | ||
| get-changed-dockerfiles.sh | ||
| install-dependencies-macos.sh | ||
| install-dependencies-ubuntu.sh | ||
| install-kernel-dependencies.sh | ||