Garnet CI BDN.benchmark #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Garnet CI BDN.benchmark | |
on: | |
workflow_dispatch: | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_NOLOGO: true | |
jobs: | |
changes: | |
name: Check for changes | |
runs-on: ubuntu-latest # don't need matrix to test where the changes were made in code | |
permissions: | |
pull-requests: read | |
contents: read | |
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: [ 'CI_BDN_Config_RespParseStress', 'CI_BDN_Config_RespTsavoriteStress', 'CI_BDN_Config_RespClusterBench', 'CI_BDN_Config_RespClusterMigrateBench', 'CI_BDN_Config_Lua' ] | |
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 | |
- 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() }} | |
# Download previous benchmark result from cache (if exists) | |
- name: Download previous benchmark data | |
uses: actions/cache@v4 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark | |
# Run `github-action-benchmark` action | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
# What benchmark tool the output.txt came from | |
tool: 'benchmarkdotnet' | |
# Where the output from the benchmark tool is stored | |
#output-file-path: ./test/BDNPerfTests/results/Results-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }}-${{ matrix.test }}.results | |
output-file-path: ./test/BDNPerfTests/results/CI_BDN_Config_RespParseStress_Windows.results | |
#output-file-path: ./test/BDNPerfTests/BenchmarkDotNet.Artifacts/results/BDN.benchmark.Resp.RespParseStress-report-full-compressed.json | |
# Where the previous data file is stored | |
external-data-json-path: ./cache/benchmark-data.json | |
# Workflow will fail when an alert happens | |
fail-on-alert: true | |
# Upload the updated cache file for the next job by actions/cache | |