Skip to content

Commit

Permalink
Use R2 bucket to persist fuzz corpus (#844)
Browse files Browse the repository at this point in the history
Unfortunately github caches have annoying behaviour when it comes to
updates

In our case we always want to restore what's there and after the run
upload
augmented corpus which is annoying to do with github actions
  • Loading branch information
robert3005 authored Sep 17, 2024
1 parent 8137a0e commit 910bb59
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
- uses: ./.github/actions/setup-rust
- name: Install cargo fuzz
run: cargo install cargo-fuzz
- uses: actions/cache@v4
name: Restore corpus
with:
path: fuzz/corpus
key: array_ops-${{ hashFiles('fuzz/corpus/array_ops/*') }}
restore-keys: |
array_ops-
- name: Restore corpus
shell: bash
run: |
aws s3 cp s3://vortex-fuzz-corpus/array_ops_corpus.tar.zst . --endpoint-url https://01e9655179bbec953276890b183039bc.r2.cloudflarestorage.com
tar -xf array_ops_corpus.tar.zst
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_FUZZ_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_FUZZ_SECRET_ACCESS_KEY }}
- name: Run fuzzing target
run: RUST_BACKTRACE=1 cargo fuzz run array_ops -- -max_total_time=1800
continue-on-error: true
Expand All @@ -30,3 +31,11 @@ jobs:
with:
name: fuzzing-crash-artifacts
path: fuzz/artifacts
- name: Persist corpus
shell: bash
run: |
tar -acf array_ops_corpus.tar.zst fuzz/corpus/array_ops
aws s3 cp array_ops_corpus.tar.zst s3://vortex-fuzz-corpus --endpoint-url https://01e9655179bbec953276890b183039bc.r2.cloudflarestorage.com
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_FUZZ_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_FUZZ_SECRET_ACCESS_KEY }}

0 comments on commit 910bb59

Please sign in to comment.