Add fuzz to Nightly CI #5
Workflow file for this run
This file contains 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: Nightly Cargo Fuzz | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Runs every day at midnight | |
workflow_dispatch: | |
pull_request: | |
types: | |
- synchronize | |
- opened | |
- reopened | |
jobs: | |
cargo-fuzz: | |
runs-on: ubuntu-latest | |
env: | |
FUZZ_TIMEOUT: 30s # Configurable timer for each fuzz target | |
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 | |
timeout $FUZZ_TIMEOUT cargo fuzz run "$target" | |
done |