From 3ffed8250fde57733f9895df4461a7096e21aae3 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 7 Dec 2023 03:48:10 +0100 Subject: [PATCH] Extract CIFuzz to a separate workflow (#1254) --- .github/workflows/build_and_test.yml | 28 ----------------------- .github/workflows/cifuzz.yml | 33 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/cifuzz.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index be5ca22137..51b340b9e8 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -600,31 +600,3 @@ jobs: export BINARY="$OUT/FuzzTarget" export SAMPLES="Tests/Fuzzers/RegressionTests/regression_samples" Tests/Fuzzers/RegressionTests/run_tests.sh - - Fuzzing: - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - sanitizer: [address, undefined, memory] - steps: - - name: Build Fuzzers - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'pcapplusplus' - dry-run: false - sanitizer: ${{ matrix.sanitizer }} - - name: Run Fuzzers - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'pcapplusplus' - fuzz-seconds: 600 - dry-run: false - sanitizer: ${{ matrix.sanitizer }} - - name: Upload Crash - uses: actions/upload-artifact@v1 - if: failure() && steps.build.outcome == 'success' - with: - name: artifacts - path: ./out/artifacts diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml new file mode 100644 index 0000000000..b002ad2a13 --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,33 @@ +name: Fuzz CI +on: + pull_request: + branches: ["dev"] + +jobs: + Fuzzing: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + sanitizer: [address, undefined, memory] + steps: + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'pcapplusplus' + dry-run: false + sanitizer: ${{ matrix.sanitizer }} + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'pcapplusplus' + fuzz-seconds: 600 + dry-run: false + sanitizer: ${{ matrix.sanitizer }} + - name: Upload Crash + uses: actions/upload-artifact@v1 + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts