2022-06-01 22:31:14 +01:00
|
|
|
# Clear CI_COMMIT_MESSAGE and CI_COMMIT_DESCRIPTION for please meson
|
|
|
|
# when the commit message is complicated
|
|
|
|
$env:CI_COMMIT_MESSAGE=""
|
|
|
|
$env:CI_COMMIT_DESCRIPTION=""
|
|
|
|
|
2020-03-24 11:11:36 +00:00
|
|
|
# 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
|
|
|
|
|
2021-06-22 11:42:50 +01:00
|
|
|
$env:PYTHONUTF8=1
|
|
|
|
|
2020-03-24 11:11:36 +00:00
|
|
|
Get-Date
|
|
|
|
Write-Host "Compiling Mesa"
|
2022-03-26 02:31:50 +00:00
|
|
|
$builddir = New-Item -Force -ItemType Directory -Name "_build"
|
|
|
|
$installdir = New-Item -Force -ItemType Directory -Name "_install"
|
|
|
|
$builddir=$builddir.FullName
|
|
|
|
$installdir=$installdir.FullName
|
|
|
|
$sourcedir=$PWD
|
|
|
|
|
|
|
|
Remove-Item -Recurse -Force $builddir
|
|
|
|
Remove-Item -Recurse -Force $installdir
|
|
|
|
New-Item -ItemType Directory -Path $builddir
|
|
|
|
New-Item -ItemType Directory -Path $installdir
|
|
|
|
|
2022-06-10 10:14:25 +01:00
|
|
|
Write-Output "*" > $builddir\.gitignore
|
|
|
|
Write-Output "*" > $installdir\.gitignore
|
|
|
|
|
2022-03-26 02:31:50 +00:00
|
|
|
Write-Output builddir:$builddir
|
|
|
|
Write-Output installdir:$installdir
|
|
|
|
Write-Output sourcedir:$sourcedir
|
|
|
|
|
2022-06-01 15:47:37 +01:00
|
|
|
$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
|
|
|
|
. "$MyPath\mesa_vs_init.ps1"
|
2022-03-26 02:31:50 +00:00
|
|
|
|
2022-06-01 16:48:45 +01:00
|
|
|
$depsInstallPath="C:\mesa-deps"
|
|
|
|
|
2022-03-26 02:31:50 +00:00
|
|
|
Push-Location $builddir
|
|
|
|
|
2022-06-01 15:43:23 +01:00
|
|
|
meson `
|
|
|
|
--default-library=shared `
|
|
|
|
-Dzlib:default_library=static `
|
|
|
|
--buildtype=release `
|
|
|
|
-Db_ndebug=false `
|
|
|
|
-Db_vscrt=mt `
|
2022-06-01 16:48:45 +01:00
|
|
|
--cmake-prefix-path="$depsInstallPath" `
|
|
|
|
--pkg-config-path="$depsInstallPath\lib\pkgconfig;$depsInstallPath\share\pkgconfig" `
|
2022-03-26 02:31:50 +00:00
|
|
|
--prefix="$installdir" `
|
2022-06-01 15:43:23 +01:00
|
|
|
-Dllvm=enabled `
|
|
|
|
-Dshared-llvm=disabled `
|
|
|
|
-Dvulkan-drivers="swrast,amd,microsoft-experimental" `
|
|
|
|
-Dgallium-drivers="swrast,d3d12,zink" `
|
|
|
|
-Dshared-glapi=enabled `
|
|
|
|
-Dgles2=enabled `
|
|
|
|
-Dmicrosoft-clc=enabled `
|
|
|
|
-Dstatic-libclc=all `
|
|
|
|
-Dspirv-to-dxil=true `
|
|
|
|
-Dbuild-tests=true `
|
|
|
|
-Dwerror=true `
|
|
|
|
-Dwarning_level=2 `
|
|
|
|
-Dzlib:warning_level=1 `
|
|
|
|
-Dlibelf:warning_level=1 `
|
2022-06-14 09:59:38 +01:00
|
|
|
$sourcedir && `
|
|
|
|
meson install --skip-subprojects && `
|
|
|
|
meson test --num-processes 32
|
2022-03-26 02:31:50 +00:00
|
|
|
|
2020-03-24 11:11:36 +00:00
|
|
|
$buildstatus = $?
|
|
|
|
Pop-Location
|
|
|
|
|
|
|
|
Get-Date
|
|
|
|
|
|
|
|
if (!$buildstatus) {
|
|
|
|
Write-Host "Mesa build or test failed"
|
|
|
|
Exit 1
|
|
|
|
}
|
2020-12-02 10:28:31 +00:00
|
|
|
|
|
|
|
Copy-Item ".\.gitlab-ci\windows\piglit_run.ps1" -Destination $installdir
|
2021-11-03 18:36:01 +00:00
|
|
|
|
|
|
|
Copy-Item ".\.gitlab-ci\windows\spirv2dxil_check.ps1" -Destination $installdir
|
|
|
|
Copy-Item ".\.gitlab-ci\windows\spirv2dxil_run.ps1" -Destination $installdir
|
2021-11-21 15:22:59 +00:00
|
|
|
|
2022-02-10 16:03:57 +00:00
|
|
|
Copy-Item ".\.gitlab-ci\windows\deqp_runner_run.ps1" -Destination $installdir
|
|
|
|
|
2021-11-21 15:22:59 +00:00
|
|
|
Get-ChildItem -Recurse -Filter "ci" | Get-ChildItem -Filter "*.txt" | Copy-Item -Destination $installdir
|