Skip to content

parameterize on tag #10

parameterize on tag

parameterize on tag #10

Workflow file for this run

name: build-artifacts
on:
workflow_dispatch:
inputs:
sdkVersion:
description: 'VulkanSDK version'
required: true
default: '1.3.261.1'
type: string
tagPrefix:

Check failure on line 11 in .github/workflows/build-artifacts.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-artifacts.yml

Invalid workflow file

You have an error in your yaml syntax on line 11
description: 'VulkanSDK tag prefix ('vulkan-sdk' vs. 'sdk')'
default: 'vulkan-sdk'
type: string
jobs:
Build:
strategy:
matrix:
os: [windows-2022, ubuntu-20.04, macOS-12]
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 }}
runs-on: ${{ matrix.os }}
steps:
- name: Print Inputs
shell: bash
run: echo "Requested VulkanSDK ${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}"
- name: Setup MSVC
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev libwayland-dev
- name: Set up SDK path
shell: bash
run: |
ROOT_PATH='${{ github.workspace }}'
echo "SDK_PATH=${ROOT_PATH//\\//}/VulkanSDK/${{ inputs.sdkVersion }}" >> $GITHUB_ENV
- name: Checkout Vulkan-Headers
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Headers
ref: '${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}'
path: 'Vulkan-Headers'
- name: Build Vulkan-Headers
shell: bash
run: |
cmake -S Vulkan-Headers -B Vulkan-Headers/build
cmake --install Vulkan-Headers/build --prefix ${{ env.SDK_PATH }}
- name: Checkout Vulkan-Loader
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Loader
ref: '${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}'
path: 'Vulkan-Loader'
- name: Build Vulkan-Loader
shell: bash
run: |
cmake -S Vulkan-Loader -B Vulkan-Loader/build -DVULKAN_HEADERS_INSTALL_DIR=${{ env.SDK_PATH }} -DLOADER_USE_UNSAFE_FILE_SEARCH=ON -DCMAKE_BUILD_TYPE=Release
cmake --build Vulkan-Loader/build --config Release --parallel 4
cmake --install Vulkan-Loader/build --prefix ${{ env.SDK_PATH }}
- name: Checkout Vulkan-ValidationLayers
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-ValidationLayers
ref: '${{ inputs.tagPrefix }}-${{ inputs.sdkVersion }}'
path: 'Vulkan-ValidationLayers'
- name: Build Vulkan-ValidationLayers
shell: bash
run: |
cmake -S Vulkan-ValidationLayers -B Vulkan-ValidationLayers/build -DUPDATE_DEPS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build Vulkan-ValidationLayers/build --config Release --parallel 4
cmake --install Vulkan-ValidationLayers/build --prefix ${{ env.SDK_PATH }}
cp Vulkan-ValidationLayers/LICENSE.txt ${{ env.SDK_PATH }}
- name: Checkout Swiftshader
uses: actions/checkout@v4
with:
repository: NcStudios/swiftshader
ref: 'release'
path: 'Swiftshader'
submodules: 'recursive'
- name: Build Swiftshader
shell: bash
run: |
cmake -S Swiftshader -B Swiftshader/build_out -DCMAKE_BUILD_TYPE=Release
cmake --build Swiftshader/build_out --target vk_swiftshader --config Release --parallel 4
if [[ "${{ runner.os }}" == "Windows" ]]; then
OUT_DIR=Windows
elif [[ "${{ runner.os }}" == "Linux" ]]; then
OUT_DIR=Linux
elif [[ "${{ runner.os }}" == "macOS" ]]; then
OUT_DIR=Darwin
fi
mkdir ${{ env.SDK_PATH }}/swiftshader
cp Swiftshader/build_out/$OUT_DIR/${{ matrix.swiftshaderLibName }} ${{ env.SDK_PATH }}/swiftshader
cp Swiftshader/LICENSE.txt ${{ env.SDK_PATH }}/swiftshader
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifactName }}
path: VulkanSDK