Adds a native build of Mesa using Meson with the Visual Studio 2019 toolchain on a Windows host. Though Docker is supported on Windows, Docker-in-Docker is not possible, nor are podman and skopeo available. We handle this by creating the container from a shell-executor Windows machine, which gives us a native PowerShell that we can execute Docker from. This attempts to do the same copy-from-upstream-or-create-if-not-exists optimisation as the ci-templates do for our Linux builds, albeit open-coded in PowerShell. The Mesa build itself is executed inside a container, using Meson and Ninja. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jose Fonseca <jfonseca@vmware.com> Acked-by: Brian Paul <brianp@vmware.com> Acked-by: Eric Engestrom <eric@engestrom.ch> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
33 lines
1.4 KiB
Markdown
33 lines
1.4 KiB
Markdown
# Native Windows GitLab CI builds
|
|
|
|
Unlike Linux, Windows cannot reuse the freedesktop ci-templates as they exist
|
|
as we do not have Podman, Skopeo, or even Docker-in-Docker builds available
|
|
under Windows.
|
|
|
|
We still reuse the same model: build a base container with the core operating
|
|
system and infrequently-changed build dependencies, then execute Mesa builds
|
|
only inside that base container. This is open-coded in PowerShell scripts.
|
|
|
|
## Base container build
|
|
|
|
The base container build job executes the `mesa_container.ps1` script which
|
|
reproduces the ci-templates behaviour. It looks for the registry image in
|
|
the user's namespace, and exits if found. If not found, it tries to copy
|
|
the same image tag from the upstream Mesa repository. If that is not found,
|
|
the image is rebuilt inside the user's namespace.
|
|
|
|
The rebuild executes `docker build` which calls `mesa_deps.ps1` inside the
|
|
container to fetch and install all build dependencies. This includes Visual
|
|
Studio Community Edition (downloaded from Microsoft, under the license which
|
|
allows use by open-source projects), other build tools from Chocolatey, and
|
|
finally Meson and Python dependencies from PyPI.
|
|
|
|
This job is executed inside a Windows shell environment directly inside the
|
|
host, without Docker.
|
|
|
|
## Mesa build
|
|
|
|
The Mesa build runs inside the base container, executing `mesa_build.ps1`.
|
|
This simply compiles Mesa using Meson and Ninja, executing the build and
|
|
unit tests. Currently, no build artifacts are captured.
|