-
Notifications
You must be signed in to change notification settings - Fork 20
58 lines (50 loc) · 1.55 KB
/
bench.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
name: Benchmarks
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
deployments: write
contents: write
jobs:
run-solver-benchmarks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install golang
uses: actions/setup-go@v5
- name: Run benchmarks
run: ./stack benchmarks-solver | tee assets/benchmark-output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Report benchmark results
if: github.event_name == 'pull_request'
uses: benchmark-action/github-action-benchmark@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tool: 'go'
output-file-path: assets/benchmark-output.txt
external-data-json-path: ./cache/benchmark-data.json
# Comment when performance degrades >2x
comment-on-alert: true
# Add summary to action run
summary-always: true
auto-push: false
- name: Publish benchmark results
if: github.event_name == 'push' && github.ref_name == 'main'
uses: benchmark-action/github-action-benchmark@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tool: 'go'
output-file-path: assets/benchmark-output.txt
# Add summary to action run
summary-always: true
# Publish gh-pages chart
auto-push: true