Update build-windows.yml

This commit is contained in:
Inori 2023-06-26 22:51:55 +08:00
parent 0c8f07ef53
commit 8b924a565e

View file

@ -15,6 +15,10 @@ env:
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
VULKAN_SDK_PATH: C:\\VulkanSDK
LLVM_PATH: C:\\LLVM
permissions:
contents: read
@ -28,14 +32,14 @@ jobs:
id: cache-vulkan-sdk
uses: actions/cache@v3
with:
path: "C:\\VulkanSDK"
path: "${{env.VULKAN_SDK_PATH}}"
key: vulkan-sdk
- name: Setup Vulkan SDK
if: ${{steps.cache-vulkan-sdk.outputs.cache-hit != 'true'}}
run: |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.250.0/windows/VulkanSDK-1.3.250.0-Installer.exe" -OutFile VulkanSDK.exe
$installer = Start-Process -FilePath VulkanSDK.exe -Wait -PassThru -ArgumentList @("--accept-licenses --default-answer --confirm-command install");
$installer = Start-Process -FilePath VulkanSDK.exe -Wait -PassThru -ArgumentList @("--root ${{env.VULKAN_SDK_PATH}}\\1.3.250.0 --accept-licenses --default-answer --confirm-command install");
$installer.WaitForExit();
@ -43,14 +47,14 @@ jobs:
id: cache-llvm
uses: actions/cache@v3
with:
path: "C:\\Program Files\\LLVM"
path: "${{env.LLVM_PATH}}"
key: llvm
- name: Setup LLVM
if: ${{steps.cache-llvm.outputs.cache-hit != 'true'}}
run: |
Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/LLVM-16.0.6-win64.exe" -OutFile LLVM.exe
$installer = Start-Process -FilePath LLVM.exe -Wait -PassThru -ArgumentList @("/S");
$installer = Start-Process -FilePath LLVM.exe -Wait -PassThru -ArgumentList @("/S /D={{env.LLVM_PATH}}");
$installer.WaitForExit();
@ -67,6 +71,12 @@ jobs:
msbuild-architecture: x64
- name: Setup clang-cl
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
Set-Content -Path .\Directory.build.props -Value "<Project>`n <PropertyGroup>`n <LLVMInstallDir>{{env.LLVM_PATH}}</LLVMInstallDir>`n <LLVMToolsVersion>16.0.6</LLVMToolsVersion>`n </PropertyGroup>`n</Project>"
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).