qubit-json 0.6.0

Lenient JSON decoder for non-fully-trusted JSON text inputs
Documentation
name: Rust Fuzz

on:
  schedule:
    - cron: "23 18 * * *"
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: ${{ github.repository }}-${{ github.workflow }}
  cancel-in-progress: true

jobs:
  decoder:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout source
        uses: actions/checkout@v6
        with:
          fetch-depth: 1
          submodules: recursive

      - name: Restore decoder fuzz corpus
        uses: actions/cache/restore@v4
        with:
          path: fuzz/corpus/decoder
          key: decoder-fuzz-corpus-${{ runner.os }}-${{ github.run_id }}
          restore-keys: |
            decoder-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: Fuzz decoder
        working-directory: fuzz
        run: cargo +nightly-2026-06-05 fuzz run decoder -- -max_total_time=300 -max_len=4096

      - name: Save decoder fuzz corpus
        if: always()
        uses: actions/cache/save@v4
        with:
          path: fuzz/corpus/decoder
          key: decoder-fuzz-corpus-${{ runner.os }}-${{ github.run_id }}

      - name: Upload decoder fuzz artifacts
        if: failure()
        uses: actions/upload-artifact@v7
        with:
          name: decoder-fuzz-artifacts
          path: fuzz/artifacts/**
          if-no-files-found: warn
          retention-days: 14