-
-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (43 loc) · 1.69 KB
/
continous-benchmark.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
name: Run benchmark
on:
pull_request:
branches: [ main ]
jobs:
benchmark:
name: Continuous benchmarking
runs-on: windows-2019
defaults:
run:
working-directory: ./src
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
# Run benchmark with `go test -bench` and stores the output to a file
- name: Run benchmark
run: dotnet run --project ./GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj -c Release -- --job medium -f *SerializeAndDeserialize*
# 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: Happypig375/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: 'src/BenchmarkDotNet.Artifacts/results/GeoJSON.Text.Test.Benchmark.SerializeAndDeserialize-report-full.json'
# Where the previous data file is stored
external-data-json-path: ./cache/benchmark-data.json
# Will comment on pull request when an alert happens
comment-always: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Upload the updated cache file for the next job by actions/cache
# Run `github-action-benchmark` action