name: CIFuzz
on: [pull_request]
permissions: read-all
jobs:
 Fuzzing:
   runs-on: ubuntu-latest
   strategy:
     fail-fast: false
     matrix:
       sanitizer: [address, undefined]
   steps:
   - name: Build Fuzzers (${{ matrix.sanitizer }})
     uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
     with:
       oss-fuzz-project-name: 'suricata'
       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: 'suricata'
       fuzz-seconds: 600
       dry-run: false
       sanitizer: ${{ matrix.sanitizer }}
   - name: Upload Crash
     uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
     if: failure()
     with:
       name: ${{ matrix.sanitizer }}-artifacts
       path: ./out/artifacts
