From 94215dcdcb8b9003c3e6d12308ea006e827febc9 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Thu, 5 Jun 2025 13:18:42 -0700 Subject: 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. --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to '.github/workflows') 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 -- cgit v1.2.3