Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add a new benchmark recording workflow. #857

Merged
merged 1 commit into from
May 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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 }}
- 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
Loading