ci/vs2019: Use shared VULKAN_SDK_VERSION for install and build vulkan related packages
authorYonggang Luo <luoyonggang@gmail.com>
Wed, 1 Jun 2022 15:47:37 +0000 (23:47 +0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 14 Jun 2022 21:14:33 +0000 (21:14 +0000)
Get `Vulkan-SDK` `Vulkan-Runtime` `SPIRV-Tools` and `SPIRV-Headers` to be consistence version

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/16934>

.gitlab-ci/windows/Dockerfile_build
.gitlab-ci/windows/mesa_deps_build.ps1

index f10460b..71353c9 100644 (file)
@@ -13,5 +13,6 @@ SHELL ["pwsh", "-ExecutionPolicy", "RemoteSigned", "-Command", "$ErrorActionPref
 COPY mesa_deps_vs2019.ps1 C:\
 RUN C:\mesa_deps_vs2019.ps1
 
+ENV VULKAN_SDK_VERSION='1.3.211.0'
 COPY mesa_deps_build.ps1 C:\
 RUN C:\mesa_deps_build.ps1
index 9138d4b..e629457 100644 (file)
@@ -41,7 +41,7 @@ Update-SessionEnvironment
 # until we start a new shell
 $env:PATH = "C:\python3;C:\python3\scripts;C:\Program Files\CMake\bin;$env:PATH"
 
-Invoke-WebRequest -Uri 'https://sdk.lunarg.com/sdk/download/latest/windows/vulkan_sdk.exe' -OutFile 'C:\vulkan_sdk.exe'
+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"
@@ -115,12 +115,12 @@ Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $llvm_build
 
 Get-Date
 Write-Host "Cloning SPIRV-Tools"
-git clone https://github.com/KhronosGroup/SPIRV-Tools
+git clone -b "sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Tools
 if (!$?) {
   Write-Host "Failed to clone SPIRV-Tools repository"
   Exit 1
 }
-git clone https://github.com/KhronosGroup/SPIRV-Headers SPIRV-Tools/external/SPIRV-Headers
+git clone -b "sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Headers SPIRV-Tools/external/SPIRV-Headers
 if (!$?) {
   Write-Host "Failed to clone SPIRV-Headers repository"
   Exit 1
@@ -140,7 +140,7 @@ if (!$buildstatus) {
 
 Get-Date
 Write-Host "Downloading Vulkan-Runtime"
-Invoke-WebRequest -Uri 'https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-runtime.exe' -OutFile 'C:\vulkan-runtime.exe' | Out-Null
+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 (!$?) {