Skip to content

Fuzz (nightly)

Fuzz (nightly) #52

Workflow file for this run

name: Fuzz (nightly)
# cargo-fuzz needs nightly + Linux + libFuzzer, so it runs on a schedule rather
# than per-commit (the stable `just check` gate does not build the fuzz crate).
on:
schedule:
- cron: "0 3 * * *" # nightly 03:00 UTC
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fuzz:
name: cargo-fuzz smoke
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [digital_link_parse]
steps:
- uses: actions/checkout@v7
# The trailing comment is load-bearing, not decoration. `rust-toolchain`
# keeps one branch per channel and bakes that channel into the `toolchain`
# input's *default* on each branch — this SHA defaults to `nightly`, the
# one every other workflow pins defaults to `stable`. Collapsing the two
# to a single SHA would switch this job to stable with nothing to notice
# it, and cargo-fuzz needs nightly.
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # nightly
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
workspaces: fuzz
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked
- name: Fuzz ${{ matrix.target }} (60s smoke)
run: cargo +nightly fuzz run ${{ matrix.target }} -- -max_total_time=60 -max_len=4096
- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-artifacts-${{ matrix.target }}
path: fuzz/artifacts/