-
Notifications
You must be signed in to change notification settings - Fork 91
67 lines (56 loc) · 1.77 KB
/
benchmark-baseline.yml
File metadata and controls
67 lines (56 loc) · 1.77 KB
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
name: Benchmark Baseline
on:
push:
branches: [main]
paths:
- 'src/LightningDB/**'
- 'src/LightningDB.Benchmarks/**'
workflow_dispatch:
jobs:
baseline:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build Release
run: dotnet build --configuration Release --no-restore
- name: Run Benchmarks
working-directory: src/LightningDB.Benchmarks
run: |
dotnet run -c Release --no-build -- \
--filter "*" \
--job short \
--exporters json \
--iterationCount 3 \
--warmupCount 1 \
--launchCount 1
- name: Combine benchmark results
run: |
mkdir -p benchmark-cache
# Find all JSON result files and combine them
find src/LightningDB.Benchmarks/BenchmarkDotNet.Artifacts/results \
-name "*-report-full-compressed.json" \
-exec cat {} + > benchmark-cache/baseline.json
- name: Cache baseline results
uses: actions/cache/save@v4
with:
path: benchmark-cache
key: benchmark-baseline-${{ runner.os }}-${{ github.sha }}
- name: Cache baseline results (latest)
uses: actions/cache/save@v4
with:
path: benchmark-cache
key: benchmark-baseline-${{ runner.os }}-latest
- name: Upload baseline artifact
uses: actions/upload-artifact@v4
with:
name: benchmark-baseline-${{ github.sha }}
path: benchmark-cache/
retention-days: 30