From 734d6e4870c5307cc531c5524d99502c1001ef31 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 28 Jun 2020 13:59:29 +0100 Subject: [PATCH] Problem: we have to send a PR to oss-fuzz on every build change on the fuzzers Solution: move the script to our repo, and simply call it from oss-fuzz's script --- builds/fuzz/ci_build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 builds/fuzz/ci_build.sh diff --git a/builds/fuzz/ci_build.sh b/builds/fuzz/ci_build.sh new file mode 100755 index 00000000..7c5caa18 --- /dev/null +++ b/builds/fuzz/ci_build.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# used by oss-fuzz https://github.com/google/oss-fuzz/tree/master/projects/libzmq + +set -e +set -x + +cd "${SRC}/libsodium" +DO_NOT_UPDATE_CONFIG_SCRIPTS=1 ./autogen.sh +./configure --disable-shared --prefix=/install_prefix --disable-asm +make -j$(nproc) V=1 install DESTDIR=/tmp/zmq_install_dir + +cd "${SRC}/libzmq" +./autogen.sh +export LDFLAGS+=" $(PKG_CONFIG_PATH=/tmp/zmq_install_dir/install_prefix/lib/pkgconfig pkg-config --static --libs --define-prefix libsodium)" +export CXXFLAGS+=" $(PKG_CONFIG_PATH=/tmp/zmq_install_dir/install_prefix/lib/pkgconfig pkg-config --static --cflags --define-prefix libsodium)" +./configure --disable-shared --prefix=/install_prefix --disable-perf --disable-curve-keygen PKG_CONFIG_PATH=/tmp/zmq_install_dir/install_prefix/lib/pkgconfig --with-libsodium=yes --with-fuzzing-installdir=fuzzers --with-fuzzing-engine=$LIB_FUZZING_ENGINE +make -j$(nproc) V=1 install DESTDIR=/tmp/zmq_install_dir + +cp /tmp/zmq_install_dir/install_prefix/fuzzers/* "${OUT}"