-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (42 loc) · 1.18 KB
/
benchmarks.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
50
51
name: Update benchmarks
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
push:
branches:
- main
jobs:
run_benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
check-latest: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install the latest versions of each library
run: go get -u ./... && go mod tidy
- name: Install gobenchdata
run: go install go.bobheadxi.dev/gobenchdata@latest
- name: Benchmark Go Logging Libraries
run: go test -bench . -benchmem ./... | gobenchdata --json bench.json
- name: Install dependencies
working-directory: ./docs
run: npm install
- name: Bundle
working-directory: ./docs
run: npm run build:prod
- name: Commit benchmark results to repo
uses: EndBug/add-and-commit@v9
with:
message: Update benchmark results
commit: '--no-verify'