Skip to content

Garnet CI BDN.benchmark #103

Garnet CI BDN.benchmark

Garnet CI BDN.benchmark #103

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 continuousbenchmark 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', 'Operations.HashObjectOperations', 'Cluster.ClusterMigrate', 'Cluster.ClusterOperations', 'Lua.LuaScripts', 'Operations.CustomOperations', 'Operations.RawStringOperations', 'Operations.ScriptOperations' ]
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 for the Continuous Benchmarking Charts (https://microsoft.github.io/garnet/charts/)
- name: Store benchmark result for charts
if: github.ref == 'refs/heads/main'
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
# Run `github-action-benchmark` action for the Continuous Benchmarking Summary
- name: Generate summary for benchmark result
if: github.ref != 'refs/heads/main'
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
save-data-file: false
gh-pages-branch: 'continuousbenchmark'
benchmark-data-dir-path: 'website/static/charts'