From 95397cc17a1fe7116a13011cecd7cad687cb8f3e Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Mon, 12 Jul 2021 13:14:24 +0100 Subject: [PATCH] Action that runs fuzzer for short amount of time on PRs. --- .github/workflows/on_PR_linux_fuzz.yml | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/on_PR_linux_fuzz.yml diff --git a/.github/workflows/on_PR_linux_fuzz.yml b/.github/workflows/on_PR_linux_fuzz.yml new file mode 100644 index 00000000..66edbc15 --- /dev/null +++ b/.github/workflows/on_PR_linux_fuzz.yml @@ -0,0 +1,28 @@ +# Builds and runs the fuzz target for a short amount of time. This is +# mainly to protect the fuzz target from bitrot, but hopefully will +# also help to quickly catch some bugs before the PR is merged. + +name: Linux-Ubuntu Quick Fuzz on PRs + +on: [pull_request] + +jobs: + Linux: + name: 'Ubuntu 20.04 - clang/libFuzzer' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: install dependencies + run: ./ci/install_dependencies.sh + - name: build and compile + run: | + mkdir build && cd build + cmake -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_CXX_COMPILER=$(which clang++) -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_TEAM_USE_SANITIZERS=ON .. + make -j $(nproc) + + - name: Fuzz + run: | + cd build + mkdir corpus + ./bin/fuzz-read-print-write corpus ../test/data/ -jobs=$(nproc) -max_total_time=60 -max_len=4096