File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,29 @@ jobs:
267267 - name : Install Rust 1.80 toolchain
268268 run : |
269269 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain 1.80
270+ # This is read-only for PRs. It seeds the fuzzer for a more effective run.
271+ # NOTE: The `key` is unique and will always miss, forcing a fallback to
272+ # the `restore-keys` to find the latest global cache from the `main` branch.
273+ - name : Restore persistent fuzz corpus (PR)
274+ if : ${{ github.ref != 'refs/heads/main' }}
275+ uses : actions/cache/restore@v4
276+ with :
277+ path : fuzz/hfuzz_workspace
278+ key : fuzz-corpus-${{ github.ref }}-${{ github.sha }}
279+ restore-keys : |
280+ fuzz-corpus-refs/heads/main-
281+ # The `restore-keys` performs a prefix search to find the most recent
282+ # cache from a previous `main` run. We then save with a new, unique
283+ # `key` (using the SHA) to ensure the cache is always updated,
284+ # as caches are immutable.
285+ - name : Restore/Save persistent honggfuzz corpus (Main)
286+ if : ${{ github.ref == 'refs/heads/main' }}
287+ uses : actions/cache@v4
288+ with :
289+ path : fuzz/hfuzz_workspace
290+ key : fuzz-corpus-refs/heads/main-${{ github.sha }}
291+ restore-keys : |
292+ fuzz-corpus-refs/heads/main-
270293 - name : Sanity check fuzz targets on Rust 1.80
271294 run : |
272295 cd fuzz
You can’t perform that action at this time.
0 commit comments