-
Notifications
You must be signed in to change notification settings - Fork 115
49 lines (47 loc) · 1.47 KB
/
protocol-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
47
48
49
name: Protocol Benchmark
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'protocol/**'
push:
branches:
- main
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- 'protocol/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Prune Docker system to free up space
run: |
docker system prune -a --volumes -f
- name: Run Benchmarks
run: make benchmark | tee ./benchmark_output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'go'
output-file-path: ./protocol/benchmark_output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true
alert-threshold: '150%'
save-data-file: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}