diff options
author | Daniel Stone <[email protected]> | 2020-03-24 11:11:36 +0000 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2020-03-27 10:32:47 +0000 |
commit | 07885cbcdb0b19265379c3941600faadc8a22d71 (patch) | |
tree | d4df0e4044fbe59fa5a0b03a812822da703afeb6 /.gitlab-ci/windows/mesa_build.ps1 | |
parent | bc98de4d14f9c099e47a7de6efc3766823ca3f54 (diff) |
CI: Add native Windows VS2019 build
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Acked-by: Jose Fonseca <[email protected]>
Acked-by: Brian Paul <[email protected]>
Acked-by: Eric Engestrom <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
Diffstat (limited to '.gitlab-ci/windows/mesa_build.ps1')
-rw-r--r-- | .gitlab-ci/windows/mesa_build.ps1 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.gitlab-ci/windows/mesa_build.ps1 b/.gitlab-ci/windows/mesa_build.ps1 new file mode 100644 index 00000000000..8d7b79c6497 --- /dev/null +++ b/.gitlab-ci/windows/mesa_build.ps1 @@ -0,0 +1,19 @@ +# force the CA cert cache to be rebuilt, in case Meson tries to access anything +Write-Host "Refreshing Windows TLS CA cache" +(New-Object System.Net.WebClient).DownloadString("https://github.com") >$null + +Get-Date +Write-Host "Compiling Mesa" +$builddir = New-Item -ItemType Directory -Name "build" +Push-Location $builddir.FullName +cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson -Dgallium-drivers=swrast -Dbuild-tests=true .. && ninja test" +$buildstatus = $? +Pop-Location +Remove-Item -Recurse -Path $builddir + +Get-Date + +if (!$buildstatus) { + Write-Host "Mesa build or test failed" + Exit 1 +} |