From 54bfa8bdbe490da017921b36a0d491b882889ba1 Mon Sep 17 00:00:00 2001 From: Ivan Belyavtsev Date: Mon, 5 Aug 2024 12:45:02 +0300 Subject: [PATCH] ci: test with setup vulkan action --- .github/workflows/build.yml | 63 +++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff49aabe..f95d291c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,43 +10,40 @@ jobs: Build-Windows: runs-on: windows-latest steps: - - - name : Checkout + - name : Checkout uses: actions/checkout@v4 with: submodules: true - - - name: Install dependencies + + - name: Install dependencies uses: crazy-max/ghaction-chocolatey@v3 with: args: install windows-sdk-10.0 cmake -y - - - name: Install Vulkan - run: | - $ver = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows - echo Vulkan SDK version $ver - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" -OutFile VulkanSDK.exe - echo Downloaded - .\VulkanSDK.exe --root C:\VulkanSDK --accept-licenses --default-answer --confirm-command install - - - name: Deploy + + - name: Install Vulkan + uses: humbletim/setup-vulkan-sdk@v1.2.0 + with: + vulkan-query-version: latest + vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Headers, SPIRV-Cross, SPIRV-Tools, SPIRV-Reflect, Glslang + vulkan-use-cache: true + + - name: Deploy run: | $Env:VULKAN_SDK = "C:/VulkanSDK/" $Env:Path += ";C:/VulkanSDK/Bin" .\1-Deploy.bat - - - name: Build + + - name: Build run: | $Env:VULKAN_SDK = "C:/VulkanSDK/" $Env:Path += ";C:/VulkanSDK/Bin" .\2-Build.bat - - - name: Prepare + + - name: Prepare run: | &'.\3-Prepare NRI SDK.bat' --shaders - - - name: Upload + + - name: Upload uses: actions/upload-artifact@v4 with: name: NRI SDK @@ -55,8 +52,7 @@ jobs: Build-Ubuntu: runs-on: ubuntu-22.04 steps: - - - name : Checkout + - name : Checkout uses: actions/checkout@v4 with: submodules: true @@ -69,22 +65,21 @@ jobs: - name: Setup Ninja uses: seanmiddleditch/gha-setup-ninja@master - - name: Install Vulkan SDK - run: | - sudo apt install -y wget - wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list - sudo apt update - sudo apt install -y vulkan-sdk libwayland-dev - - - name: Deploy + - name: Install Vulkan + uses: humbletim/setup-vulkan-sdk@v1.2.0 + with: + vulkan-query-version: latest + vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Headers, SPIRV-Cross, SPIRV-Tools, SPIRV-Reflect, Glslang + vulkan-use-cache: true + + - name: Deploy run: | mkdir "build" cd "build" cmake -G Ninja .. cd .. - - - name: Build + + - name: Build run: | cd "build" cmake --build .