yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Gangzheng TongSend notification only on scheduled CTS runs (#8418)e554e1b72

master
5.4 KiB133 linesraw
1name: VK-GL-CTS Nightly
2
3on:
4  workflow_dispatch:
5  schedule:
6    - cron: "00 07 * * *"
7concurrency:
8  group: ${{ github.workflow }}-${{ github.ref }}
9  cancel-in-progress: true
10env:
11  DISABLE_CTS_SLANG: 0
12  ACTIONS_RUNNER_DEBUG: true
13  ACTIONS_STEP_DEBUG: true
14jobs:
15  build:
16    strategy:
17      matrix:
18        include:
19          # Self-hosted falcor tests
20          - os: windows
21            compiler: cl
22            platform: x86_64
23            config: release
24            warnings-as-errors: true
25            test-category: full
26            full-gpu-tests: false
27            runs-on: [Windows, self-hosted]
28    runs-on: ${{ matrix.runs-on }}
29    timeout-minutes: 180
30    defaults:
31      run:
32        shell: bash
33    steps:
34      - uses: actions/checkout@v4
35        with:
36          submodules: "true"
37          fetch-depth: "0"
38      - name: Setup
39        uses: ./.github/actions/common-setup
40        with:
41          os: ${{matrix.os}}
42          compiler: ${{matrix.compiler}}
43          platform: ${{matrix.platform}}
44          config: ${{matrix.config}}
45          build-llvm: true
46      - name: Build Slang
47        run: |
48          # Prepare ccache launcher arguments if ccache is available
49          cmake_launcher_defines=()
50          if [[ -n "${ccache_symlinks_path:-}" ]]; then
51            echo "🔧 Using ccache with launcher: ${ccache_symlinks_path}"
52            echo "🔧 CCACHE_DIR is set to: ${CCACHE_DIR:-'not set'}"
53            cmake_launcher_defines+=("-DCMAKE_C_COMPILER_LAUNCHER=${ccache_symlinks_path}")
54            cmake_launcher_defines+=("-DCMAKE_CXX_COMPILER_LAUNCHER=${ccache_symlinks_path}")
55          else
56            echo "â„šī¸  ccache_symlinks_path not set - building without ccache"
57          fi
58          cmake --preset default --fresh \
59            -DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
60            -DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
61            -DSLANG_ENABLE_CUDA=1 \
62            -DSLANG_ENABLE_EXAMPLES=0 \
63            -DSLANG_ENABLE_GFX=1 \
64            -DSLANG_ENABLE_TESTS=1 \
65            "${cmake_launcher_defines[@]}"
66          cmake --workflow --preset "${{matrix.config}}"
67      - uses: robinraju/release-downloader@v1.11
68        with:
69          latest: true
70          repository: "shader-slang/VK-GL-CTS"
71          fileName: "VK-GL-CTS_WithSlang-0.0.7-win64.zip"
72      - uses: actions/checkout@v4
73        with:
74          repository: "shader-slang/VK-GL-CTS"
75          sparse-checkout: |
76            test-lists/slang-passing-tests.txt
77            test-lists/slang-waiver-tests.xml
78          path: test-lists
79          sparse-checkout-cone-mode: false
80      - name: vkcts setup
81        shell: pwsh
82        run: |
83          Expand-Archive VK-GL-CTS_WithSlang-0.0.7-win64.zip
84
85          copy ${{ github.workspace }}\build\Release\bin\slang.dll ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang.dll
86          copy ${{ github.workspace }}\build\Release\bin\slang-glslang.dll ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-glslang.dll
87          copy ${{ github.workspace }}\build\Release\bin\slang-glsl-module.dll ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-glsl-module.dll
88          copy ${{ github.workspace }}\build\Release\bin\test-server.exe ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\test-server.exe
89
90          copy ${{ github.workspace }}\test-lists\test-lists\slang-passing-tests.txt ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-passing-tests.txt
91          copy ${{ github.workspace }}\test-lists\test-lists\slang-waiver-tests.xml ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-waiver-tests.xml
92
93      - name: dump device info
94        shell: pwsh
95        working-directory: ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64
96        run: |
97          .\deqp-vk.exe --deqp-case=dEQP-VK.info.device
98          Get-Content -Path TestResults.qpa
99
100      - name: vkcts run
101        shell: pwsh
102        working-directory: ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64
103        run: |
104          .\deqp-vk.exe --deqp-archive-dir=${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64 --deqp-caselist-file=${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-passing-tests.txt --deqp-waiver-file=${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-waiver-tests.xml
105
106      - name: Dump TestResults.qpa if failed
107        shell: pwsh
108        if: ${{ !success() }}
109        working-directory: ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64
110        run: Get-Content TestResults.qpa -Tail 1000
111
112      - name: success notification
113        id: slack-notify-success
114        if: ${{ github.event_name == 'schedule' && success() }}
115        uses: slackapi/slack-github-action@v1.26.0
116        with:
117          payload: |
118            {
119              "CTS-Nightly": ":green-check-mark: CTS nightly status: ${{ job.status }}"
120            }
121        env:
122          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
123      - name: failure notification
124        id: slack-notify-failure
125        if: ${{ github.event_name == 'schedule' && !success() }}
126        uses: slackapi/slack-github-action@v1.26.0
127        with:
128          payload: |
129            {
130              "CTS-Nightly": ":alert: :alert: :alert: :alert: :alert: :alert:\nCTS nightly status: ${{ job.status }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
131            }
132        env:
133          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}