Run fuzzer daily

Waiting for the fuzzer slows down the dev feedback loop because it makes
CI slow. We still want fuzz coverage but not in a way that slows down
devs.

Instead of running the fuzzer on every PR just run it once a nightly.

As we do for other daily jobs, rename the yaml file to make explicit
what it does.

Open questions:

- This should run for 30 minutes but I can't work out why the current
  set up only runs for a shorter time than that?
- Is this less fuzzing i.e., is 30 minutes once a day better or worse that 1
  minute 30 times?
This commit is contained in:
Tobin C. Harding 2024-03-26 13:38:44 +11:00
parent 9df59639ce
commit 6ab0110964
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 9 additions and 7 deletions

View File

@ -1,12 +1,12 @@
# Automatically generated by fuzz/generate-files.sh
name: Fuzz
on:
push:
branches:
- master
- 'test-ci/**'
pull_request:
schedule:
# 5am every day UTC, this correlates to:
# - 10pm PDT
# - 6am CET
# - 4pm AEDT
- cron: '00 05 * * *'
jobs:
fuzz:
@ -15,6 +15,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# We only get 20 jobs at a time, we probably don't want to go
# over that limit with fuzzing because of the hour run time.
fuzz_target: [
bitcoin_deserialize_address,
bitcoin_deserialize_block,

View File

@ -28,7 +28,7 @@ for targetFile in $targetFiles; do
else
HFUZZ_INPUT_ARGS=""
fi
HFUZZ_RUN_ARGS="--run_time 30 --exit_upon_crash -v $HFUZZ_INPUT_ARGS" cargo hfuzz run "$targetName"
HFUZZ_RUN_ARGS="--run_time 3600 --exit_upon_crash -v $HFUZZ_INPUT_ARGS" cargo hfuzz run "$targetName"
checkReport "$targetName"
done