forked from microsoft/garnet
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (95 loc) · 3.69 KB
/
ci-bdnbenchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Garnet CI BDN.benchmark
on:
workflow_dispatch:
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 # don't need matrix to test where the changes were made in code
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: [ 'Resp.RespParseStress', 'Resp.RespTsavoriteStress', 'Cluster.RespClusterMigrateBench', 'Cluster.RespClusterBench', 'Resp.RespLuaStress', 'Resp.RespLuaRunnerStress' ]
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: true
- 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 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: '100%'
external-data-json-path: ./cache/benchmark-data.json
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@darrenge'
summary-always: false
auto-push: false # needs to be false if using external-data-json-path
# Run `github-action-benchmark` action
- name: Store benchmark result for charts
uses: benchmark-action/github-action-benchmark@v1
with:
name: BDNBenchmark - ${{matrix.test}} (os ${{matrix.os}}, framework ${{matrix.framework}}, configuration ${{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
auto-push: true