name: Rust Fuzz
on:
schedule:
- cron: "37 18 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
fuzz:
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ matrix.target }}-${{ matrix.profile }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- target: bounded_value_wire_v1
profile: baseline
features: ""
- target: structured_value_wire_v1
profile: baseline
features: ""
- target: preflight_soundness
profile: baseline
features: ""
- target: natural_json_projection
profile: baseline
features: ""
- target: bounded_value_wire_v1
profile: unified
features: json-arbitrary-precision,json-preserve-order
- target: structured_value_wire_v1
profile: unified
features: json-arbitrary-precision,json-preserve-order
- target: preflight_soundness
profile: unified
features: json-arbitrary-precision,json-preserve-order
- target: natural_json_projection
profile: unified
features: json-arbitrary-precision,json-preserve-order
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Restore fuzz corpus
uses: actions/cache/restore@v4
with:
path: fuzz/corpus/${{ matrix.target }}
key: ${{ matrix.target }}-${{ matrix.profile }}-fuzz-corpus-${{ runner.os }}-${{ github.run_id }}
restore-keys: |
${{ matrix.target }}-${{ matrix.profile }}-fuzz-corpus-${{ runner.os }}-
- name: Install Rust nightly
run: rustup toolchain install nightly-2026-06-05 --profile minimal
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --version 0.13.2 --locked
- name: Prepare local path dependencies
run: ./.infra/bin/prepare-local-path-dependencies.sh
- name: Fuzz target
if: matrix.profile == 'baseline'
working-directory: fuzz
run: cargo +nightly-2026-06-05 fuzz run ${{ matrix.target }} -- -max_total_time=300 -max_len=4096
- name: Fuzz target with unified JSON features
if: matrix.profile == 'unified'
working-directory: fuzz
run: cargo +nightly-2026-06-05 fuzz run ${{ matrix.target }} --features ${{ matrix.features }} -- -max_total_time=300 -max_len=4096
- name: Save fuzz corpus
if: always()
uses: actions/cache/save@v4
with:
path: fuzz/corpus/${{ matrix.target }}
key: ${{ matrix.target }}-${{ matrix.profile }}-fuzz-corpus-${{ runner.os }}-${{ github.run_id }}
- name: Upload fuzz artifacts
if: failure()
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target }}-${{ matrix.profile }}-fuzz-artifacts
path: fuzz/artifacts/${{ matrix.target }}/**
if-no-files-found: warn
retention-days: 14