1bf215546Sopenharmony_ci# Native Windows GitLab CI builds 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ciUnlike Linux, Windows cannot reuse the freedesktop ci-templates as they exist 4bf215546Sopenharmony_cias we do not have Podman, Skopeo, or even Docker-in-Docker builds available 5bf215546Sopenharmony_ciunder Windows. 6bf215546Sopenharmony_ci 7bf215546Sopenharmony_ciWe still reuse the same model: build a base container with the core operating 8bf215546Sopenharmony_cisystem and infrequently-changed build dependencies, then execute Mesa builds 9bf215546Sopenharmony_cionly inside that base container. This is open-coded in PowerShell scripts. 10bf215546Sopenharmony_ci 11bf215546Sopenharmony_ci## Base container build 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ciThe base container build job executes the `mesa_container.ps1` script which 14bf215546Sopenharmony_cireproduces the ci-templates behaviour. It looks for the registry image in 15bf215546Sopenharmony_cithe user's namespace, and exits if found. If not found, it tries to copy 16bf215546Sopenharmony_cithe same image tag from the upstream Mesa repository. If that is not found, 17bf215546Sopenharmony_cithe image is rebuilt inside the user's namespace. 18bf215546Sopenharmony_ci 19bf215546Sopenharmony_ciThe rebuild executes `docker build` which calls `mesa_deps.ps1` inside the 20bf215546Sopenharmony_cicontainer to fetch and install all build dependencies. This includes Visual 21bf215546Sopenharmony_ciStudio Community Edition (downloaded from Microsoft, under the license which 22bf215546Sopenharmony_ciallows use by open-source projects), other build tools from Chocolatey, and 23bf215546Sopenharmony_cifinally Meson and Python dependencies from PyPI. 24bf215546Sopenharmony_ci 25bf215546Sopenharmony_ciThis job is executed inside a Windows shell environment directly inside the 26bf215546Sopenharmony_cihost, without Docker. 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_ci## Mesa build 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ciThe Mesa build runs inside the base container, executing `mesa_build.ps1`. 31bf215546Sopenharmony_ciThis simply compiles Mesa using Meson and Ninja, executing the build and 32bf215546Sopenharmony_ciunit tests. Currently, no build artifacts are captured. 33bf215546Sopenharmony_ci 34bf215546Sopenharmony_ci## Using build scripts locally 35bf215546Sopenharmony_ci 36bf215546Sopenharmony_ci`*.ps1` scripts for building dockers are using PowerShell 7 to run 37