Skip to content

Commit

Permalink
ci: Add a new benchmark recording workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed May 4, 2024
1 parent d6fd429 commit cef3bd4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: benchmark
on:
# Test new changes
pull_request:
push:
branches:
# Record on merges to main
- main

jobs:
benchmark:
runs-on: ubuntu-latest
permissions:
# For benchmark-action comment-always
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- run: make bench
env:
HEAD_REF: ${{ env.GITHUB_REF_NAME }}
BENCH_COUNT: 5
- uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- uses: benchmark-action/[email protected]
with:
tool: 'go'
output-file-path: test-results/benchmark-results-${{ env.GITHUB_REF_NAME }}.txt
external-data-json-path: ./cache/benchmark-data.json
save-data-file: ${{ github.event_name != 'pull_request' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-always: true
summary-always: true

0 comments on commit cef3bd4

Please sign in to comment.