Skip to content

Push benchmark results to viewing page #2

Push benchmark results to viewing page

Push benchmark results to viewing page #2

Workflow file for this run

name: Push MDL Benchmark Results
on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
pull_request:
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, benchmark, 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
- name: Run benchmark
run: |
cd tools/benchmark
pip install prettytable argparse
Copy-Item -Path C:\slang-benchmarks -Destination . -Recurse
python compile.py --samples 16 --target dxil --ci
- name: Push results
run: |
cp tools/benchmark/benchmarks.json C:\slang-material-modules-benchmark
echo $(Invoke-Expression "git log -1 --pretty=%s") > C:\slang-material-modules-benchmark\commit
echo $(Invoke-Expression "git log -1 --pretty=%H") > C:\slang-material-modules-benchmark\commit-hash
echo $(Invoke-Expression "git log -1 --pretty=%s") > C:\slang-material-modules-benchmark\current
echo $(Invoke-Expression "git log -1 --pretty=%H") >> C:\slang-material-modules-benchmark\current
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