1
+ name : Push MDL Benchmark Results
2
+
3
+ on :
4
+ push :
5
+ branches : [master, push-benchmark-results]
6
+ paths-ignore :
7
+ - ' docs/**'
8
+ - ' LICENCE'
9
+ - ' CONTRIBUTION.md'
10
+ - ' README.md'
11
+ concurrency :
12
+ group : ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress : true
14
+
15
+ jobs :
16
+ build :
17
+ runs-on : [Windows, self-hosted]
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+ with :
21
+ submodules : ' true'
22
+ fetch-depth : ' 0'
23
+ - name : Common setup
24
+ uses : ./.github/actions/common-setup
25
+ with :
26
+ os : windows
27
+ compiler : cl
28
+ platform : x86_64
29
+ config : release
30
+ build-llvm : true
31
+ - name : Build Slang
32
+ run : |
33
+ cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM -DCMAKE_COMPILE_WARNING_AS_ERROR=false
34
+ cmake --workflow --preset release
35
+ - uses : actions/checkout@v3
36
+ with :
37
+ repository : ' shader-slang/MDL-SDK'
38
+ path : ' external/MDL-SDK'
39
+ - name : Run benchmark
40
+ run : |
41
+ cd tools/benchmark
42
+ cp ../../external/MDL-SDK/examples/mdl_sdk/dxr/content/slangified/*.slang .
43
+ pip install prettytable argparse
44
+ python compile.py --samples 1 --target dxil
45
+ - uses : actions/checkout@v3
46
+ with :
47
+ repository : ' shader-slang/slang-material-modules-benchmark'
48
+ path : ' external/slang-material-modules-benchmark'
49
+ token : ${{ secrets.SLANG_MDL_BENCHMARK_RESULTS_PAT }}
50
+ - name : Push results
51
+ run : |
52
+ cp tools/benchmark/benchmarks.json external\slang-material-modules-benchmark
53
+ echo $(Invoke-Expression "git log -1 --pretty=%s") > external\slang-material-modules-benchmark\commit
54
+ echo $(Invoke-Expression "git log -1 --pretty=%H") > external\slang-material-modules-benchmark\commit-hash
55
+ echo $(Invoke-Expression "git log -1 --pretty=%s") > external\slang-material-modules-benchmark\current
56
+ echo $(Invoke-Expression "git log -1 --pretty=%H") >> external\slang-material-modules-benchmark\current
57
+ cd external\slang-material-modules-benchmark
58
+ ls
59
+ git add benchmarks.json current
60
+ git commit -m "$(cat commit)" -m "https://github.com/shader-slang/slang/commit/$(cat commit-hash)"
61
+ git log
62
+ git push
0 commit comments