@@ -376,6 +376,32 @@ jobs:
376376 run : |
377377 scripts/runtime-benchmark.sh
378378
379+ staking-fuzzer-test :
380+ name : staking-fuzzer-test (Linux x86-64)
381+ # Fuzzing is most efficient on Linux, it doesn't matter if it fails on other OSes.
382+ # Our runs-on instances don't have the required packages
383+ runs-on : ubuntu-22.04
384+ # Don't use the full 6 hours if fuzzing hangs
385+ timeout-minutes : 120
386+ env :
387+ AFL_SKIP_CPUFREQ : 1
388+ AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES : 1
389+ steps :
390+ - name : Checkout
391+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
392+
393+ - name : Apt update
394+ run : sudo apt-get update
395+
396+ - name : install dependencies
397+ run : sudo apt install -y protobuf-compiler binutils-dev coreutils
398+
399+ - name : install ziggy
400+ run : cargo install --force ziggy cargo-afl honggfuzz grcov
401+
402+ - name : test fuzzer
403+ run : scripts/run-fuzzer.sh
404+
379405 # This job checks all crates individually, including no_std and other featureless builds.
380406 # We need to check crates individually for missing features, because cargo does feature
381407 # unification, which hides missing features when crates are built together.
@@ -503,6 +529,7 @@ jobs:
503529 - check-runtime-benchmarks
504530 - cargo-check-individually
505531 - cargo-unused-deps
532+ - staking-fuzzer-test
506533 steps :
507534 - name : Check job statuses
508535 # Another hack is to actually check the status of the dependencies or else it'll fall through
@@ -515,3 +542,4 @@ jobs:
515542 [[ "${{ needs.check-runtime-benchmarks.result }}" == "success" ]] || exit 1
516543 [[ "${{ needs.cargo-check-individually.result }}" == "success" ]] || exit 1
517544 [[ "${{ needs.cargo-unused-deps.result }}" == "success" ]] || exit 1
545+ [[ "${{ needs.staking-fuzzer-test.result }}" == "success" ]] || exit 1
0 commit comments