diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-06-05 13:18:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-05 13:18:42 -0700 |
| commit | 94215dcdcb8b9003c3e6d12308ea006e827febc9 (patch) | |
| tree | 7b6083b63c9f4baea2115f6cf71b3ccb5a2bcba2 /.github/workflows/ci.yml | |
| parent | 9b6e9de8f188222788fed0b1a36522ed33ab7f14 (diff) | |
Check the supported backends in CI (#7346)
slang-test is ran with a simple test, tests/render/check-backend-support-on-ci.slang.
And the github CI,yaml will check if certain keywords are found.
This is to prevent the regression on the CI server where a set of backend was supported at some point and it stopped supporting it siliently.
Diffstat (limited to '.github/workflows/ci.yml')
| -rw-r--r-- | .github/workflows/ci.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d9d0af87..4a2a76011 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,6 +188,36 @@ jobs: - name: Test Slang if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm' && (matrix.platform != 'aarch64' || matrix.os == 'macos') run: | + smokeResult=$("$bin_dir/slang-test" tests/render/check-backend-support-on-ci.slang) + supportedBackends="$(echo "$smokeResult" | grep 'Supported backends: ')" + + # LLVM is required to run the filecheck + echo "Checking llvm ..." && echo "$supportedBackends" | grep -q llvm + + if [[ "${{matrix.full-gpu-tests}}" == "true" ]] + then + for backend in fxc dxc glslang visualstudio genericcpp nvrtc metal tint # clang gcc + do + echo "Checking $backend ..." && echo "$supportedBackends" | grep -q "$backend" + done + for api in 'vk,vulkan' 'dx12,d3d12' 'dx11,d3d11' 'cuda' 'wgpu,webgpu' + do + echo "Checking $api ..." && echo "$smokeResult" | grep -q "Check $api: Supported" + done + fi + + if [[ "${{matrix.os}}" == "macos" ]] + then + for backend in metal + do + echo "Checking $backend ..." && echo "$supportedBackends" | grep -q "$backend" + done + for api in 'mtl,metal' + do + echo "Checking $api ..." && echo "$smokeResult" | grep -q "Check $api: Supported" + done + fi + export SLANG_RUN_SPIRV_VALIDATION=1 export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1 if [[ "${{matrix.full-gpu-tests}}" == "true" ]]; then |
