# Coverage-guided fuzzing of the WAI reader, every night. # # `wai/wai-rs/fuzz/run.sh` runs four libFuzzer targets (cargo-fuzz, AddressSanitizer): # envelope version detection, the WAI1 and WAI2 readers, the listing form # int_payload int_payload::decode_int against every committed parameter set # media the picture, audio, video and text decoders of the floor and the # recommended set # containers the extension containers: world, causal op, film, reel, score, # haptic, splat4d, audio scene # each for 15 minutes, seeded from the repository's own envelopes, integer payloads and # containers, and a small valid payload per decoder. # # Nightly and never per pull request: the runners are the bottleneck, and fifteen # minutes a target is worth running only where it can grow a corpus. The corpus is kept # on the runner host's CI volume, so each night starts where the last left off. # # A find fails the job (exit 1) and keeps its input as an artifact; a target that does # not build or run fails it too (exit 2). Turn a find into a regression test as the # header of run.sh says. name: WAI fuzz (coverage-guided, nightly) on: schedule: - cron: '17 4 * * *' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: fuzz: name: envelope, integer payloads, media decoders and containers ยท 15 min each # The macOS runner's host has the C codec libraries the media target links. runs-on: macos timeout-minutes: 120 steps: - uses: actions/checkout@v5 - name: Install a pinned nightly and cargo-fuzz shell: bash run: | export PATH="$HOME/.cargo/bin:$PATH" rustup toolchain install nightly-2026-09-28 --profile minimal command -v cargo-fuzz >/dev/null || cargo install cargo-fuzz --locked echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - name: Fuzz working-directory: wai/wai-rs/fuzz shell: bash env: WAI_FUZZ_TOOLCHAIN: nightly-2026-09-28 WAI_FUZZ_CORPUS: /Volumes/macos_4TB_external_1/ci/wai-fuzz-corpus run: ./run.sh 900 - name: Keep what it found if: failure() uses: actions/upload-artifact@v3 with: name: wai-fuzz-artifacts path: wai/wai-rs/fuzz/artifacts if-no-files-found: ignore