Skip to content

Commit

Permalink
Add fuzz to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xnorpx committed Nov 10, 2024
1 parent d046952 commit c6f8816
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Nightly Cargo Fuzz

on:
schedule:
- cron: "0 0 * * *" # Runs every day at midnight
workflow_dispatch:

jobs:
cargo-fuzz:
runs-on: ubuntu-latest
timeout-minutes: 180
env:
# Run each fuzz target for 10 minutes
FUZZ_TIMEOUT: 600 # Seconds
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Rust and cargo-fuzz
uses: actions-rs/toolchain@v1
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

- name: Run Cargo Fuzz
run: |
cargo fuzz list | while read target; do
cargo fuzz run "$target" --jobs $(nproc) -- -max_total_time=$FUZZ_TIMEOUT --stop-after-first-failure -max_len=200000
done

0 comments on commit c6f8816

Please sign in to comment.