From b77b3376f22b4b2632976685ba51089100e58ea8 Mon Sep 17 00:00:00 2001 From: McCallisterRomer Date: Thu, 30 May 2024 14:26:21 -0500 Subject: [PATCH] build multiple sdk versions --- .github/workflows/build-artifacts.yml | 32 +++++++++------------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index bbad0cb..8af585c 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -2,41 +2,28 @@ name: build-artifacts on: workflow_dispatch: - inputs: - sdkVersion: - description: 'VulkanSDK version' - required: true - default: '1.3.261.1' - type: string - tagPrefix: - description: 'VulkanSDK tag prefix (vulkan-sdk vs. sdk)' - required: true - default: 'vulkan-sdk' - type: string jobs: Build: strategy: matrix: os: [windows-2022, ubuntu-20.04, macOS-12] + sdkTag: ['vulkan-sdk-1.3.283.0, 'sdk-1.3.261.1'] include: - os: windows-2022 swiftshaderLibName: vk_swiftshader.dll - artifactName: vulkanCI-windows-x64 - os: ubuntu-20.04 swiftshaderLibName: libvk_swiftshader.so - artifactName: vulkanCI-ubuntu20.04-x64 - os: macOS-12 swiftshaderLibName: libvk_swiftshader.dylib - artifactName: vulkanCI-macOS-x64 - name: ${{ matrix.os }} + name: 'Build vulkanCI-${{ matrix.sdkTag }}-${{ matrix.os }}-x64' runs-on: ${{ matrix.os }} steps: - name: Print Inputs shell: bash - run: echo "Requested VulkanSDK ${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}" + run: echo "Requested VulkanSDK ${{ matrix.sdkTag }}" - name: Setup MSVC if: ${{ runner.os == 'Windows' }} @@ -52,13 +39,16 @@ jobs: shell: bash run: | ROOT_PATH='${{ github.workspace }}' - echo "SDK_PATH=${ROOT_PATH//\\//}/VulkanSDK/${{ inputs.sdkVersion }}" >> $GITHUB_ENV + echo "SDK_PATH=${ROOT_PATH//\\//}/VulkanSDK/${{ matrix.sdkTag }}" >> $GITHUB_ENV + + SDK_VERSION=$(echo "${{ matrix.sdkTag }}" | grep -oP '\d+\.\d+\.\d+\') + echo "ARTIFACT_NAME=vulkanCI-$SDK_VERSION-${{ matrix.os }}-x64" >> $GITHUB_ENV - name: Checkout Vulkan-Headers uses: actions/checkout@v4 with: repository: KhronosGroup/Vulkan-Headers - ref: '${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}' + ref: '${{ matrix.sdkTag }}' path: 'Vulkan-Headers' - name: Build Vulkan-Headers @@ -71,7 +61,7 @@ jobs: uses: actions/checkout@v4 with: repository: KhronosGroup/Vulkan-Loader - ref: '${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}' + ref: '${{ inputs.sdkTag }}' path: 'Vulkan-Loader' - name: Build Vulkan-Loader @@ -85,7 +75,7 @@ jobs: uses: actions/checkout@v4 with: repository: KhronosGroup/Vulkan-ValidationLayers - ref: '${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}' + ref: '${{ inputs.sdkTag }}' path: 'Vulkan-ValidationLayers' - name: Build Vulkan-ValidationLayers @@ -125,5 +115,5 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: ${{ matrix.artifactName }} + name: ${{ env.ARTIFACT_NAME }} path: VulkanSDK