Skip to content

Commit

Permalink
fuzz: add rust fuzz targets to highend fuzz artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
marctrem committed Dec 14, 2023
1 parent 2e27ed1 commit 538ec25
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/_publish_to_clusterfuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/scripts/build_rust_fuzz_highend.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 538ec25

Please sign in to comment.