Files
mandy/.github/workflows/runtime.yml
errusso 711d386320 CI, tests, tools: fix file handle leak, skip without pytest, build GPU tools on Linux
- tools/awc_opus.py: wrap export_bank file read in a with-statement to
  close the handle promptly instead of relying on GC (fixes ResourceWarning
  seen in test output).

- tests/test_amd_swizzle.py: use raise unittest.SkipTest instead of
  import pytest; pytest.skip so the test works under both python -I and
  unittest discovery when numpy is absent. No pytest dependency needed.

- tests/test_d3d12_xs_surface.py: same treatment for the two conditional
  skips (Windows SDK headers, SCARAB_REF). The test still skips gracefully
  without pytest installed.

- .github/workflows/runtime.yml: add a linux-gpu-tools job that installs
  libvulkan-dev, builds all GPU test tools with cmake + ninja + g++, and
  verifies every tool binary exists. Rename the Windows job from 'build' to
  'windows' to disambiguate. This catches build regressions in GPU tool code
  that only manifest on Linux.

AI-assisted.
2026-11-21 21:10:01 +01:00

54 lines
1.7 KiB
YAML

# Builds the loader (runtime/) with MSVC on every push and pull request, as scripts/build_runtime.ps1 does, so a
# change that breaks the C++ build shows up in CI. Without the Vulkan SDK the GPU test tools are skipped.
name: Runtime
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: runtime-${{ github.ref }}
cancel-in-progress: true
jobs:
windows:
runs-on: windows-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: ilammy/msvc-dev-cmd@v1.13.0
- name: Configure
run: cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build
run: cmake --build runtime/build
- name: CPU runtime tests
run: ctest --test-dir runtime/build --output-on-failure
linux-gpu-tools:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- name: Install Vulkan SDK
run: |
sudo apt-get update
sudo apt-get install -y libvulkan-dev cmake ninja-build g++
- name: Configure
run: cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build
run: cmake --build runtime/build --parallel
- name: Check GPU tools exist
run: |
for tool in vk_harness vk_pipeline_check vk_command_replay_test vk_compute_test vk_texture_test vk_store_test d3d12_state_map_test command_list_test; do
if [ ! -f "runtime/build/$tool" ] && [ ! -f "runtime/build/$tool.exe" ]; then
echo "Missing: $tool"
exit 1
fi
done
echo "All GPU tools built"