name: Nightly Cargo Fuzz
on:
schedule:
- cron: "0 0 * * *" workflow_dispatch:
jobs:
cargo-fuzz:
runs-on: ubuntu-latest
timeout-minutes: 180
env:
FUZZ_TIMEOUT: 600 steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust and cargo-fuzz
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rust-src
- run: rustup install nightly
- run: rustup default nightly
- run: cargo install cargo-fuzz
- name: Build fuzz targets
run: cargo fuzz build --fuzz-dir crates/fuzz
- name: Run Cargo Fuzz
run: |
cargo fuzz list --fuzz-dir crates/fuzz | while read target; do
cargo fuzz run "$target" --fuzz-dir crates/fuzz \
--jobs $(nproc) -- \
-max_total_time=$FUZZ_TIMEOUT \
--stop-after-first-failure -max_len=200000
done