summaryrefslogtreecommitdiffstats
path: root/.github/actions
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-09-05 20:31:04 -0700
committerGitHub <noreply@github.com>2025-09-05 20:31:04 -0700
commitfe87a39e453b64e94446181a9ae5cbfc0f62bf0c (patch)
tree590faeefb6a5e31726b3b0afc9ec71464d46b8d4 /.github/actions
parent4856da26e188c28bf691d0210ce8016264c00940 (diff)
Remove unnecessary check and adust server count etc. in CI (#8374)
- This PR removes "wasm" check from the test job, since there is no test job for "wasm" yet. - Also, move the check for slang-rhi and slangpy test to the job level to skip the setup etc. if no run is needed. - Update the macos compiler version in building.md to match the clang compiler used in CI. - Reduce the server count in Linux and Mac when running slang-test to ease the machine load - Run slangpy test with `-n auto --maxprocesses=4` to speed up --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to '.github/actions')
-rw-r--r--.github/actions/common-test-setup/action.yml61
1 files changed, 46 insertions, 15 deletions
diff --git a/.github/actions/common-test-setup/action.yml b/.github/actions/common-test-setup/action.yml
index ab1a665c7..3fc6dd617 100644
--- a/.github/actions/common-test-setup/action.yml
+++ b/.github/actions/common-test-setup/action.yml
@@ -40,13 +40,8 @@ runs:
chmod +x github_artifact/${cmake_config}/bin/* 2>/dev/null || echo "No executables to make executable"
# Set up bin_dir based on platform and config
- if [[ "${{ inputs.platform }}" == "wasm" ]]; then
- bin_dir=build.em/Release/bin
- echo "bin_dir=$bin_dir" >> $GITHUB_ENV
- else
- bin_dir=$(pwd)/github_artifact/${cmake_config}/bin
- echo "bin_dir=$bin_dir" >> $GITHUB_ENV
- fi
+ bin_dir=$(pwd)/github_artifact/${cmake_config}/bin
+ echo "bin_dir=$bin_dir" >> $GITHUB_ENV
# Also set lib_dir for slangpy tests
lib_dir=$(pwd)/github_artifact/${cmake_config}/lib
@@ -61,21 +56,57 @@ runs:
# On Windows, DLLs should be in the same directory as executables or in PATH
# Use $GITHUB_PATH instead of $PATH for preservation across steps and
# avoid unix-like/windows-like path issues
- echo "$bin_dir" >> $GITHUB_PATH
- echo "$lib_dir" >> $GITHUB_PATH
+ # echo "$bin_dir" >> $GITHUB_PATH
+ # echo "$lib_dir" >> $GITHUB_PATH
+ echo "skipping setting PATH in Windows"
fi
+ # List directory contents
+ echo "Contents of bin_dir ($bin_dir):"
+ ls -a "$bin_dir" 2>/dev/null || echo "bin_dir not found"
+ echo "Contents of lib_dir ($lib_dir):"
+ ls -a "$lib_dir" 2>/dev/null || echo "lib_dir not found"
+
- name: Check runtime environment
- if: inputs.platform != 'wasm'
shell: bash
run: |
- echo "$bin_dir/slang-test"
- "$bin_dir/slang-test" tests/render/check-backend-support-on-ci.slang
- smokeResult=$("$bin_dir/slang-test" tests/render/check-backend-support-on-ci.slang)
+ echo "Checking supported backends"
+ # Capture the output of slang-test while also displaying it
+ if ! smokeResult=$("$bin_dir/slang-test" tests/render/check-backend-support-on-ci.slang 2>&1); then
+ echo "❌ ERROR: slang-test failed to run"
+ echo "Output: $smokeResult"
+ exit 1
+ fi
supportedBackends="$(echo "$smokeResult" | grep 'Supported backends: ')"
+ echo "$smokeResult"
echo "$supportedBackends"
- # Windows-specific version checks - fail if tools are not available
- if [[ "${{ inputs.os }}" == "windows" ]]; then
+
+ # Check if the output contains "llvm" (case-insensitive)
+ if echo "$supportedBackends" | grep -qi "llvm"; then
+ echo "✅ LLVM backend support detected"
+ else
+ echo "❌ ERROR: LLVM backend support not detected - this is required to run the filecheck!"
+ fi
+
+ # Function to check API support
+ check_api_support() {
+ local api_list=("$@")
+ for api in "${api_list[@]}"; do
+ if echo "$smokeResult" | grep -qi "${api}: Supported"; then
+ echo "✅ ${api} API support detected"
+ else
+ echo "❌ ${api} API support not detected"
+ exit 1
+ fi
+ done
+ }
+
+ # Platform-specific API checks - fail if APIs are not available
+ if [[ "${{ inputs.os }}" == "macos" ]]; then
+ check_api_support "mtl,metal"
+ elif [[ "${{ inputs.os }}" == "windows" ]]; then
+ check_api_support "vk,vulkan" "dx12,d3d12" "dx11,d3d11" "cuda"
+
echo "Printing CUDA compiler version: ..."
nvcc --version || (echo "ERROR: CUDA compiler (nvcc) not available on Windows" && exit 1)
echo "Printing GPU driver version: ..."