1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

fuzz: store the corpus using GitHub Cache (#5363)

This commit is contained in:
tommady 2023-10-14 13:33:43 +08:00 committed by GitHub
parent 5f4305df6f
commit f979f148c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 17 deletions

View file

@ -1012,4 +1012,3 @@ jobs:
flags: ${{ steps.vars.outputs.CODECOV_FLAGS }} flags: ${{ steps.vars.outputs.CODECOV_FLAGS }}
name: codecov-umbrella name: codecov-umbrella
fail_ci_if_error: false fail_ci_if_error: false

View file

@ -24,41 +24,41 @@ jobs:
- name: Install `cargo-fuzz` - name: Install `cargo-fuzz`
run: cargo install cargo-fuzz run: cargo install cargo-fuzz
- uses: Swatinem/rust-cache@v2 - 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 - 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 continue-on-error: true
shell: bash shell: bash
run: | run: |
## Run it cargo +nightly fuzz run fuzz_date -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
cd fuzz - 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 cargo +nightly fuzz run fuzz_test -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
- name: Run fuzz_expr for XX seconds - name: Run fuzz_expr for XX seconds
continue-on-error: true continue-on-error: true
shell: bash shell: bash
run: | run: |
## Run it
cd fuzz
cargo +nightly fuzz run fuzz_expr -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 cargo +nightly fuzz run fuzz_expr -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
- name: Run fuzz_parse_glob for XX seconds - name: Run fuzz_parse_glob for XX seconds
shell: bash shell: bash
run: | run: |
## Run it
cd fuzz
cargo +nightly fuzz run fuzz_parse_glob -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 cargo +nightly fuzz run fuzz_parse_glob -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
- name: Run fuzz_parse_size for XX seconds - name: Run fuzz_parse_size for XX seconds
shell: bash shell: bash
run: | run: |
## Run it
cd fuzz
cargo +nightly fuzz run fuzz_parse_size -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 cargo +nightly fuzz run fuzz_parse_size -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
- name: Run fuzz_parse_time for XX seconds - name: Run fuzz_parse_time for XX seconds
shell: bash shell: bash
run: | run: |
## Run it
cd fuzz
cargo +nightly fuzz run fuzz_parse_time -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 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