Skip to content

Commit ff03609

Browse files
committed
Simplify Vulkan SDK installation on Windows
- Replace verbose manual steps with streamlined direct download and silent installation. - Remove redundant installation checks and improve debug output for validation.
1 parent 99f2944 commit ff03609

File tree

1 file changed

+16
-36
lines changed

1 file changed

+16
-36
lines changed

.github/workflows/workflow.yml

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -69,58 +69,38 @@ jobs:
6969
fi
7070
- os: windows-latest
7171
vulkan-install: |
72-
# Get the latest Vulkan SDK version
73-
$vulkanVersion = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest/windows.txt" -UseBasicParsing).Content.Trim()
74-
echo "Using Vulkan SDK version: $vulkanVersion"
75-
76-
# Download the Vulkan SDK installer with progress
77-
echo "Downloading Vulkan SDK installer..."
78-
$downloadUrl = "https://sdk.lunarg.com/sdk/download/$vulkanVersion/windows/VulkanSDK-$vulkanVersion-Installer.exe"
79-
echo "Download URL: $downloadUrl"
80-
81-
# Create a WebClient to show download progress
82-
$webClient = New-Object System.Net.WebClient
83-
$webClient.DownloadFile($downloadUrl, "$env:TEMP\vulkan-sdk.exe")
84-
echo "Download completed to: $env:TEMP\vulkan-sdk.exe"
85-
86-
# Verify the installer exists
87-
if (Test-Path "$env:TEMP\vulkan-sdk.exe") {
88-
echo "Installer file exists and is ready"
89-
echo "File size: $((Get-Item "$env:TEMP\vulkan-sdk.exe").Length) bytes"
90-
} else {
91-
echo "Installer file does not exist! Download failed."
92-
exit 1
93-
}
72+
# Download the Vulkan SDK installer
73+
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe" -OutFile "$env:TEMP\vulkan-sdk.exe"
9474
9575
# Run the installer with silent options
96-
$installArgs = "--accept-licenses --default-answer --confirm-command install"
97-
echo "Running installer with arguments: $installArgs"
98-
Start-Process -FilePath "$env:TEMP\vulkan-sdk.exe" -ArgumentList $installArgs -Wait -NoNewWindow
99-
echo "Installer process completed"
76+
Start-Process -FilePath "$env:TEMP\vulkan-sdk.exe" -ArgumentList "--accept-licenses --default-answer --confirm-command install" -Wait -NoNewWindow
10077
10178
# Find the actual installed SDK version
102-
echo "Checking for installed SDK..."
103-
if (Test-Path "C:\VulkanSDK") {
104-
echo "VulkanSDK directory exists"
105-
Get-ChildItem "C:\VulkanSDK" | ForEach-Object { echo "Found: $($_.FullName)" }
10679
$vulkanPath = Get-ChildItem "C:\VulkanSDK" | Sort-Object -Property Name -Descending | Select-Object -First 1 -ExpandProperty FullName
107-
} else {
108-
echo "VulkanSDK directory does not exist!"
109-
}
11080
11181
if (-not $vulkanPath) {
112-
echo "Could not find specific version directory, using latest"
11382
$vulkanPath = "C:\VulkanSDK\latest"
11483
}
11584
116-
echo "Using Vulkan SDK path: $vulkanPath"
117-
11885
# Set environment variables with correct Windows-style paths
11986
echo "VULKAN_SDK=$vulkanPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
12087
echo "$vulkanPath\Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
12188
echo "CMAKE_PREFIX_PATH=$vulkanPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
12289
echo "Vulkan_INCLUDE_DIR=$vulkanPath\Include" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
12390
echo "Vulkan_LIBRARY=$vulkanPath\Lib\vulkan-1.lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
91+
92+
# Display debug information
93+
Write-Host "Vulkan SDK path: $vulkanPath"
94+
if (Test-Path "$vulkanPath\Lib") {
95+
Write-Host "Lib directory exists"
96+
} else {
97+
Write-Host "Lib directory does not exist"
98+
}
99+
if (Test-Path "$vulkanPath\Include") {
100+
Write-Host "Include directory exists"
101+
} else {
102+
Write-Host "Include directory does not exist"
103+
}
124104
deps-install: |
125105
vcpkg install glfw3:x64-windows glm:x64-windows tinyobjloader:x64-windows stb:x64-windows
126106
echo "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> $env:GITHUB_ENV

0 commit comments

Comments
 (0)