summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorvenkataram-nv <vedavamadath@nvidia.com>2024-09-04 10:18:54 -0700
committerGitHub <noreply@github.com>2024-09-04 10:18:54 -0700
commit56a3c028a6725e13a2ae3a724eaee05ad9f4802a (patch)
tree1c6e2480190396057545cd43bacc51d2ef8e4fe2 /.github/workflows
parent1673cf934b0871a6dd3b552a80913a5737fa3f61 (diff)
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
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/benchmark.yml2
-rw-r--r--.github/workflows/push-benchmark-results.yml62
2 files changed, 63 insertions, 1 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 1600d1014..eb90492f3 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -21,7 +21,7 @@ concurrency:
jobs:
build:
- runs-on: [Windows, benchmark, self-hosted]
+ runs-on: [Windows, self-hosted]
steps:
- uses: actions/checkout@v3
with:
diff --git a/.github/workflows/push-benchmark-results.yml b/.github/workflows/push-benchmark-results.yml
new file mode 100644
index 000000000..ba0808381
--- /dev/null
+++ b/.github/workflows/push-benchmark-results.yml
@@ -0,0 +1,62 @@
+name: Push MDL Benchmark Results
+
+on:
+ push:
+ branches: [master]
+ paths-ignore:
+ - 'docs/**'
+ - 'LICENCE'
+ - 'CONTRIBUTION.md'
+ - 'README.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ runs-on: [Windows, self-hosted]
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: 'true'
+ 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@v3
+ with:
+ repository: 'shader-slang/MDL-SDK'
+ path: 'external/MDL-SDK'
+ - 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 16 --target dxil
+ - uses: actions/checkout@v3
+ with:
+ repository: 'shader-slang/slang-material-modules-benchmark'
+ path: 'external/slang-material-modules-benchmark'
+ token: ${{ secrets.SLANG_MDL_BENCHMARK_RESULTS_PAT }}
+ - name: Push results
+ run: |
+ cp tools/benchmark/benchmarks.json external\slang-material-modules-benchmark
+ echo $(Invoke-Expression "git log -1 --pretty=%s") > external\slang-material-modules-benchmark\commit
+ echo $(Invoke-Expression "git log -1 --pretty=%H") > external\slang-material-modules-benchmark\commit-hash
+ echo $(Invoke-Expression "git log -1 --pretty=%s") > external\slang-material-modules-benchmark\current
+ echo $(Invoke-Expression "git log -1 --pretty=%H") >> external\slang-material-modules-benchmark\current
+ cd external\slang-material-modules-benchmark
+ ls
+ git add benchmarks.json current
+ git commit -m "$(cat commit)" -m "https://github.com/shader-slang/slang/commit/$(cat commit-hash)"
+ git log
+ git push