summaryrefslogtreecommitdiff
path: root/.github/workflows/cifuzz.yml
blob: d783abba3b07cc7f8549f5b1e8e3778d6e813427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
# See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/

name: CIFuzz

permissions:
  contents: read

on:
  pull_request:
    paths:
      - '**/meson.build'
      - '.github/workflows/**'
      - 'meson_options.txt'
      - 'src/**'
      - 'test/fuzz/**'
      - 'tools/oss-fuzz.sh'
  push:
    branches:
      - main
jobs:
  Fuzzing:
    runs-on: ubuntu-latest
    if: github.repository == 'systemd/systemd'
    concurrency:
      group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ matrix.architecture }}-${{ github.ref }}
      cancel-in-progress: true
    strategy:
      fail-fast: false
      matrix:
        sanitizer: [address, undefined, memory]
        architecture: [x86_64]
        include:
          - sanitizer: address
            architecture: i386
    steps:
      - name: Build Fuzzers (${{ matrix.sanitizer }})
        id: build
        uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
        with:
          oss-fuzz-project-name: 'systemd'
          dry-run: false
          allowed-broken-targets-percentage: 0
          # keep-unaffected-fuzz-targets should be removed once https://github.com/google/oss-fuzz/issues/7011 is fixed
          keep-unaffected-fuzz-targets: true
          sanitizer: ${{ matrix.sanitizer }}
          architecture: ${{ matrix.architecture }}
      - name: Run Fuzzers (${{ matrix.sanitizer }})
        uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
        with:
          oss-fuzz-project-name: 'systemd'
          fuzz-seconds: 600
          dry-run: false
          sanitizer: ${{ matrix.sanitizer }}
      - name: Upload Crash
        uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
        if: failure() && steps.build.outcome == 'success'
        with:
          name: ${{ matrix.sanitizer }}-${{ matrix.architecture }}-artifacts
          path: ./out/artifacts