ci: Prepare the macOS build environment in a dedicated CI job.
It is inefficient to download Wine and build widl
at each run of the build-mac
job. And while for widl
itself that's not a big deal, in the future I'd like to build MoltenVK on the CI, so we don't depend on the version available on the CI runner, which would make each CI run quite heavier.
So I came up with an image
CI job that, similarly to Linux, collect together the required dependencies for running the pipeline. macOS doens't support a real Docker image, so this "image" is just a .tar.gz
file hosted in the GitLab package registry.
There is a little problem with that: in GitLab uploading a new file in the package registry doesn't overwrite a file with the same name already available, even if the latest file is returned anyway. So the old versions basically pile up and have to be manually remove every now and then. Hopefully the environment is only seldom recreated, so the storage usage is not a concern.
As usual, pipelines for MRs that change the pipeline image itself are bound to fail. A demo pipeline is https://gitlab.winehq.org/giomasce/vkd3d/-/pipelines/20433.