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:
@@ -3,6 +3,9 @@
|
||||
ARG base_image
|
||||
FROM ${base_image}
|
||||
|
||||
COPY mesa_deps_vulkan_sdk.ps1 C:\
|
||||
RUN C:\mesa_deps_vulkan_sdk.ps1
|
||||
|
||||
COPY mesa_deps_build.ps1 C:\
|
||||
RUN C:\mesa_deps_build.ps1
|
||||
|
||||
|
@@ -3,5 +3,8 @@
|
||||
ARG base_image
|
||||
FROM ${base_image}
|
||||
|
||||
COPY mesa_deps_vulkan_sdk.ps1 C:\
|
||||
RUN C:\mesa_deps_vulkan_sdk.ps1
|
||||
|
||||
COPY mesa_deps_test.ps1 C:\
|
||||
RUN C:\mesa_deps_test.ps1
|
||||
|
@@ -14,12 +14,12 @@ RUN Write-Output $PSVersionTable $ErrorActionPreference
|
||||
|
||||
COPY mesa_deps_vs2019.ps1 C:\
|
||||
RUN C:\mesa_deps_vs2019.ps1
|
||||
COPY mesa_vs_init.ps1 C:\
|
||||
|
||||
ENV VULKAN_SDK_VERSION='1.3.211.0'
|
||||
COPY mesa_deps_choco.ps1 C:\
|
||||
RUN C:\mesa_deps_choco.ps1
|
||||
|
||||
COPY mesa_vs_init.ps1 C:\
|
||||
|
||||
# Example usage:
|
||||
# `base_image` should use windows image that can be run with `--isolation=process` option,
|
||||
# since the resulting container will want to be used that way be later containers in the build process.
|
||||
|
@@ -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
|
||||
|
||||
|
39
.gitlab-ci/windows/mesa_deps_vulkan_sdk.ps1
Normal file
39
.gitlab-ci/windows/mesa_deps_vulkan_sdk.ps1
Normal file
@@ -0,0 +1,39 @@
|
||||
# Downloading specified vulkan sdk and vulkan runtime
|
||||
# Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG
|
||||
# This file needs run in administrator mode
|
||||
|
||||
$env:VULKAN_SDK_VERSION="1.3.211.0"
|
||||
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
|
||||
# Save environment VULKAN_SDK_VERSION to system
|
||||
[System.Environment]::SetEnvironmentVariable('VULKAN_SDK_VERSION', "$env:VULKAN_SDK_VERSION", [System.EnvironmentVariableTarget]::Machine)
|
||||
|
||||
$VULKAN_SDK_URL="https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanSDK-$env:VULKAN_SDK_VERSION-Installer.exe"
|
||||
Write-Host "Downloading Vulkan-SDK $VULKAN_SDK_URL at:"
|
||||
Get-Date
|
||||
Invoke-WebRequest -Uri "$VULKAN_SDK_URL" -OutFile "${env:TMP}\vulkan_sdk.exe" | Out-Null
|
||||
Write-Host "Installing Vulkan-SDK at:"
|
||||
Get-Date
|
||||
Start-Process -NoNewWindow -Wait "${env:TMP}\vulkan_sdk.exe" -ArgumentList "--am --al -c in"
|
||||
if (!$?) {
|
||||
Write-Host "Failed to install Vulkan SDK"
|
||||
Exit 1
|
||||
}
|
||||
Remove-Item "${env:TMP}\vulkan_sdk.exe" -Force
|
||||
|
||||
$VULKAN_RUNTIME_URL="https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanRT-$env:VULKAN_SDK_VERSION-Installer.exe"
|
||||
Write-Host "Downloading Vulkan-Runtime $VULKAN_RUNTIME_URL at:"
|
||||
Get-Date
|
||||
Invoke-WebRequest -Uri "$VULKAN_RUNTIME_URL" -OutFile "${env:TMP}\vulkan-runtime.exe" | Out-Null
|
||||
Write-Host "Installing Vulkan-Runtime at:"
|
||||
Get-Date
|
||||
Start-Process -NoNewWindow -Wait "${env:TMP}\vulkan-runtime.exe" -ArgumentList '/S'
|
||||
if (!$?) {
|
||||
Write-Host "Failed to install Vulkan-Runtime"
|
||||
Exit 1
|
||||
}
|
||||
Remove-Item "${env:TMP}\vulkan-runtime.exe" -Force
|
||||
|
||||
Write-Host "Installing Vulkan-Runtime finished at:"
|
||||
Get-Date
|
Reference in New Issue
Block a user