Fuzz #152
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fuzz | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| jobs: | |
| fuzz: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache fuzz target builds | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| target | |
| fuzz/target | |
| key: fuzz-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Set up Rust (nightly) | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Install cargo-fuzz | |
| run: cargo +nightly install cargo-fuzz | |
| - name: Build fuzz targets | |
| run: cargo +nightly fuzz build | |
| - name: Run fuzzers for ≥10 minutes each (~80m total) | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| FUZZERS=( | |
| decap | |
| statement_k_collision | |
| proof_agnostic_same_statement | |
| cross_circuit_k_difference | |
| gt_span_small_coeff | |
| gs_malleation_binding | |
| gs_random_recomb_budget | |
| ) | |
| PER_TARGET=600 # 10 minutes per target | |
| TOTAL_SECONDS=$(( PER_TARGET * ${#FUZZERS[@]} )) | |
| echo "Allocating ${PER_TARGET}s per target (~$((TOTAL_SECONDS/60)) minutes total)." | |
| for TARGET in "${FUZZERS[@]}"; do | |
| echo "▶︎ $(date -Iseconds) :: Fuzzing ${TARGET} for ${PER_TARGET}s" | |
| START_TS=$(date +%s) | |
| cargo +nightly fuzz run "${TARGET}" -- -runs=-1 -max_total_time="${PER_TARGET}" -print_final_stats=1 || true | |
| END_TS=$(date +%s) | |
| echo "⏱️ ${TARGET} finished in $((END_TS-START_TS))s (target budget ${PER_TARGET}s)" | |
| done | |
| - name: Upload fuzz artifacts (crashes & corpora) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fuzz-artifacts | |
| path: | | |
| fuzz/artifacts | |
| fuzz/corpus | |