6666 if : ${{ github.event_name != 'pull_request' }}
6767 run : python3 ./tools/metacall-benchmarks-merge.py ./build/benchmarks
6868
69+ # Download previous benchmark result from cache (if exists)
70+ - name : Download previous benchmark data
71+ uses : actions/cache@v1
72+ if : ${{ github.event_name != 'pull_request' }}
73+ with :
74+ path : ./cache
75+ key : ${{ matrix.os }}-benchmark
76+
6977 - name : Store benchmark result
7078 uses : benchmark-action/github-action-benchmark@v1
7179 if : ${{ github.event_name != 'pull_request' }}
8290 gh-pages-branch : ${{ github.head_ref || github.ref_name }}
8391 # Output directory
8492 benchmark-data-dir-path : bench/${{ matrix.os }}
93+ # Where the previous data file is stored
94+ external-data-json-path : ./cache/metacall-benchmarks.json
8595
8696 # Upload benchmark artifacts
8797 - name : Upload benchmark artifact
@@ -140,6 +150,14 @@ jobs:
140150 if : ${{ github.event_name != 'pull_request' }}
141151 run : python3 ./tools/metacall-benchmarks-merge.py ./build/benchmarks
142152
153+ # Download previous benchmark result from cache (if exists)
154+ - name : Download previous benchmark data
155+ uses : actions/cache@v1
156+ if : ${{ github.event_name != 'pull_request' }}
157+ with :
158+ path : ./cache
159+ key : ${{ matrix.os }}-benchmark
160+
143161 - name : Store benchmark result
144162 uses : benchmark-action/github-action-benchmark@v1
145163 if : ${{ github.event_name != 'pull_request' }}
@@ -156,6 +174,8 @@ jobs:
156174 gh-pages-branch : ${{ github.head_ref || github.ref_name }}
157175 # Output directory
158176 benchmark-data-dir-path : bench/${{ matrix.os }}
177+ # Where the previous data file is stored
178+ external-data-json-path : ./cache/metacall-benchmarks.json
159179
160180 # Upload benchmark artifacts
161181 - name : Upload benchmark artifact
0 commit comments