Skip to content

Garnet CI BDN.benchmark #62

Garnet CI BDN.benchmark

Garnet CI BDN.benchmark #62

name: Garnet CI BDN.benchmark
on:
workflow_dispatch:
push:
branches:
- main
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
permissions:
actions: write
deployments: write #permission to deploy GitHub pages website
contents: write # permission to update benchmark contents in gh-pages branch
jobs:
changes:
name: Check for changes
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Apply filter
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
website:
- 'website/**'
bdnbenchmark:
- '!((*.md)|(website/**))'
# Job to build and run BDN.benchmark
build-run-bdnbenchmark:
name: BDNBenchmark
needs: [changes]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
framework: [ 'net8.0' ]
configuration: [ 'Release' ]
test: [ 'Operations.BasicOperations', 'Operations.ObjectOperations', 'Cluster.ClusterMigrate', 'Cluster.ClusterOperations', 'Lua.LuaScripts' ]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Run BDN.benchmark Perf Test
run: ./test/BDNPerfTests/run_bdnperftest.ps1 ${{ matrix.test }}
shell: pwsh
continue-on-error: false
- name: Upload test results to artifacts
uses: actions/upload-artifact@v4
with:
name: Results-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }}-${{ matrix.test }}
path: |
./test/BDNPerfTests/results
if: ${{ always() }}
- name: Upload Error Log to artifacts
uses: actions/upload-artifact@v4
with:
name: ErrorLog-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }}-${{ matrix.test }}
path: |
./test/BDNPerfTests/errorlog
if: ${{ always() }}
# Run `github-action-benchmark` action to get Commit Comment
- name: Store benchmark result for commit comment
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'benchmarkdotnet'
output-file-path: ./test/BDNPerfTests/BenchmarkDotNet.Artifacts/results/BDN.benchmark.${{ matrix.test }}-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
alert-threshold: '150%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@darrenge'
summary-always: false
gh-pages-branch: 'continuousbenchmark'
benchmark-data-dir-path: 'website/static/charts'
auto-push: true
# Run `github-action-benchmark` action for the Continuous Benchmarking Charts
- name: Store benchmark result for charts
uses: benchmark-action/github-action-benchmark@v1
with:
name: ${{matrix.test}} (${{matrix.os}} ${{matrix.framework}} ${{matrix.configuration}})
tool: 'benchmarkdotnet'
output-file-path: ./test/BDNPerfTests/BenchmarkDotNet.Artifacts/results/BDN.benchmark.${{ matrix.test }}-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
summary-always: true
gh-pages-branch: 'continuousbenchmark'
benchmark-data-dir-path: 'website/static/charts'
auto-push: true
max-items-in-chart: 50