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

Fix benchmark that does not compare the exact result from the previous commit #5664

Merged
merged 5 commits into from
Aug 1, 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
10 changes: 9 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ jobs:
uses: actions/cache@v4
with:
path: ./benchmarks
key: ${{ runner.os }}-benchmark
# Use the current commit SHA as the cache key.
# This key won't exist on the first run, so the cache match falls back to restore-keys.
# Though, it won't be matched, the cache created will use this key as the cache key.
# So the next commit will be able to restore this cache (from the restore-keys).
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
key: ${{ runner.os }}-benchmark-${{ github.sha }}
# `github.event.before` means the commit before the push (i.e. the previous commit).
# So we can fetch the exact benchmark data from the previous commit.
restore-keys: ${{ runner.os }}-benchmark-${{ github.event.before }}
pellared marked this conversation as resolved.
Show resolved Hide resolved
- name: Store benchmarks result
uses: benchmark-action/[email protected]
with:
Expand Down