Skip to content

Commit c40e9dc

Browse files
yeah
1 parent 266ae09 commit c40e9dc

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/msbuild.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
branches: [ "master" ]
1313

1414
env:
15+
VULKAN_SDK_VERSION: 1.4.328.1
16+
1517
# Path to the solution file relative to the root of the project.
1618
SOLUTION_FILE_PATH: ./VulkanWin32.sln
1719

@@ -30,18 +32,27 @@ jobs:
3032
steps:
3133
- uses: actions/checkout@v4
3234

33-
- name: Install Vulkan SDK
34-
uses: humbletim/install-vulkan-sdk@v1.2
35+
- name: Create Files
36+
run: mkdir C:/VulkanSDK
37+
38+
- name: Cache Vulkan SDK
39+
id: cache-vulkan-sdk
40+
uses: actions/cache@v3
3541
with:
36-
version: 1.4.328.1
37-
cache: true
42+
path: C:/VulkanSDK/${{ env.VULKAN_SDK_VERSION }}
43+
key: vulkan-sdk-${{ runner.os }}-${{ env.VULKAN_SDK_VERSION }}
44+
45+
- name: Setup Vulkan
46+
if: runner.os == 'Windows' && steps.cache-vulkan-sdk.outputs.cache-hit != 'true'
47+
run: |
48+
$vulkanInstaller = "VulkanSDK-$env:VULKAN_SDK_VERSION-Installer.exe"
49+
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/${vulkanInstaller}" -OutFile $vulkanInstaller
50+
Start-Process -FilePath $vulkanInstaller -Wait -ArgumentList @("--accept-licenses", "--default-answer", "--confirm-command", "install")
51+
Remove-Item -Path $vulkanInstaller
3852
3953
- name: Add MSBuild to PATH
4054
uses: microsoft/setup-msbuild@v1.0.2
4155

42-
- name: Hello world
43-
run: dir $Env:VULKAN_SDK\include\vulkan
44-
4556
- name: Restore NuGet packages
4657
working-directory: ${{env.GITHUB_WORKSPACE}}
4758
run: nuget restore ${{env.SOLUTION_FILE_PATH}}

0 commit comments

Comments
 (0)