ci/msvc: Install graphics tools(DirectX debug layer) easy to stuck, place it at the beginning

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26736>
This commit is contained in:
Yonggang Luo 2023-12-20 04:39:56 +08:00 committed by Marge Bot
parent 09ca7b3d9e
commit 9e89e7a7c2

View File

@ -9,6 +9,27 @@ Foreach ($file in (Get-ChildItem -Path "$certdir\*" -Include "*.crt")) {
}
Remove-Item -Recurse -Path $certdir
Get-Date
Write-Host "Installing graphics tools (DirectX debug layer)"
Set-Service -Name wuauserv -StartupType Manual
if (!$?) {
Write-Host "Failed to enable Windows Update"
Exit 1
}
For ($i = 0; $i -lt 5; $i++) {
Dism /online /quiet /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0
$graphics_tools_installed = $?
if ($graphics_tools_installed) {
Break
}
}
if (!$graphics_tools_installed) {
Write-Host "Failed to install graphics tools"
Get-Content C:\Windows\Logs\DISM\dism.log
Exit 1
}
Get-Date
Write-Host "Installing Chocolatey"
@ -72,24 +93,3 @@ if (!$?) {
}
Remove-Item C:\vulkan-runtime.exe -Force
Get-Date
Write-Host "Installing graphics tools (DirectX debug layer)"
Set-Service -Name wuauserv -StartupType Manual
if (!$?) {
Write-Host "Failed to enable Windows Update"
Exit 1
}
For ($i = 0; $i -lt 5; $i++) {
Dism /online /quiet /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0
$graphics_tools_installed = $?
if ($graphics_tools_installed) {
Break
}
}
if (!$graphics_tools_installed) {
Write-Host "Failed to install graphics tools"
Get-Content C:\Windows\Logs\DISM\dism.log
Exit 1
}