From 8b924a565ed60b74d83122dc5cefabac6407fceb Mon Sep 17 00:00:00 2001 From: Inori Date: Mon, 26 Jun 2023 22:51:55 +0800 Subject: [PATCH] Update build-windows.yml --- .github/workflows/build-windows.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 34b2d79f..565b1c9e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -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 "`n `n {{env.LLVM_PATH}}`n 16.0.6`n `n" + + - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} # Add additional options to the MSBuild command line here (like platform or verbosity level).