Skip to content

Fix invalid SPIRV from continue inside switch inside for loop #20411

Fix invalid SPIRV from continue inside switch inside for loop

Fix invalid SPIRV from continue inside switch inside for loop #20411

Workflow file for this run

name: CI
on:
workflow_dispatch:
merge_group:
types: [checks_requested]
pull_request:
branches: [master]
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'push' }}
jobs:
filter:
if: github.event_name != 'pull_request' || github.event.pull_request.draft != true
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.filter.outputs.should-run }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "2"
- id: filter
run: |
# This step prevents subsequent steps from running if only documentation was changed
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
git fetch origin ${{ github.base_ref }}
BASE=origin/${{ github.base_ref }}
else
BASE=HEAD^1
fi
shouldRun=true
if files="$(git diff --name-only $BASE...HEAD)"; then
# Git diff succeeded, check if non-documentation files were changed
if echo "$files" | grep -qvE '^(docs/|LICENSES/|LICENSE$|CONTRIBUTING\.md$|README\.md$)'; then
shouldRun=true
else
echo "Only documentation files changed, skipping remaining steps"
shouldRun=false
fi
else
echo "Git diff failed, conservatively running tests"
shouldRun=true
fi
echo "should-run=$shouldRun" >> $GITHUB_OUTPUT
# Linux builds (containerized builds on GitHub-hosted runners)
build-linux-debug-gcc-x86_64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build-container.yml
with:
config: debug
runs-on: '["ubuntu-22.04"]'
build-linux-release-gcc-x86_64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build-container.yml
with:
config: release
runs-on: '["ubuntu-22.04"]'
build-linux-release-gcc-wasm:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: linux
compiler: gcc
platform: wasm
config: release
runs-on: '["ubuntu-22.04"]'
# macOS builds
build-macos-debug-clang-aarch64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: macos
compiler: clang
platform: aarch64
config: debug
runs-on: '["macos-latest"]'
build-macos-release-clang-aarch64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: macos
compiler: clang
platform: aarch64
config: release
runs-on: '["macos-latest"]'
# Linux ARM64 builds (GitHub-hosted)
build-linux-debug-gcc-aarch64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: linux
compiler: gcc
platform: aarch64
config: debug
runs-on: '["ubuntu-24.04-arm"]'
warnings-as-errors: false
build-linux-release-gcc-aarch64:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: linux
compiler: gcc
platform: aarch64
config: release
runs-on: '["ubuntu-24.04-arm"]'
warnings-as-errors: false
# Windows builds (self-hosted)
build-windows-debug-cl-x86_64-gpu:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: windows
compiler: cl
platform: x86_64
config: debug
runs-on: '["Windows", "self-hosted", "build"]'
build-windows-release-cl-x86_64-gpu:
needs: [filter]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-build.yml
with:
os: windows
compiler: cl
platform: x86_64
config: release
runs-on: '["Windows", "self-hosted", "build"]'
# Linux tests (self-hosted GPU runner, containerized)
test-linux-debug-gcc-x86_64:
needs: [filter, build-linux-debug-gcc-x86_64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test-container.yml
with:
config: debug
server-count: 4
test-linux-release-gcc-x86_64:
needs: [filter, build-linux-release-gcc-x86_64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test-container.yml
with:
config: release
server-count: 4
# macOS tests
test-macos-debug-clang-aarch64:
needs: [filter, build-macos-debug-clang-aarch64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: macos
compiler: clang
platform: aarch64
config: debug
runs-on: '["macos-latest"]'
test-category: smoke
full-gpu-tests: true
server-count: 3
test-macos-release-clang-aarch64:
needs: [filter, build-macos-release-clang-aarch64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: macos
compiler: clang
platform: aarch64
config: release
runs-on: '["macos-latest"]'
test-category: full
full-gpu-tests: true
server-count: 3
# Linux ARM64 tests (GitHub-hosted, CPU only)
test-linux-debug-gcc-aarch64:
needs: [filter, build-linux-debug-gcc-aarch64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: linux
compiler: gcc
platform: aarch64
config: debug
runs-on: '["ubuntu-24.04-arm"]'
test-category: smoke
full-gpu-tests: false
test-linux-release-gcc-aarch64:
needs: [filter, build-linux-release-gcc-aarch64]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: linux
compiler: gcc
platform: aarch64
config: release
runs-on: '["ubuntu-24.04-arm"]'
test-category: smoke
full-gpu-tests: false
# Windows GPU tests (self-hosted)
test-windows-debug-cl-x86_64-gpu:
needs: [filter, build-windows-debug-cl-x86_64-gpu]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: windows
compiler: cl
platform: x86_64
config: debug
runs-on: '["Windows", "self-hosted", "GCP-T4"]'
test-category: full
full-gpu-tests: true
test-windows-release-cl-x86_64-gpu:
needs: [filter, build-windows-release-cl-x86_64-gpu]
if: needs.filter.outputs.should-run == 'true'
uses: ./.github/workflows/ci-slang-test.yml
with:
os: windows
compiler: cl
platform: x86_64
config: release
runs-on: '["Windows", "self-hosted", "GCP-T4"]'
test-category: full
full-gpu-tests: true
# MaterialX Integration Tests (Windows only for initial validation)
test-materialx-windows-release:
needs: [filter, build-windows-release-cl-x86_64-gpu]
if: needs.filter.outputs.should-run == 'true' && github.event_name == 'pull_request'
uses: ./.github/workflows/materialx-test.yml
with:
os: windows
compiler: cl
platform: x86_64
config: release
runs-on: '["windows-latest"]'
check-ci:
needs:
[
test-windows-release-cl-x86_64-gpu,
test-windows-debug-cl-x86_64-gpu,
test-macos-release-clang-aarch64,
test-macos-debug-clang-aarch64,
test-linux-release-gcc-x86_64,
test-linux-debug-gcc-x86_64,
test-linux-release-gcc-aarch64,
test-linux-debug-gcc-aarch64,
test-materialx-windows-release,
]
runs-on: ubuntu-latest
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.draft != true)
steps:
- name: Check CI Results
run: |
echo "=== CI Results Summary ==="
echo "Windows Release GPU: ${{ needs.test-windows-release-cl-x86_64-gpu.result }}"
echo "Windows Debug GPU: ${{ needs.test-windows-debug-cl-x86_64-gpu.result }}"
echo "macOS Release ARM64: ${{ needs.test-macos-release-clang-aarch64.result }}"
echo "macOS Debug ARM64: ${{ needs.test-macos-debug-clang-aarch64.result }}"
echo "Linux Release x64: ${{ needs.test-linux-release-gcc-x86_64.result }}"
echo "Linux Debug x64: ${{ needs.test-linux-debug-gcc-x86_64.result }}"
echo "Linux Release ARM64: ${{ needs.test-linux-release-gcc-aarch64.result }}"
echo "Linux Debug ARM64: ${{ needs.test-linux-debug-gcc-aarch64.result }}"
echo "MaterialX Windows: ${{ needs.test-materialx-windows-release.result }}"
# Check if any required jobs failed (allow success or skipped)
if [[ "${{ needs.test-windows-release-cl-x86_64-gpu.result }}" == "failure" ]] || \
[[ "${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" == "failure" ]] || \
[[ "${{ needs.test-macos-release-clang-aarch64.result }}" == "failure" ]] || \
[[ "${{ needs.test-macos-debug-clang-aarch64.result }}" == "failure" ]] || \
[[ "${{ needs.test-linux-release-gcc-x86_64.result }}" == "failure" ]] || \
[[ "${{ needs.test-linux-debug-gcc-x86_64.result }}" == "failure" ]] || \
[[ "${{ needs.test-linux-release-gcc-aarch64.result }}" == "failure" ]] || \
[[ "${{ needs.test-linux-debug-gcc-aarch64.result }}" == "failure" ]] || \
[[ "${{ needs.test-materialx-windows-release.result }}" == "failure" ]] || \
[[ "${{ needs.test-windows-release-cl-x86_64-gpu.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-macos-release-clang-aarch64.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-macos-debug-clang-aarch64.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-linux-release-gcc-x86_64.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-linux-debug-gcc-x86_64.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-linux-release-gcc-aarch64.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-linux-debug-gcc-aarch64.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-materialx-windows-release.result }}" == "cancelled" ]]; then
echo "One or more CI jobs failed or were cancelled"
exit 1
fi
echo "All CI jobs completed successfully (passed or skipped)!"
# Automatically retry GPU health check failures by dispatching ci-retry.yml,
# which watches this run until it completes, then reruns only failed jobs.
# Capped at 2 automatic retries via run_attempt check.
retry-on-gpu-failure:
needs: [check-ci]
if: failure() && fromJSON(github.run_attempt) < 3
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Check for GPU health check failures and dispatch retry
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
gpu_failures=$(gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs?per_page=100" \
--jq '[.jobs[] | select(.conclusion == "failure") | select(.steps[]? | select(.name == "GPU health check" and .conclusion == "failure"))] | length' \
|| echo "0")
gpu_failures=${gpu_failures:-0}
if ! [[ "$gpu_failures" =~ ^[0-9]+$ ]]; then
gpu_failures=0
fi
if [ "$gpu_failures" -gt 0 ]; then
echo "Found $gpu_failures GPU health check failure(s) — dispatching retry workflow..."
gh workflow run ci-retry.yml -F run_id=${{ github.run_id }}
else
echo "No GPU health check failures — not retrying."
fi