...
1name: Benchmark
2on:
3 schedule:
4 - cron: '0 5 * * 1'
5 workflow_dispatch: {}
6
7jobs:
8 build:
9 runs-on: ubuntu-latest
10 strategy:
11 matrix:
12 go: [ '1.17.x', '1.16.x' ]
13 name: "Test [ Go ${{ matrix.go }} / JSON Backend ${{ matrix.json_backend }} ]"
14 steps:
15 - name: Checkout repository
16 uses: actions/checkout@v2
17 - name: Cache Go modules
18 uses: actions/cache@v2
19 with:
20 path: |
21 ~/go/pkg/mod
22 ~/.cache/go-build
23 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
24 restore-keys: |
25 ${{ runner.os }}-go-
26 - name: Install Go stable version
27 uses: actions/setup-go@v2
28 with:
29 go-version: ${{ matrix.go }}
30 - name: Install benchstat
31 run: |
32 go install golang.org/x/perf/cmd/benchstat@latest
33 - name: Benchmark (comparison)
34 run: |
35 cd bench/comparison && make stdlib && make goccy
36 - name: Benchmark (performance)
37 run: |
38 cd bench/performance && make stdlib && make goccy && make benchstat
View as plain text