-
-
Notifications
You must be signed in to change notification settings - Fork 164
39 lines (38 loc) · 1.1 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
name: Benchmark
on:
schedule:
- cron: '0 5 * * 1'
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.21', '1.20' ]
name: "Test [ Go ${{ matrix.go }} / JSON Backend ${{ matrix.json_backend }} ]"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Go stable version
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: Install benchstat
run: |
go install golang.org/x/perf/cmd/benchstat@latest
- name: Benchmark (comparison)
run: |
cd bench/comparison && make stdlib && make goccy
- name: Benchmark (performance)
run: |
cd bench/performance && make stdlib && make goccy && make benchstat