2022-02-18 21:52:52 +02:00
|
|
|
name: Benchmark
|
|
|
|
on:
|
|
|
|
push:
|
2023-10-12 19:00:18 +02:00
|
|
|
tags:
|
|
|
|
- v1.*
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2022-02-18 21:52:52 +02:00
|
|
|
env:
|
2024-02-08 10:44:35 +02:00
|
|
|
DEFAULT_GO_VERSION: "~1.22.0"
|
2022-02-18 21:52:52 +02:00
|
|
|
jobs:
|
|
|
|
benchmark:
|
|
|
|
name: Benchmarks
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-12 19:00:18 +02:00
|
|
|
timeout-minutes: 15
|
2022-02-18 21:52:52 +02:00
|
|
|
steps:
|
2023-09-10 16:55:55 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-10 17:58:06 +02:00
|
|
|
- uses: actions/setup-go@v5
|
2022-02-18 21:52:52 +02:00
|
|
|
with:
|
|
|
|
go-version: ${{ env.DEFAULT_GO_VERSION }}
|
2023-10-16 11:20:21 +02:00
|
|
|
check-latest: true
|
|
|
|
cache-dependency-path: "**/go.sum"
|
2022-02-18 21:52:52 +02:00
|
|
|
- name: Run benchmarks
|
2023-10-12 19:00:18 +02:00
|
|
|
run: make benchmark | tee output.txt
|
2022-02-18 21:52:52 +02:00
|
|
|
- name: Download previous benchmark data
|
2024-01-21 17:54:08 +02:00
|
|
|
uses: actions/cache@v4
|
2022-02-18 21:52:52 +02:00
|
|
|
with:
|
|
|
|
path: ./benchmarks
|
|
|
|
key: ${{ runner.os }}-benchmark
|
|
|
|
- name: Store benchmarks result
|
2024-02-05 17:24:48 +02:00
|
|
|
uses: benchmark-action/github-action-benchmark@v1.19.3
|
2022-02-18 21:52:52 +02:00
|
|
|
with:
|
|
|
|
name: Benchmarks
|
|
|
|
tool: 'go'
|
|
|
|
output-file-path: output.txt
|
|
|
|
external-data-json-path: ./benchmarks/data.json
|
2023-10-12 19:00:18 +02:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
gh-pages-branch: benchmarks
|
2024-03-28 10:50:27 +02:00
|
|
|
fail-on-alert: true
|
2022-03-04 21:32:49 +02:00
|
|
|
alert-threshold: "400%"
|