07885cbcdb
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>
20 lines
634 B
PowerShell
20 lines
634 B
PowerShell
# 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
|
|
}
|