Skip to content

Commit 4709c04

Browse files
committed
address windows sdk filename change for versions after Vulkan SDK 1.4.313.0, issue #498
1 parent 1bba155 commit 4709c04

File tree

7 files changed

+56
-20
lines changed

7 files changed

+56
-20
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- "It was a bright day in April, and the clocks were striking thirteen." - 1984
1313

14+
## [1.2.2] - 2025-05-06
15+
16+
### Fixed
17+
18+
- fixed SDK Installer filename for Windows downloads, [#498](https://github.com/jakoch/install-vulkan-sdk-action/issues/498)
19+
1420
## [1.2.1] - 2025-05-03
1521

1622
### Fixed
@@ -116,7 +122,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116122

117123
<!-- Section for Reference Links -->
118124

119-
[vNext]: https://github.com/jakoch/install-vulkan-sdk-action/compare/v1.2.1...HEAD
125+
[vNext]: https://github.com/jakoch/install-vulkan-sdk-action/compare/v1.2.2...HEAD
126+
[1.2.1]: https://github.com/jakoch/install-vulkan-sdk-action/compare/v1.2.1...v1.2.2
120127
[1.2.1]: https://github.com/jakoch/install-vulkan-sdk-action/compare/v1.2.0...v1.2.1
121128
[1.2.0]: https://github.com/jakoch/install-vulkan-sdk-action/compare/v1.1.1...v1.2.0
122129
[1.1.1]: https://github.com/jakoch/install-vulkan-sdk-action/compare/v1.1.0...v1.1.1

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "install-vulkan-sdk-action",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"private": true,
55
"description": "A Github Action installing the Vulkan SDK and Runtime.",
66
"author": "Jens A. Koch",

src/downloader.ts

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ export async function getUrlVulkanSdk(version: string): Promise<string> {
2323
const platformName = platform.getPlatform() // For download urls see https://vulkan.lunarg.com/sdk/home
2424

2525
// Windows:
26-
// Latest Version: https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe
27-
// Versionized: https://sdk.lunarg.com/sdk/download/1.3.250.1/windows/VulkanSDK-1.3.250.1-Installer.exe
26+
// Latest Version: https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe
27+
// Versionized: https://sdk.lunarg.com/sdk/download/1.3.250.1/windows/VulkanSDK-1.3.250.1-Installer.exe
28+
// Since 1.4.313.0: https://sdk.lunarg.com/sdk/download/1.4.313.0/windows/vulkansdk-windows-X64-1.4.313.0.exe
2829
//
2930
// Warm (Windows ARM64):
30-
// Latest Version: https://sdk.lunarg.com/sdk/download/latest/warm/vulkan_sdk.exe
31-
// Versionized: https://sdk.lunarg.com/sdk/download/1.4.304.0/warm/InstallVulkanARM64-1.4.304.0.exe
31+
// Latest Version: https://sdk.lunarg.com/sdk/download/latest/warm/vulkan_sdk.exe
32+
// Versionized: https://sdk.lunarg.com/sdk/download/1.4.304.0/warm/InstallVulkanARM64-1.4.304.0.exe
33+
// Sicne 1.4.313.0: https://sdk.lunarg.com/sdk/download/1.4.313.0/warm/vulkansdk-windows-ARM64-1.4.313.0.exe
3234

3335
const downloadBaseUrl = `https://sdk.lunarg.com/sdk/download/${version}/${platformName}`
3436

@@ -37,11 +39,21 @@ export async function getUrlVulkanSdk(version: string): Promise<string> {
3739
// note: condition order matters, e.g. IS_WINDOWS_ARM before IS_WINDOWS
3840

3941
if (platform.IS_WINDOWS_ARM) {
40-
// well, installer naming scheme is off, compared to the other platforms
41-
// at least a minus is missing here... InstallVulkan-ARM64
42-
vulkanSdkUrl = `${downloadBaseUrl}/InstallVulkanARM64-${version}.exe`
42+
// For versions up to 1.4.309.0 the filename is "InstallVulkanARM64-${version}.exe".
43+
// For versions after 1.4.309.0 the filename is "vulkansdk-windows-ARM64-${version}.exe".
44+
if (1 === versions.compare(version, '1.4.309.0')) {
45+
vulkanSdkUrl = `${downloadBaseUrl}/vulkansdk-windows-ARM64-${version}.exe`
46+
} else {
47+
vulkanSdkUrl = `${downloadBaseUrl}/InstallVulkanARM64-${version}.exe`
48+
}
4349
} else if (platform.IS_WINDOWS) {
44-
vulkanSdkUrl = `${downloadBaseUrl}/VulkanSDK-${version}-Installer.exe`
50+
// For versions up to 1.4.309.0 the filename is "InstallVulkan-${version}.exe".
51+
// For versions after 1.4.309.0 the filename is "vulkansdk-windows-X64-${version}.exe".
52+
if (1 === versions.compare(version, '1.4.309.0')) {
53+
vulkanSdkUrl = `${downloadBaseUrl}/vulkansdk-windows-X64-${version}.exe`
54+
} else {
55+
vulkanSdkUrl = `${downloadBaseUrl}/VulkanSDK-${version}-Installer.exe`
56+
}
4557
} else if (platform.IS_LINUX_ARM) {
4658
let distributionVersion = '24.04' // default to 24.04
4759
if (platform.getLinuxDistributionVersionId() === '22.04') {
@@ -178,6 +190,9 @@ export async function downloadVulkanRuntime(version: string): Promise<string> {
178190
*/
179191
export function getVulkanSdkFilename(version: string): string {
180192
if (platform.IS_WINDOWS || platform.IS_WINDOWS_ARM) {
193+
// The download name is "VulkanSDK-Installer.exe" for both
194+
// "vulkansdk-windows-X64-${version}.exe" and
195+
// "vulkansdk-windows-ARM64-${version}.exe".
181196
return `VulkanSDK-Installer.exe`
182197
}
183198
if (platform.IS_LINUX || platform.IS_LINUX_ARM) {

tests/downloader.test.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,45 +67,59 @@ describe('downloader', () => {
6767
describe('getUrlVulkanSdk', () => {
6868
it('should return the correct URL for Windows', async () => {
6969
;(platform.getPlatform as jest.Mock).mockReturnValue('windows')
70+
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
7071
Object.defineProperty(platform, 'IS_WINDOWS', { value: true, configurable: true })
72+
7173
const version = '1.3.250.1'
7274
const expectedUrl = `https://sdk.lunarg.com/sdk/download/${version}/windows/VulkanSDK-${version}-Installer.exe`
73-
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
74-
7575
const url = await getUrlVulkanSdk(version)
7676
expect(url).toBe(expectedUrl)
77+
78+
const version2 = '1.4.313.0'
79+
const expectedUrl2 = `https://sdk.lunarg.com/sdk/download/${version2}/windows/vulkansdk-windows-X64-${version2}.exe`
80+
const url2 = await getUrlVulkanSdk(version2)
81+
expect(url2).toBe(expectedUrl2)
7782
})
7883

7984
it('should return the correct URL for Windows ARM', async () => {
8085
;(platform.getPlatform as jest.Mock).mockReturnValue('windows')
86+
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
8187
Object.defineProperty(platform, 'IS_WINDOWS_ARM', { value: true, configurable: true })
88+
8289
const version = '1.3.290.0' // 1.3.290.0 23-07-2024 is first release for Windows ARM
8390
const expectedUrl = `https://sdk.lunarg.com/sdk/download/${version}/windows/InstallVulkanARM64-${version}.exe`
84-
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
85-
8691
const url = await getUrlVulkanSdk(version)
8792
expect(url).toBe(expectedUrl)
93+
94+
const version2 = '1.4.313.0' // 1.4.313.0 06-05-2025 filename changed
95+
const expectedUrl2 = `https://sdk.lunarg.com/sdk/download/${version2}/windows/vulkansdk-windows-ARM64-${version2}.exe`
96+
const url2 = await getUrlVulkanSdk(version2)
97+
expect(url2).toBe(expectedUrl2)
8898
})
8999

90100
it('should return the correct URL for Linux', async () => {
91101
;(platform.getPlatform as jest.Mock).mockReturnValue('linux')
102+
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
103+
92104
Object.defineProperty(platform, 'IS_WINDOWS', { value: false, configurable: true })
93105
Object.defineProperty(platform, 'IS_LINUX', { value: true, configurable: true })
106+
94107
const version = '1.3.250.1'
95108
const expectedUrl = `https://sdk.lunarg.com/sdk/download/${version}/linux/vulkansdk-linux-x86_64-${version}.tar.gz`
96-
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
97109

98110
const url = await getUrlVulkanSdk(version)
99111
expect(url).toBe(expectedUrl)
100112
})
101113

102114
it('should return the correct URL for Mac', async () => {
103115
;(platform.getPlatform as jest.Mock).mockReturnValue('mac')
116+
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
117+
104118
Object.defineProperty(platform, 'IS_WINDOWS', { value: false, configurable: true })
105119
Object.defineProperty(platform, 'IS_MAC', { value: true, configurable: true })
120+
106121
const version = '1.3.290.0'
107122
const expectedUrl = `https://sdk.lunarg.com/sdk/download/${version}/mac/vulkansdk-macos-${version}.dmg`
108-
;(http.isDownloadable as jest.Mock).mockResolvedValue(true)
109123

110124
const url = await getUrlVulkanSdk(version)
111125
expect(url).toBe(expectedUrl)

0 commit comments

Comments
 (0)