name: Fuzz on: pull_request: branches: [develop] paths: - '**.c' - '**.h' - 'tests/fuzz/**' - '.github/actions/build-spine/**' - '.github/workflows/fuzz.yml' schedule: - cron: '0 3 * * 0' workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: fuzz: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./.github/actions/build-spine with: extra-packages: clang pkg-config # A pull request gets a short regression run against the committed corpus. # The weekly schedule runs long enough to explore. - name: Fuzz run: | set -euo pipefail if [ "${{ github.event_name }}" = "schedule" ]; then seconds=900 else seconds=60 fi make -C tests/fuzz FUZZ_SECONDS="$seconds" run - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 if: failure() with: name: fuzz-crashes path: | tests/fuzz/crash-* tests/fuzz/leak-* tests/fuzz/timeout-* if-no-files-found: ignore