nDPI/.github/workflows/cifuzz.yml
Ivan Nardi 89ccc30e9f
Update some CI jobs (#2660)
* Move ThreadSanitizer job to the scheduled jobs (once a day): all our tests
  are intrinsically mono-thread and this job takes quite some time
* Two explicit jobs to test LTO and Gold linker, used by oss-fuzz
* Two explicit jobs for Windows (with msys2)
* Run address sanitizer only on the 4 main jobs: newest/oldest gcc/clang
* Reduce the time used by fuzzing jobs. Note that oss-fuzz is
  continuosly fuzzing our code!
* Move the no x86_64 jobs to a dedicated file

This way, the main matrix is a little bit simpler and the CI jobs last a
little shorter
2025-01-09 14:23:23 +01:00

34 lines
1.2 KiB
YAML

name: CIFuzz
on: [push, pull_request]
jobs:
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 |wc -l)
- name: Upload Crash (upload detected crash as artifacts)
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.sanitizer }}-artifacts
path: ./out/artifacts