yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
c6d8c6b68
master
1name : CI 2 3on : 4workflow_dispatch : 5merge_group : 6types : [ checks_requested ] 7pull_request : 8branches : [ master ] 9concurrency : 10group : ${{ github.workflow }}-${{ github.ref }} 11cancel-in-progress : ${{ github.event_name != 'push' }} 12jobs : 13filter : 14runs-on : ubuntu-latest 15outputs : 16should-run : ${{ steps.filter.outputs.should-run }} 17steps : 18- uses : actions/checkout@v4 19with : 20fetch-depth : "2" 21- id : filter 22run : | 23# This step prevents subsequent steps from running if only documentation was changed 24if [[ "${{ github.event_name }}" == "pull_request" ]]; then 25git fetch origin ${{ github.base_ref }} 26BASE=origin/${{ github.base_ref }} 27else 28BASE=HEAD^1 29fi 30 31shouldRun=true 32if files="$(git diff --name-only $BASE...HEAD)"; then 33# Git diff succeeded, check if non-documentation files were changed 34if echo "$files" | grep -qvE '^(docs/|LICENSES/|LICENSE$|CONTRIBUTING\.md$|README\.md$)'; then 35shouldRun=true 36else 37echo "Only documentation files changed, skipping remaining steps" 38shouldRun=false 39fi 40else 41echo "Git diff failed, conservatively running tests" 42shouldRun=true 43fi 44echo "should-run=$shouldRun" >> $GITHUB_OUTPUT 45 46# Linux builds 47build-linux-debug-gcc-x86_64 : 48needs : [ filter ] 49if : needs.filter.outputs.should-run == 'true' 50uses : ./.github/workflows/ci-slang-build.yml 51with : 52os : linux 53compiler : gcc 54platform : x86_64 55config : debug 56runs-on : '["ubuntu-22.04"]' 57 58build-linux-release-gcc-x86_64 : 59needs : [ filter ] 60if : needs.filter.outputs.should-run == 'true' 61uses : ./.github/workflows/ci-slang-build.yml 62with : 63os : linux 64compiler : gcc 65platform : x86_64 66config : release 67runs-on : '["ubuntu-22.04"]' 68 69build-linux-release-gcc-wasm : 70needs : [ filter ] 71if : needs.filter.outputs.should-run == 'true' 72uses : ./.github/workflows/ci-slang-build.yml 73with : 74os : linux 75compiler : gcc 76platform : wasm 77config : release 78runs-on : '["ubuntu-22.04"]' 79 80# macOS builds 81build-macos-debug-clang-aarch64 : 82needs : [ filter ] 83if : needs.filter.outputs.should-run == 'true' 84uses : ./.github/workflows/ci-slang-build.yml 85with : 86os : macos 87compiler : clang 88platform : aarch64 89config : debug 90runs-on : '["macos-latest"]' 91 92build-macos-release-clang-aarch64 : 93needs : [ filter ] 94if : needs.filter.outputs.should-run == 'true' 95uses : ./.github/workflows/ci-slang-build.yml 96with : 97os : macos 98compiler : clang 99platform : aarch64 100config : release 101runs-on : '["macos-latest"]' 102 103# Windows builds (self-hosted) 104build-windows-debug-cl-x86_64-gpu : 105needs : [ filter ] 106if : needs.filter.outputs.should-run == 'true' 107uses : ./.github/workflows/ci-slang-build.yml 108with : 109os : windows 110compiler : cl 111platform : x86_64 112config : debug 113runs-on : '["Windows", "self-hosted", "GCP-T4"]' 114 115build-windows-release-cl-x86_64-gpu : 116needs : [ filter ] 117if : needs.filter.outputs.should-run == 'true' 118uses : ./.github/workflows/ci-slang-build.yml 119with : 120os : windows 121compiler : cl 122platform : x86_64 123config : release 124runs-on : '["Windows", "self-hosted", "GCP-T4"]' 125 126# Linux tests 127test-linux-debug-gcc-x86_64 : 128needs : [ filter , build-linux-debug-gcc-x86_64 ] 129if : needs.filter.outputs.should-run == 'true' 130uses : ./.github/workflows/ci-slang-test.yml 131with : 132os : linux 133compiler : gcc 134platform : x86_64 135config : debug 136runs-on : '["ubuntu-22.04"]' 137test-category : smoke 138server-count : 1 139 140test-linux-release-gcc-x86_64 : 141needs : [ filter , build-linux-release-gcc-x86_64 ] 142if : needs.filter.outputs.should-run == 'true' 143uses : ./.github/workflows/ci-slang-test.yml 144with : 145os : linux 146compiler : gcc 147platform : x86_64 148config : release 149runs-on : '["ubuntu-22.04"]' 150test-category : full 151server-count : 1 152 153# macOS tests 154test-macos-debug-clang-aarch64 : 155needs : [ filter , build-macos-debug-clang-aarch64 ] 156if : needs.filter.outputs.should-run == 'true' 157uses : ./.github/workflows/ci-slang-test.yml 158with : 159os : macos 160compiler : clang 161platform : aarch64 162config : debug 163runs-on : '["macos-latest"]' 164test-category : smoke 165server-count : 3 166 167test-macos-release-clang-aarch64 : 168needs : [ filter , build-macos-release-clang-aarch64 ] 169if : needs.filter.outputs.should-run == 'true' 170uses : ./.github/workflows/ci-slang-test.yml 171with : 172os : macos 173compiler : clang 174platform : aarch64 175config : release 176runs-on : '["macos-latest"]' 177test-category : full 178full-gpu-tests : true 179server-count : 3 180 181# Windows GPU tests (self-hosted) 182test-windows-debug-cl-x86_64-gpu : 183needs : [ filter , build-windows-debug-cl-x86_64-gpu ] 184if : needs.filter.outputs.should-run == 'true' 185uses : ./.github/workflows/ci-slang-test.yml 186with : 187os : windows 188compiler : cl 189platform : x86_64 190config : debug 191runs-on : '["Windows", "self-hosted", "GCP-T4"]' 192test-category : full 193full-gpu-tests : true 194 195test-windows-release-cl-x86_64-gpu : 196needs : [ filter , build-windows-release-cl-x86_64-gpu ] 197if : needs.filter.outputs.should-run == 'true' 198uses : ./.github/workflows/ci-slang-test.yml 199with : 200os : windows 201compiler : cl 202platform : x86_64 203config : release 204runs-on : '["Windows", "self-hosted", "GCP-T4"]' 205test-category : full 206full-gpu-tests : true 207 208check-ci : 209needs : 210[ 211test-windows-release-cl-x86_64-gpu , 212test-windows-debug-cl-x86_64-gpu , 213test-macos-release-clang-aarch64 , 214test-macos-debug-clang-aarch64 , 215test-linux-release-gcc-x86_64 , 216test-linux-debug-gcc-x86_64 , 217] 218runs-on : ubuntu-latest 219if : always() # Always run, even if dependencies fail 220steps : 221- name : Check CI Results 222run : | 223 echo "=== CI Results Summary ===" 224 echo "Windows Release GPU: ${{ needs.test-windows-release-cl-x86_64-gpu.result }}" 225 echo "Windows Debug GPU: ${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" 226 echo "macOS Release ARM64: ${{ needs.test-macos-release-clang-aarch64.result }}" 227 echo "macOS Debug ARM64: ${{ needs.test-macos-debug-clang-aarch64.result }}" 228 echo "Linux Release x64: ${{ needs.test-linux-release-gcc-x86_64.result }}" 229 echo "Linux Debug x64: ${{ needs.test-linux-debug-gcc-x86_64.result }}" 230 231 # Check if any required jobs failed (allow success or skipped) 232 if [[ "${{ needs.test-windows-release-cl-x86_64-gpu.result }}" == "failure" ]] || \ 233 [[ "${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" == "failure" ]] || \ 234 [[ "${{ needs.test-macos-release-clang-aarch64.result }}" == "failure" ]] || \ 235 [[ "${{ needs.test-macos-debug-clang-aarch64.result }}" == "failure" ]] || \ 236 [[ "${{ needs.test-linux-release-gcc-x86_64.result }}" == "failure" ]] || \ 237 [[ "${{ needs.test-linux-debug-gcc-x86_64.result }}" == "failure" ]] || \ 238 [[ "${{ needs.test-windows-release-cl-x86_64-gpu.result }}" == "cancelled" ]] || \ 239 [[ "${{ needs.test-windows-debug-cl-x86_64-gpu.result }}" == "cancelled" ]] || \ 240 [[ "${{ needs.test-macos-release-clang-aarch64.result }}" == "cancelled" ]] || \ 241 [[ "${{ needs.test-macos-debug-clang-aarch64.result }}" == "cancelled" ]] || \ 242 [[ "${{ needs.test-linux-release-gcc-x86_64.result }}" == "cancelled" ]] || \ 243 [[ "${{ needs.test-linux-debug-gcc-x86_64.result }}" == "cancelled" ]]; then 244 echo "❌ One or more CI jobs failed or were cancelled" 245 exit 1 246 fi 247 248 echo "✅ All CI jobs completed successfully (passed or skipped)!"