diff --git a/.github/workflows/_publish_to_clusterfuzz.yml b/.github/workflows/_publish_to_clusterfuzz.yml index 74035ca953..2755bded52 100644 --- a/.github/workflows/_publish_to_clusterfuzz.yml +++ b/.github/workflows/_publish_to_clusterfuzz.yml @@ -26,6 +26,12 @@ jobs: with: command: make -j -Otarget fuzz-test + - uses: firedancer-io/fuzzbot-builder@main + name: Build rust fuzz tests + with: + command: ./.github/workflows/scripts/build_rust_fuzz_highend.sh + if: ${{ matrix.feature_set == 'highend' }} + - name: List Artifacts run: | ls build/linux/clang/combi/${{ matrix.feature_set }}/fuzz-test diff --git a/.github/workflows/scripts/build_rust_fuzz_highend.sh b/.github/workflows/scripts/build_rust_fuzz_highend.sh new file mode 100755 index 0000000000..307516103b --- /dev/null +++ b/.github/workflows/scripts/build_rust_fuzz_highend.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -eux + +if [[ -d ffi/rust/firedancer-diff/fuzz ]]; then + # mix the fuzz targets with the highend fuzz + TARGET_DIR=./build/linux/clang/combi/highend/fuzz-test + RUST_FUZZ_OUT_DIR=./ffi/rust/firedancer-diff/fuzz/target/release + pushd ffi/rust/firedancer-diff/fuzz + cargo build --release + popd + + ARTIFACTS=$(find ./ffi/rust/firedancer-diff/fuzz/target/release -maxdepth 1 -executable -type f) + for ARTIFACT in $ARTIFACTS; do + mkdir -p "${TARGET_DIR}/$(basename $ARTIFACT)" + cp $ARTIFACT "${TARGET_DIR}/$(basename $ARTIFACT)/" + done +else + echo "ignoring rust fuzz since directory does not exist" +fi