From 24e177aff23f70be8fffdd2a578efe98cfa6927a Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 1 Jun 2022 23:47:37 +0800 Subject: [PATCH] ci/vs2019: Use shared VULKAN_SDK_VERSION for install and build vulkan related packages Get `Vulkan-SDK` `Vulkan-Runtime` `SPIRV-Tools` and `SPIRV-Headers` to be consistence version Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Part-of: --- .gitlab-ci/windows/Dockerfile_build | 1 + .gitlab-ci/windows/mesa_deps_build.ps1 | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/windows/Dockerfile_build b/.gitlab-ci/windows/Dockerfile_build index f10460b..71353c9 100644 --- a/.gitlab-ci/windows/Dockerfile_build +++ b/.gitlab-ci/windows/Dockerfile_build @@ -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 diff --git a/.gitlab-ci/windows/mesa_deps_build.ps1 b/.gitlab-ci/windows/mesa_deps_build.ps1 index 9138d4b..e629457 100644 --- a/.gitlab-ci/windows/mesa_deps_build.ps1 +++ b/.gitlab-ci/windows/mesa_deps_build.ps1 @@ -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 (!$?) { -- 2.7.4