yum-mirror/slang

Making it easier to work with shaders

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

Yong HeDisable more CI workflows on master push. (#7983)42dc521f7

master
3.6 KiB110 linesraw
1# This is a basic workflow to help you get started with Actions
2
3name: Falcor Compiler Perf-Test
4
5on:
6  pull_request:
7    branches: [master]
8    paths-ignore:
9      - "docs/**"
10      - "LICENSES/**"
11      - "LICENSE"
12      - "CONTRIBUTING.md"
13      - "README.md"
14concurrency:
15  group: ${{ github.workflow }}-${{ github.ref }}
16  cancel-in-progress: true
17jobs:
18  build:
19    timeout-minutes: 100
20    continue-on-error: false
21    strategy:
22      fail-fast: false
23      matrix:
24        os: [windows]
25        config: [release]
26        compiler: [cl]
27        platform: [x86_64]
28        include:
29          # Self-hosted falcor tests
30          - warnings-as-errors: true
31            test-category: full
32            full-gpu-tests: false
33            runs-on: [Windows, self-hosted, perf]
34    runs-on: ${{ matrix.runs-on }}
35    defaults:
36      run:
37        shell: bash
38    steps:
39      - uses: actions/checkout@v4
40        with:
41          submodules: "recursive"
42          fetch-depth: "0"
43
44      - name: Setup
45        uses: ./.github/actions/common-setup
46        with:
47          os: ${{matrix.os}}
48          compiler: ${{matrix.compiler}}
49          platform: ${{matrix.platform}}
50          config: ${{matrix.config}}
51          build-llvm: true
52
53      - name: Build Slang
54        run: |
55          cmake --preset default --fresh \
56            -DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
57            -DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
58            -DSLANG_ENABLE_CUDA=1
59          cmake --workflow --preset "${{matrix.config}}"
60
61      - uses: robinraju/release-downloader@v1.12
62        id: download
63        with:
64          # The source repository path.
65          # Expected format {owner}/{repo}
66          # Default: ${{ github.repository }}
67          repository: "shader-slang/falcor-compile-perf-test"
68
69          # A flag to set the download target as latest release
70          # The default value is 'false'
71          latest: true
72
73          # The name of the file to download.
74          # Use this field only to specify filenames other than tarball or zipball, if any.
75          # Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..)
76          fileName: "falcor_perf_test-*-win-64.zip"
77
78          # Relative path under $GITHUB_WORKSPACE to place the downloaded file(s)
79          # It will create the target directory automatically if not present
80          # eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
81          out-file-path: "falcor-perf-test"
82
83          # Somehow there is a bug in this flag, the executable extracted is not runnable. We have to
84          # extract ourselves.
85          extract: false
86
87      - name: run falcor-compiler-perf-test
88        shell: pwsh
89        run: |
90          $ErrorActionPreference = "Stop"
91          $filename = '${{ fromJson(steps.download.outputs.downloaded_files)[0] }}'
92          # Check if the downloaded file exists
93          if (-not (Test-Path $filename)) {
94            Write-Error "Downloaded file not found: $filename"
95            exit 1
96          }
97          Expand-Archive $filename -DestinationPath .\falcor-perf-test
98          $env:PATH = ".\build\${{matrix.config}}\bin;" + $env:PATH
99
100          # View current PATH
101          Write-Host "PATH is $env:PATH"
102
103          # Run the executable and check exit code
104          Write-Host "Running falcor performance test..."
105          & .\falcor-perf-test\bin\Release\falcor_perftest.exe
106          if ($LASTEXITCODE -ne 0) {
107            Write-Error "falcor_perftest.exe failed with exit code: $LASTEXITCODE"
108            exit $LASTEXITCODE
109          }
110          Write-Host "falcor performance test completed successfully"