Skip to content

Commit e8ef900

Browse files
gha: use stable version of golang in CI
benchstat@latest became incompatible with the go version 1.20 from go.mod. Instead of using what's inside go.mod, use latest stable. Inside go.mod I want to keep as old as possible go version as to not cause trouble to users with older installs.
1 parent 9ab9e39 commit e8ef900

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ jobs:
1818
- name: Install Go
1919
uses: actions/[email protected]
2020
with:
21-
go-version-file: 'go.mod'
21+
go-version: 'stable'
22+
- run: go install golang.org/x/perf/cmd/benchstat@latest
2223

2324
# 30 runs with 100ms benchtime seems to result in acceptable p-values
2425
# When I tried with count=10, it would be unreliable because of the actions
2526
# runner is in a shared environment and CPU and mem would be affected by others. (or so I think)
2627
- run: go test -run=none -bench=. -count=30 -benchtime=100ms -timeout=20m > /tmp/prev
28+
2729
- name: Checkout code
2830
uses: actions/[email protected]
31+
# Second run of benchmarks
2932
- run: go test -run=none -bench=. -count=30 -benchtime=100ms -timeout=20m > /tmp/curr
3033

31-
- run: go install golang.org/x/perf/cmd/benchstat@latest
3234
- run: benchstat /tmp/prev /tmp/curr

0 commit comments

Comments
 (0)