summaryrefslogtreecommitdiffstats
path: root/.github/workflows/vk-gl-cts-nightly.yml
blob: e329b9e18acbbc32e83a2b5de631781e5d0f4c96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: VK-GL-CTS Nightly

on:
  workflow_dispatch:
  schedule:
    - cron: "00 07 * * *"
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
env:
  DISABLE_CTS_SLANG: 0
  ACTIONS_RUNNER_DEBUG: true
  ACTIONS_STEP_DEBUG: true
jobs:
  build:
    strategy:
      matrix:
        include:
          # Self-hosted falcor tests
          - os: windows
            compiler: cl
            platform: x86_64
            config: release
            warnings-as-errors: true
            test-category: full
            full-gpu-tests: false
            runs-on: [Windows, self-hosted]
    runs-on: ${{ matrix.runs-on }}
    timeout-minutes: 180
    defaults:
      run:
        shell: bash
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: "true"
          fetch-depth: "0"
      - name: Setup
        uses: ./.github/actions/common-setup
        with:
          os: ${{matrix.os}}
          compiler: ${{matrix.compiler}}
          platform: ${{matrix.platform}}
          config: ${{matrix.config}}
          build-llvm: true
      - name: Build Slang
        run: |
          # Prepare ccache launcher arguments if ccache is available
          cmake_launcher_defines=()
          if [[ -n "${ccache_symlinks_path:-}" ]]; then
            echo "🔧 Using ccache with launcher: ${ccache_symlinks_path}"
            echo "🔧 CCACHE_DIR is set to: ${CCACHE_DIR:-'not set'}"
            cmake_launcher_defines+=("-DCMAKE_C_COMPILER_LAUNCHER=${ccache_symlinks_path}")
            cmake_launcher_defines+=("-DCMAKE_CXX_COMPILER_LAUNCHER=${ccache_symlinks_path}")
          else
            echo "ℹ️  ccache_symlinks_path not set - building without ccache"
          fi
          cmake --preset default --fresh \
            -DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
            -DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
            -DSLANG_ENABLE_CUDA=1 \
            -DSLANG_ENABLE_EXAMPLES=0 \
            -DSLANG_ENABLE_GFX=1 \
            -DSLANG_ENABLE_TESTS=1 \
            "${cmake_launcher_defines[@]}"
          cmake --workflow --preset "${{matrix.config}}"
      - uses: robinraju/release-downloader@v1.11
        with:
          latest: true
          repository: "shader-slang/VK-GL-CTS"
          fileName: "VK-GL-CTS_WithSlang-0.0.7-win64.zip"
      - uses: actions/checkout@v4
        with:
          repository: "shader-slang/VK-GL-CTS"
          sparse-checkout: |
            test-lists/slang-passing-tests.txt
            test-lists/slang-waiver-tests.xml
          path: test-lists
          sparse-checkout-cone-mode: false
      - name: vkcts setup
        shell: pwsh
        run: |
          Expand-Archive VK-GL-CTS_WithSlang-0.0.7-win64.zip

          copy ${{ github.workspace }}\build\Release\bin\slang.dll ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang.dll
          copy ${{ github.workspace }}\build\Release\bin\slang-glslang.dll ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-glslang.dll
          copy ${{ github.workspace }}\build\Release\bin\slang-glsl-module.dll ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\slang-glsl-module.dll
          copy ${{ github.workspace }}\build\Release\bin\test-server.exe ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64\test-server.exe

          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
          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

      - name: dump device info
        shell: pwsh
        working-directory: ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64
        run: |
          .\deqp-vk.exe --deqp-case=dEQP-VK.info.device
          Get-Content -Path TestResults.qpa

      - name: vkcts run
        shell: pwsh
        working-directory: ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64
        run: |
          .\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

      - name: Dump TestResults.qpa if failed
        shell: pwsh
        if: ${{ !success() }}
        working-directory: ${{ github.workspace }}\VK-GL-CTS_WithSlang-0.0.7-win64
        run: Get-Content TestResults.qpa -Tail 1000

      - name: success notification
        id: slack-notify-success
        if: ${{ github.event_name == 'schedule' && success() }}
        uses: slackapi/slack-github-action@v1.26.0
        with:
          payload: |
            {
              "CTS-Nightly": ":green-check-mark: CTS nightly status: ${{ job.status }}"
            }
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
      - name: failure notification
        id: slack-notify-failure
        if: ${{ github.event_name == 'schedule' && !success() }}
        uses: slackapi/slack-github-action@v1.26.0
        with:
          payload: |
            {
              "CTS-Nightly": ":alert: :alert: :alert: :alert: :alert: :alert:\nCTS nightly status: ${{ job.status }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
            }
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}