• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_vs_init.ps1"
34 
35 $depsInstallPath="C:\mesa-deps"
36 
37 Push-Location $builddir
38 
39 meson `
40 --default-library=shared `
41 -Dzlib:default_library=static `
42 --buildtype=release `
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 -Dshared-glapi=enabled `
53 -Dgles2=enabled `
54 -Dmicrosoft-clc=enabled `
55 -Dstatic-libclc=all `
56 -Dspirv-to-dxil=true `
57 -Dbuild-tests=true `
58 -Dwerror=true `
59 -Dwarning_level=2 `
60 -Dzlib:warning_level=1 `
61 -Dlibelf:warning_level=1 `
62 $sourcedir && `
63 meson install --skip-subprojects && `
64 meson test --num-processes 32 --print-errorlogs
65 
66 $buildstatus = $?
67 Pop-Location
68 
69 Get-Date
70 
71 if (!$buildstatus) {
72   Write-Host "Mesa build or test failed"
73   Exit 1
74 }
75 
76 Copy-Item ".\.gitlab-ci\windows\piglit_run.ps1" -Destination $installdir
77 
78 Copy-Item ".\.gitlab-ci\windows\spirv2dxil_check.ps1" -Destination $installdir
79 Copy-Item ".\.gitlab-ci\windows\spirv2dxil_run.ps1" -Destination $installdir
80 
81 Copy-Item ".\.gitlab-ci\windows\deqp_runner_run.ps1" -Destination $installdir
82 Copy-Item ".\src\microsoft\ci\deqp-dozen.toml" -Destination $installdir
83 
84 Get-ChildItem -Recurse -Filter "ci" | Get-ChildItem -Filter "*.txt" | Copy-Item -Destination $installdir
85