-
Notifications
You must be signed in to change notification settings - Fork 53
49 lines (40 loc) · 1.07 KB
/
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: Benchmark Go code
on:
pull_request:
branches:
- main
permissions:
pull-requests: write
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.ver
cache: false
- name: Fetch test rules
run: make -C cmd/pint/bench fetch
- name: Benchmark PR branch
run: |
make benchmark | tee new.txt
- name: Benchmark main branch
run: |
git fetch origin main
git reset --hard FETCH_HEAD
make benchmark | tee old.txt
- name: Diff benchmarks
run: |
git reset --hard ${GITHUB_SHA}
make benchmark-diff
- name: Report
if: ${{ github.event.pull_request.head.repo.full_name == 'cloudflare/pint' }}
uses: thollander/actions-comment-pull-request@v2
with:
filePath: benchstat.txt
comment_tag: benchstat