2022-02-18 20:52:52 +01:00
|
|
|
name: Benchmark
|
|
|
|
on:
|
|
|
|
push:
|
2023-10-12 12:00:18 -05:00
|
|
|
tags:
|
|
|
|
- v1.*
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2022-02-18 20:52:52 +01:00
|
|
|
env:
|
2024-07-02 23:07:07 -07:00
|
|
|
DEFAULT_GO_VERSION: "~1.22.5"
|
2022-02-18 20:52:52 +01:00
|
|
|
jobs:
|
|
|
|
benchmark:
|
|
|
|
name: Benchmarks
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-12 12:00:18 -05:00
|
|
|
timeout-minutes: 15
|
2022-02-18 20:52:52 +01:00
|
|
|
steps:
|
2023-09-10 07:55:55 -07:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-10 07:58:06 -08:00
|
|
|
- uses: actions/setup-go@v5
|
2022-02-18 20:52:52 +01: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 20:52:52 +01:00
|
|
|
- name: Run benchmarks
|
2023-10-12 12:00:18 -05:00
|
|
|
run: make benchmark | tee output.txt
|
2022-02-18 20:52:52 +01:00
|
|
|
- name: Download previous benchmark data
|
2024-01-21 07:54:08 -08:00
|
|
|
uses: actions/cache@v4
|
2022-02-18 20:52:52 +01:00
|
|
|
with:
|
|
|
|
path: ./benchmarks
|
|
|
|
key: ${{ runner.os }}-benchmark
|
|
|
|
- name: Store benchmarks result
|
2024-05-20 17:11:40 -07:00
|
|
|
uses: benchmark-action/github-action-benchmark@v1.20.3
|
2022-02-18 20:52:52 +01:00
|
|
|
with:
|
|
|
|
name: Benchmarks
|
|
|
|
tool: 'go'
|
|
|
|
output-file-path: output.txt
|
|
|
|
external-data-json-path: ./benchmarks/data.json
|
2023-10-12 12:00:18 -05:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
gh-pages-branch: benchmarks
|
2024-03-28 09:50:27 +01:00
|
|
|
fail-on-alert: true
|
2022-03-04 20:32:49 +01:00
|
|
|
alert-threshold: "400%"
|
2024-07-05 09:31:04 -07:00
|
|
|
# Add benchmark summary to GitHub workflow run report
|
|
|
|
summary-always: true
|