diff options
author | Zied Aouini <aouinizied@gmail.com> | 2021-10-11 19:01:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 19:01:50 +0200 |
commit | 7e0724d5765bd1b4e145bb9cf2b151c9a73fe9fe (patch) | |
tree | f4d74754f024d0d3d58f1fc868a5c1933eb61662 /.github | |
parent | 246d115d7bf126c284df739c35cd9b790bf140cf (diff) |
Enable sanitizers on CIFuzz. (#1336)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/cifuzz.yml | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index ed7b56f2a..0dd0bd91d 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -1,23 +1,34 @@ name: CIFuzz on: [pull_request] jobs: - Fuzzing: - runs-on: ubuntu-latest - steps: - - name: Build Fuzzers - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'ndpi' - dry-run: false - - name: Run Fuzzers - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'ndpi' - fuzz-seconds: 600 - dry-run: false - - name: Upload Crash - uses: actions/upload-artifact@v1 - if: failure() - with: - name: artifacts - path: ./out/artifacts + Fuzzing: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sanitizer: [address, undefined, memory] + steps: + - name: Build Fuzzers - ${{ matrix.sanitizer }} + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'ndpi' + dry-run: false + sanitizer: ${{ matrix.sanitizer }} + - name: Run Fuzzers - ${{ matrix.sanitizer }} + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'ndpi' + fuzz-seconds: 600 + dry-run: false + sanitizer: ${{ matrix.sanitizer }} + - name: Check Crash (fails when a crash is detected) + # Run Fuzzers return success even when setting dry-run to false. + # A temporal workaround is to trigger failure manually if we fing crash files. + run: | + exit $(ls out/artifacts -l |wc -c) + - name: Upload Crash (upload detected crash as artifacts) + uses: actions/upload-artifact@v1 + if: failure() + with: + name: ${{ matrix.sanitizer }}-artifacts + path: ./out/artifacts |