Skip to content

updating github action to use the new vulkan headless mode instead #15

updating github action to use the new vulkan headless mode instead

updating github action to use the new vulkan headless mode instead #15

name: Rendering tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
rendering-tests:
runs-on: ubuntu-latest
env:
GOLDEN_DIR: ${{ github.workspace }}/tests/golden_vulkan
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.4.341.1
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Tools, Glslang
vulkan-use-cache: true
- name: Configure
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=Release
-DNOTHOFAGUS_BACKEND_VULKAN=ON
-DNOTHOFAGUS_HEADLESS_VULKAN=ON
-DNOTHOFAGUS_BUILD_TESTS=ON
-DNOTHOFAGUS_USE_GLSLANG=ON
-S ${{ github.workspace }}
- name: Build
run: cmake --build build --config Release --target rendering_tests
- name: Run tests against Vulkan golden files
run: ./build/tests/rendering_tests
- name: Update Vulkan golden files if missing
if: failure()
run: |
echo "Tests failed — regenerating Vulkan golden files."
echo "If this is expected (rendering change), run locally:"
echo " GOLDEN_DIR=tests/golden_vulkan UPDATE_GOLDEN=1 ./build/tests/rendering_tests"
echo "Then commit the updated golden_vulkan/ files."
UPDATE_GOLDEN=1 ./build/tests/rendering_tests
echo "--- Updated golden files ---"
ls -la tests/golden_vulkan/