File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,12 @@ jobs:
21
21
- name : Run benchmarks
22
22
run : make benchmark | tee output.txt
23
23
- name : Download previous benchmark data
24
- uses : actions/cache@v4
24
+ uses : actions/cache/restore @v4
25
25
with :
26
26
path : ./benchmarks
27
- # Use the current commit SHA as the cache key.
28
- # This key won't exist on the first run, so the cache match falls back to restore-keys.
29
- # Though, it won't be matched, the cache created will use this key as the cache key.
30
- # So the next commit will be able to restore this cache (from the restore-keys).
31
- # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
32
- key : ${{ runner.os }}-benchmark-${{ github.sha }}
33
27
# `github.event.before` means the commit before the push (i.e. the previous commit).
34
28
# So we can fetch the exact benchmark data from the previous commit.
35
- restore-keys : ${{ runner.os }}-benchmark-${{ github.event.before }}
29
+ key : ${{ runner.os }}-benchmark-${{ github.event.before }}
36
30
- name : Store benchmarks result
37
31
uses :
benchmark-action/[email protected]
38
32
with :
46
40
alert-threshold : " 400%"
47
41
# Add benchmark summary to GitHub workflow run report
48
42
summary-always : true
43
+ - name : Save benchmark data
44
+ uses : actions/cache/save@v4
45
+ # The cache will be saved even if a step fails.
46
+ if : always()
47
+ with :
48
+ path : ./benchmarks
49
+ # Use the current commit SHA as the cache key.
50
+ key : ${{ runner.os }}-benchmark-${{ github.sha }}
You can’t perform that action at this time.
0 commit comments