From f979f148c11780a28fc23aafc2c68feab20b340a Mon Sep 17 00:00:00 2001 From: tommady Date: Sat, 14 Oct 2023 13:33:43 +0800 Subject: [PATCH] fuzz: store the corpus using GitHub Cache (#5363) --- .github/workflows/CICD.yml | 1 - .github/workflows/fuzzing.yml | 32 ++++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index b971b0e00..6583a0094 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -1012,4 +1012,3 @@ jobs: flags: ${{ steps.vars.outputs.CODECOV_FLAGS }} name: codecov-umbrella fail_ci_if_error: false - diff --git a/.github/workflows/fuzzing.yml b/.github/workflows/fuzzing.yml index 677df2c9f..311d6a0d7 100644 --- a/.github/workflows/fuzzing.yml +++ b/.github/workflows/fuzzing.yml @@ -24,41 +24,41 @@ jobs: - name: Install `cargo-fuzz` run: cargo install cargo-fuzz - uses: Swatinem/rust-cache@v2 + - name: Restore Cached Corpus + uses: actions/cache/restore@v3 + with: + key: corpus-cache + path: | + fuzz/corpus - name: Run fuzz_date for XX seconds - shell: bash - run: | - ## Run it - cd fuzz - cargo +nightly fuzz run fuzz_date -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 - - name: Run fuzz_test for XX seconds continue-on-error: true shell: bash run: | - ## Run it - cd fuzz + cargo +nightly fuzz run fuzz_date -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 + - name: Run fuzz_test for XX seconds + shell: bash + run: | cargo +nightly fuzz run fuzz_test -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 - name: Run fuzz_expr for XX seconds continue-on-error: true shell: bash run: | - ## Run it - cd fuzz cargo +nightly fuzz run fuzz_expr -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 - name: Run fuzz_parse_glob for XX seconds shell: bash run: | - ## Run it - cd fuzz cargo +nightly fuzz run fuzz_parse_glob -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 - name: Run fuzz_parse_size for XX seconds shell: bash run: | - ## Run it - cd fuzz cargo +nightly fuzz run fuzz_parse_size -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 - name: Run fuzz_parse_time for XX seconds shell: bash run: | - ## Run it - cd fuzz cargo +nightly fuzz run fuzz_parse_time -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 + - name: Save Corpus Cache + uses: actions/cache/save@v3 + with: + key: corpus-cache + path: | + fuzz/corpus