mesa/.gitlab-ci/windows
Erik Faye-Lund c42da6dd60 ci: do not specify c_std and cpp_std for windows-build
When parts of the tree needs later c and c++ versions, they should ask
for it in the build-system itself, not expect the user to ask for it on
the command-line instead. So let's not paper over things by specifying
them here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>
2022-04-05 16:58:56 +00:00
..
Dockerfile_build ci/windows: Use 2 container stages 2022-01-21 22:38:16 +00:00
Dockerfile_test ci/windows: Use 2 container stages 2022-01-21 22:38:16 +00:00
mesa_build.ps1 ci: do not specify c_std and cpp_std for windows-build 2022-04-05 16:58:56 +00:00
mesa_container.ps1 ci/windows: Use 2 container stages 2022-01-21 22:38:16 +00:00
mesa_deps_build.ps1 ci/windows: Use 2 container stages 2022-01-21 22:38:16 +00:00
mesa_deps_test.ps1 ci/windows: Use 2 container stages 2022-01-21 22:38:16 +00:00
mesa_deps_vs2019.ps1 CI: windows: split the layers to meet new registry requirements 2021-01-29 17:54:56 +00:00
piglit_run.ps1 CI/windows: Move reference files to relevant ci subdirectories 2021-12-01 18:26:15 +00:00
README.md CI: Add native Windows VS2019 build 2020-03-27 10:32:47 +00:00
spirv2dxil_check.ps1 ci/windows: normalize line endings 2022-01-19 15:17:17 +00:00
spirv2dxil_run.ps1 ci/windows: normalize line endings 2022-01-19 15:17:17 +00:00

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.