grumpydb 5.0.0

A disk-based object storage engine with B+Tree indexing and page-based storage
Documentation
name: Fuzz

on:
  schedule:
    # Run weekly, Sunday at 04:00 UTC.
    - cron: "0 4 * * 0"
  workflow_dispatch:
    inputs:
      max_total_time:
        description: "Seconds to run each fuzz target"
        required: false
        default: "300"

env:
  CARGO_TERM_COLOR: always

jobs:
  fuzz:
    name: Fuzz ${{ matrix.target }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target:
          - parse_command
          - value_codec_roundtrip
          - wal_record_decode
          - response_serialize
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@nightly
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            .
            fuzz
      - name: Install cargo-fuzz
        run: cargo install cargo-fuzz --locked
      - name: Run ${{ matrix.target }}
        working-directory: fuzz
        run: |
          MAX_TIME="${{ github.event.inputs.max_total_time || '300' }}"
          cargo +nightly fuzz run ${{ matrix.target }} -- \
            -max_total_time="$MAX_TIME" \
            -timeout=10
      - name: Upload crash artifacts on failure
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: fuzz-${{ matrix.target }}-artifacts
          path: fuzz/artifacts/${{ matrix.target }}/
          if-no-files-found: ignore