Debian Codegraph @

.github/workflows/benchmark.yml

raw symbols SCIP
1 name: Run benchmarks
2 on:
3 pull_request:
4 branches: [master]
5
6 permissions:
7 contents: read
8
9 concurrency:
10 group: ${{ github.workflow }}-${{ github.ref }}
11 cancel-in-progress: true
12
13 jobs:
14 benchmark:
15 runs-on: ubuntu-latest
16 steps:
17 # Base for comparison is master branch.
18 - name: Checkout code
19 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
20 with:
21 ref: master
22 persist-credentials: false
23 - name: Install Go
24 uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
25 with:
26 go-version: 'stable'
27 - run: |
28 go install golang.org/x/perf/cmd/[email protected]
29 GOBIN=$PWD go install github.com/aclements/perflock/cmd/perflock@b67f3f23152ff6883a38504154abc9ce4f20a442
30 sudo install ./perflock /usr/bin/perflock
31 sudo -b perflock -daemon
32 - run: perflock go test -run=none -bench=. -count=6 -benchtime=200ms -timeout=1h ./... > /tmp/prev
33 - name: Checkout code
34 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
35 with:
36 persist-credentials: false
37 # Second run of benchmarks
38 - run: perflock go test -run=none -bench=. -count=6 -benchtime=200ms -timeout=1h ./... > /tmp/curr
39
40 - run: benchstat /tmp/prev /tmp/curr