-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (45 loc) · 1.52 KB
/
update-benchmarks.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
name: Update Benchmarks
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Run Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Run benchmark
working-directory: ./Benchmarks
run: dotnet run -c Release --exporters json --filter '*' --memory --join
- name: Get benchmark file name
id: benchmarkfilename
working-directory: ./Benchmarks/BenchmarkDotNet.Artifacts/results
run: |
filePath=$(find . -type f -name 'BenchmarkRun-joined-*-report-full-compressed.json' | rev | cut -d '/' -f1 | rev)
echo $filePath
echo "::set-output name=file::$filePath"
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Benchmark.Net Benchmark
tool: 'benchmarkdotnet'
output-file-path: Benchmarks/BenchmarkDotNet.Artifacts/results/${{ steps.benchmarkfilename.outputs.file }}
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@timmoth'
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Benchmark
path: Benchmark/BenchmarkDotNet.Artifacts/results/