ci/msvc: Split install vulkan sdk out of choco
packaging are installed because python 3.12 need it Install of vulkan-sdk improved so that it's can be running in non-docker environment Now vulkan-sdk have separate script so that it can be updated without update MSVC THe choco installed packages is almost freeze to update, so split install of vulkan sdk out of it for avoid update it when update VULKAN_SDK_VERSION on local computer --params="/InstallDir:C:\python3" won't take effect, drop it for not misleading 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:
@@ -1,6 +1,6 @@
|
||||
# Download new TLS certs from Windows Update
|
||||
Write-Host "Updating TLS certificate store at:"
|
||||
Get-Date
|
||||
Write-Host "Updating TLS certificate store"
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "_tlscerts" | Out-Null
|
||||
$certdir = (New-Item -ItemType Directory -Name "_tlscerts")
|
||||
certutil -syncwithWU "$certdir"
|
||||
@@ -9,8 +9,8 @@ Foreach ($file in (Get-ChildItem -Path "$certdir\*" -Include "*.crt")) {
|
||||
}
|
||||
Remove-Item -Recurse -Path $certdir
|
||||
|
||||
Write-Host "Installing graphics tools (DirectX debug layer) at:"
|
||||
Get-Date
|
||||
Write-Host "Installing graphics tools (DirectX debug layer)"
|
||||
Set-Service -Name wuauserv -StartupType Manual
|
||||
if (!$?) {
|
||||
Write-Host "Failed to enable Windows Update"
|
||||
@@ -31,17 +31,19 @@ if (!$graphics_tools_installed) {
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Installing Chocolatey at:"
|
||||
Get-Date
|
||||
Write-Host "Installing Chocolatey"
|
||||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
Import-Module "$env:ProgramData\chocolatey\helpers\chocolateyProfile.psm1"
|
||||
# Add Chocolatey's native install path
|
||||
Update-SessionEnvironment
|
||||
Write-Host "Installing Chocolatey packages"
|
||||
Write-Host "Installing Chocolatey packages at:"
|
||||
Get-Date
|
||||
|
||||
# Chocolatey tries to download winflexbison3 from github, which is not super reliable, and has no retry
|
||||
# loop of its own - so we give it a helping hand here
|
||||
For ($i = 0; $i -lt 5; $i++) {
|
||||
choco install --no-progress -y python3 --params="/InstallDir:C:\python3"
|
||||
choco install --no-progress -y python3
|
||||
$python_install = $?
|
||||
choco install --allow-empty-checksums --no-progress -y cmake git git-lfs ninja pkgconfiglite winflexbison3 --installargs "ADD_CMAKE_TO_PATH=System"
|
||||
$other_install = $?
|
||||
@@ -56,40 +58,20 @@ if (!$choco_installed) {
|
||||
Exit 1
|
||||
}
|
||||
|
||||
# Add Chocolatey's native install path
|
||||
# Add Chocolatey's newly installed package path
|
||||
Update-SessionEnvironment
|
||||
# Python and CMake add themselves to the system environment path, which doesn't get refreshed
|
||||
# until we start a new shell
|
||||
$env:PATH = "C:\python3;C:\python3\scripts;C:\Program Files\CMake\bin;$env:PATH"
|
||||
|
||||
Start-Process -NoNewWindow -Wait git -ArgumentList 'config --global core.autocrlf false'
|
||||
|
||||
Write-Host "Upgrading pip at:"
|
||||
Get-Date
|
||||
Write-Host "Installing Meson, Mako and numpy"
|
||||
pip3 install meson mako numpy --progress-bar off
|
||||
python -m pip install --upgrade pip --progress-bar off
|
||||
Write-Host "Installing python packages at:"
|
||||
Get-Date
|
||||
pip3 install packaging meson mako numpy --progress-bar off
|
||||
if (!$?) {
|
||||
Write-Host "Failed to install dependencies from pip"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Installing python packages finished at:"
|
||||
Get-Date
|
||||
Write-Host "Downloading Vulkan-SDK"
|
||||
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanSDK-$env:VULKAN_SDK_VERSION-Installer.exe" -OutFile 'C:\vulkan_sdk.exe'
|
||||
C:\vulkan_sdk.exe --am --al -c in
|
||||
if (!$?) {
|
||||
Write-Host "Failed to install Vulkan SDK"
|
||||
Exit 1
|
||||
}
|
||||
Remove-Item C:\vulkan_sdk.exe -Force
|
||||
|
||||
Get-Date
|
||||
Write-Host "Downloading Vulkan-Runtime"
|
||||
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanRT-$env:VULKAN_SDK_VERSION-Installer.exe" -OutFile 'C:\vulkan-runtime.exe' | Out-Null
|
||||
Write-Host "Installing Vulkan-Runtime"
|
||||
Start-Process -NoNewWindow -Wait C:\vulkan-runtime.exe -ArgumentList '/S'
|
||||
if (!$?) {
|
||||
Write-Host "Failed to install Vulkan-Runtime"
|
||||
Exit 1
|
||||
}
|
||||
Remove-Item C:\vulkan-runtime.exe -Force
|
||||
|
||||
|
Reference in New Issue
Block a user