Skip to content

Commit

Permalink
build multiple sdk versions
Browse files Browse the repository at this point in the history
  • Loading branch information
McCallisterRomer committed May 30, 2024
1 parent c31b4a6 commit b77b337
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -125,5 +115,5 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifactName }}
name: ${{ env.ARTIFACT_NAME }}
path: VulkanSDK

0 comments on commit b77b337

Please sign in to comment.