From af1b4145ac5645dc6359321ede29a0d44c1f13bf Mon Sep 17 00:00:00 2001 From: Christopher Cole Date: Sun, 6 Nov 2022 19:41:42 -0800 Subject: [PATCH] Github action: make corpus cache additive The old way would just always use the cached corpus from the first run then never update the cache. If I understand this restore-keys configuration, then this should change the behavior to always update the corpus used in this latest run then try to restore from the most recent run the next time around. --- .github/workflows/fuzz.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index de4936e..53bb255 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -22,15 +22,21 @@ jobs: profile: minimal toolchain: nightly override: true - - name: Install cargo fuzz - run: cargo install cargo-fuzz + - uses: actions-rs/install@v0.1 + name: Install cargo-fuzz + with: + crate: cargo-fuzz + version: latest + use-tool-cache: true - name: Build run: cargo build --verbose - name: Cache fuzzy corpus uses: actions/cache@v3 with: path: fuzz/corpus - key: fuzz-corpus + key: fuzz-corpus-${{ github.run_id }} + restore-keys: | + fuzz-corpus- - name: fuzzy common run: cargo fuzz run common -- -max_total_time=60 - name: fuzzy notes