@@ -607,3 +607,53 @@ jobs:
607607 CIRRUS_PR_FLAG="-e CIRRUS_PR=1"
608608 fi
609609 docker run --rm $CIRRUS_PR_FLAG -v "$(pwd)":/bitcoin "$CONTAINER_NAME"
610+
611+ fuzz-centipede :
612+ name : ' Centipede fuzzer'
613+ needs : runners
614+ runs-on : ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg' || 'ubuntu-24.04' }}
615+ timeout-minutes : 60
616+ env :
617+ FILE_ENV : ' ./ci/test/00_setup_env_native_fuzz.sh'
618+ DANGER_CI_ON_HOST_FOLDERS : 1
619+ steps :
620+ - *CHECKOUT
621+ - name : Configure environment
622+ uses : ./.github/actions/configure-environment
623+ - name : Restore caches
624+ uses : ./.github/actions/restore-caches
625+ - name : Configure Docker
626+ uses : ./.github/actions/configure-docker
627+ with :
628+ cache-provider : ${{ needs.runners.outputs.provider }}
629+ - name : Install Centipede deps
630+ run : |
631+ sudo apt-get update
632+ sudo apt-get install -y bazel clang-18 libc++-18-dev libc++abi-18-dev
633+ - name : Build libFuzzer targets
634+ run : |
635+ cmake --preset=libfuzzer -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18
636+ cmake --build build_fuzz --parallel
637+ - name : Clone & build Centipede
638+ run : |
639+ git clone https://github.com/google/fuzztest.git "$RUNNER_TEMP/fuzztest"
640+ cd "$RUNNER_TEMP/fuzztest"
641+ bazel build //centipede:centipede
642+ - name : Download corpus
643+ run : |
644+ git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$RUNNER_TEMP/qa-assets"
645+ - name : Run Centipede
646+ run : |
647+ "$RUNNER_TEMP/fuzztest/bazel-bin/centipede/centipede" \
648+ -artifact_prefix=artifacts/ \
649+ -corpus_dir="$RUNNER_TEMP/qa-assets/fuzz_corpora" \
650+ build_fuzz/bin/fuzz_* \
651+ -jobs=8 -max_total_time=1800
652+ - name : Upload artifacts
653+ if : always()
654+ uses : actions/upload-artifact@v4
655+ with :
656+ name : centipede-artifacts
657+ path : artifacts/
658+ - name : Save caches
659+ uses : ./.github/actions/save-caches
0 commit comments