Skip to content

Commit 56a3c02

Browse files
Push benchmark results to a viewable page (#4996)
* Push benchmark results to slang-material-modules results page (#4993) * Increasing sample count for push benchmark pipeline * Enable only for master branch
1 parent 1673cf9 commit 56a3c02

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

.github/workflows/benchmark.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121

2222
jobs:
2323
build:
24-
runs-on: [Windows, benchmark, self-hosted]
24+
runs-on: [Windows, self-hosted]
2525
steps:
2626
- uses: actions/checkout@v3
2727
with:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Push MDL Benchmark Results
2+
3+
on:
4+
push:
5+
branches: [master]
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 16 --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

Comments
 (0)