Skip to content

build-artifacts

build-artifacts #28

Workflow file for this run

name: build-artifacts
on:
workflow_dispatch:
jobs:
build-swiftshader:
strategy:
matrix:
os: [windows-2022, ubuntu-20.04, macOS-12]
include:
- os: windows-2022
swiftshaderLibName: vk_swiftshader.dll
- os: ubuntu-20.04
swiftshaderLibName: libvk_swiftshader.so
- os: macOS-12
swiftshaderLibName: libvk_swiftshader.dylib
name: 'swiftshader-${{ matrix.os }}'
runs-on: ${{ matrix.os }}
steps:
- name: Set up environment variables
shell: bash
run: |
echo "ARTIFACT_NAME=swiftshader-${{ matrix.os }}-x64" >> $GITHUB_ENV
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "BUILD_SUBDIR=Windows" >> $GITHUB_ENV
elif [[ "${{ runner.os }}" == "Linux" ]]; then
echo "BUILD_SUBDIR=Linux" >> $GITHUB_ENV
elif [[ "${{ runner.os }}" == "macOS" ]]; then
echo "BUILD_SUBDIR=Darwin" >> $GITHUB_ENV
fi
- 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
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: |
Swiftshader/build_out/${{ env.BUILD_SUBDIR }}/${{ matrix.swiftshaderLibName }}
Swiftshader/LICENSE.txt
build-sdk:
strategy:
matrix:
os: [windows-2022, ubuntu-20.04, macOS-12]
sdkTag: ['vulkan-sdk-1.3.283.0', 'vulkan-sdk-1.3.280.0', 'vulkan-sdk-1.3.275.0', 'sdk-1.3.261.1']
name: '${{ matrix.sdkTag }}-${{ matrix.os }}'
runs-on: ${{ matrix.os }}
steps:
- name: Set up 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 environment variables
shell: bash
run: |
SDK_VERSION=$(echo "${{ matrix.sdkTag }}" | sed -E 's/[^0-9]*([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*/\1/')
echo "ARTIFACT_NAME=vulkanCI-$SDK_VERSION-${{ matrix.os }}-x64" >> $GITHUB_ENV
ROOT_PATH='${{ github.workspace }}'
echo "SDK_PATH=${ROOT_PATH//\\//}/VulkanSDK/$SDK_VERSION" >> $GITHUB_ENV
- name: Checkout Vulkan-Headers
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Headers
ref: '${{ matrix.sdkTag }}'
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: '${{ matrix.sdkTag }}'
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: '${{ matrix.sdkTag }}'
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: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: VulkanSDK