ci/msvc: Upgrade to vs2022 build tools

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 2022-06-08 14:20:15 +08:00 committed by Marge Bot
parent 25a560b622
commit 24c40cafc4

View File

@ -1,20 +1,20 @@
# we want more secure TLS 1.2 for most things
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
# VS16.x is 2019
$msvc_url = 'https://aka.ms/vs/16/release/vs_buildtools.exe'
# VS17.x is 2022
$msvc_url = 'https://aka.ms/vs/17/release/vs_buildtools.exe'
Write-Host "Downloading Visual Studio 2019 build tools at:"
Write-Host "Downloading Visual Studio 2022 build tools at:"
Get-Date
Invoke-WebRequest -Uri $msvc_url -OutFile C:\vs_buildtools.exe
Write-Host "Installing Visual Studio 2019 at:"
Write-Host "Installing Visual Studio 2022 at:"
Get-Date
# Command line
# https://docs.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2019
# https://docs.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2022
# Component ids
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2019
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2022
Start-Process -NoNewWindow -Wait -FilePath C:\vs_buildtools.exe `
-ArgumentList `
"--wait", `
@ -37,7 +37,7 @@ if (!$?) {
}
Remove-Item C:\vs_buildtools.exe -Force
Write-Host "Installing Visual Studio 2019 finished at:"
Write-Host "Installing Visual Studio 2022 finished at:"
Get-Date
Exit 0