1 # Clear CI_COMMIT_MESSAGE and CI_COMMIT_DESCRIPTION for please meson 2 # when the commit message is complicated 3 $env:CI_COMMIT_MESSAGE="" 4 $env:CI_COMMIT_DESCRIPTION="" 5 6 # force the CA cert cache to be rebuilt, in case Meson tries to access anything 7 Write-Host "Refreshing Windows TLS CA cache" 8 (New-Object System.Net.WebClient).DownloadString("https://github.com") >$null 9 10 $env:PYTHONUTF8=1 11 12 Get-Date 13 Write-Host "Compiling Mesa" 14 $builddir = New-Item -Force -ItemType Directory -Name "_build" 15 $installdir = New-Item -Force -ItemType Directory -Name "_install" 16 $builddir=$builddir.FullName 17 $installdir=$installdir.FullName 18 $sourcedir=$PWD 19 20 Remove-Item -Recurse -Force $builddir 21 Remove-Item -Recurse -Force $installdir 22 New-Item -ItemType Directory -Path $builddir 23 New-Item -ItemType Directory -Path $installdir 24 25 Write-Output "*" > $builddir\.gitignore 26 Write-Output "*" > $installdir\.gitignore 27 28 Write-Output builddir:$builddir 29 Write-Output installdir:$installdir 30 Write-Output sourcedir:$sourcedir 31 32 $MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent 33 . "$MyPath\mesa_init_msvc.ps1" 34 35 $depsInstallPath="C:\mesa-deps" 36 37 Push-Location $builddir 38 39 meson setup ` 40 --default-library=shared ` 41 --buildtype=release ` 42 --wrap-mode=nodownload ` 43 -Db_ndebug=false ` 44 -Db_vscrt=mt ` 45 --cmake-prefix-path="$depsInstallPath" ` 46 --pkg-config-path="$depsInstallPath\lib\pkgconfig;$depsInstallPath\share\pkgconfig" ` 47 --prefix="$installdir" ` 48 -Dllvm=enabled ` 49 -Dshared-llvm=disabled ` 50 -Dvulkan-drivers="swrast,amd,microsoft-experimental" ` 51 -Dgallium-drivers="swrast,d3d12,zink" ` 52 -Dgallium-va=enabled ` 53 -Dvideo-codecs="all" ` 54 -Dshared-glapi=enabled ` 55 -Dgles1=enabled ` 56 -Dgles2=enabled ` 57 -Dgallium-opencl=icd ` 58 -Dgallium-rusticl=false ` 59 -Dmicrosoft-clc=enabled ` 60 -Dstatic-libclc=all ` 61 -Dspirv-to-dxil=true ` 62 -Dbuild-tests=true ` 63 -Dwerror=true ` 64 -Dwarning_level=2 ` 65 $sourcedir && ` 66 meson install && ` 67 meson test --num-processes 32 --print-errorlogs 68 69 $buildstatus = $? 70 Pop-Location 71 72 Get-Date 73 74 if (!$buildstatus) { 75 Write-Host "Mesa build or test failed" 76 Exit 1 77 } 78 79 Copy-Item ".\.gitlab-ci\windows\piglit_run.ps1" -Destination $installdir 80 81 Copy-Item ".\.gitlab-ci\windows\spirv2dxil_check.ps1" -Destination $installdir 82 Copy-Item ".\.gitlab-ci\windows\spirv2dxil_run.ps1" -Destination $installdir 83 84 Copy-Item ".\.gitlab-ci\windows\deqp_runner_run.ps1" -Destination $installdir 85 86 Copy-Item ".\.gitlab-ci\windows\vainfo_run.ps1" -Destination $installdir 87 88 Get-ChildItem -Recurse -Filter "ci" | Get-ChildItem -Include "*.txt","*.toml" | Copy-Item -Destination $installdir 89