diff options
Diffstat (limited to '.ci/scripts/windows/install-vulkan-sdk.ps1')
| -rw-r--r-- | .ci/scripts/windows/install-vulkan-sdk.ps1 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.ci/scripts/windows/install-vulkan-sdk.ps1 b/.ci/scripts/windows/install-vulkan-sdk.ps1 new file mode 100644 index 000000000..de218d90a --- /dev/null +++ b/.ci/scripts/windows/install-vulkan-sdk.ps1 | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | # SPDX-FileCopyrightText: 2023 yuzu Emulator Project | ||
| 2 | # SPDX-License-Identifier: GPL-3.0-or-later | ||
| 3 | |||
| 4 | $ErrorActionPreference = "Stop" | ||
| 5 | |||
| 6 | $VulkanSDKVer = "1.3.250.1" | ||
| 7 | $ExeFile = "VulkanSDK-$VulkanSDKVer-Installer.exe" | ||
| 8 | $Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile" | ||
| 9 | $Destination = "./$ExeFile" | ||
| 10 | |||
| 11 | echo "Downloading Vulkan SDK $VulkanSDKVer from $Uri" | ||
| 12 | $WebClient = New-Object System.Net.WebClient | ||
| 13 | $WebClient.DownloadFile($Uri, $Destination) | ||
| 14 | echo "Finished downloading $ExeFile" | ||
| 15 | |||
| 16 | $VULKAN_SDK = "C:/VulkanSDK/$VulkanSDKVer" | ||
| 17 | $Arguments = "--root `"$VULKAN_SDK`" --accept-licenses --default-answer --confirm-command install" | ||
| 18 | |||
| 19 | echo "Installing Vulkan SDK $VulkanSDKVer" | ||
| 20 | $InstallProcess = Start-Process -FilePath $Destination -NoNewWindow -PassThru -Wait -ArgumentList $Arguments | ||
| 21 | $ExitCode = $InstallProcess.ExitCode | ||
| 22 | |||
| 23 | if ($ExitCode -ne 0) { | ||
| 24 | echo "Error installing Vulkan SDK $VulkanSDKVer (Error: $ExitCode)" | ||
| 25 | Exit $ExitCode | ||
| 26 | } | ||
| 27 | |||
| 28 | echo "Finished installing Vulkan SDK $VulkanSDKVer" | ||
| 29 | |||
| 30 | if ("$env:GITHUB_ACTIONS" -eq "true") { | ||
| 31 | echo "VULKAN_SDK=$VULKAN_SDK" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
| 32 | echo "$VULKAN_SDK/Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
| 33 | } | ||