summaryrefslogtreecommitdiffstats
path: root/.github/workflows/benchmark.yml
blob: 7542c50d90d9857cb22083f91fa09f881d39de66 (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
name: MDL Benchmark

on:
  pull_request:
    branches: [master]
    paths-ignore:
      - "docs/**"
      - "LICENSES/**"
      - "LICENSE"
      - "CONTRIBUTING.md"
      - "README.md"
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: [Windows, self-hosted]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: "recursive"
          fetch-depth: "0"
      - name: Common setup
        uses: ./.github/actions/common-setup
        with:
          os: windows
          compiler: cl
          platform: x86_64
          config: release
          build-llvm: true
      - name: Build Slang
        run: |
          cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM -DCMAKE_COMPILE_WARNING_AS_ERROR=false
          cmake --workflow --preset release
      - uses: actions/checkout@v4
        with:
          repository: "shader-slang/MDL-SDK"
          path: "external/MDL-SDK"
          sparse-checkout: |
            ./examples/mdl_sdk/dxr/content/slangified
      - name: Run benchmark
        run: |
          cd tools/benchmark
          cp ../../external/MDL-SDK/examples/mdl_sdk/dxr/content/slangified/*.slang .
          pip install prettytable argparse
          python compile.py --samples 1 --target dxil