Fuzz Smoke #268
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fuzz Smoke | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'fuzz/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.cargo/**' | |
| - 'crates/extract/**' | |
| - 'crates/core/**' | |
| - 'crates/types/**' | |
| - 'crates/graph/**' | |
| - 'crates/config/**' | |
| - 'crates/security/**' | |
| - 'rust-toolchain.toml' | |
| - '.github/workflows/fuzz-smoke.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'fuzz/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.cargo/**' | |
| - 'crates/extract/**' | |
| - 'crates/core/**' | |
| - 'crates/types/**' | |
| - 'crates/graph/**' | |
| - 'crates/config/**' | |
| - 'crates/security/**' | |
| - 'rust-toolchain.toml' | |
| - '.github/workflows/fuzz-smoke.yml' | |
| schedule: | |
| - cron: '30 5 * * 0' | |
| workflow_dispatch: | |
| concurrency: | |
| group: fuzz-smoke-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| FUZZ_TARGET_TRIPLE: x86_64-unknown-linux-gnu | |
| FUZZ_TIME_SECONDS: ${{ github.event_name == 'schedule' && '300' || '30' }} | |
| jobs: | |
| fuzz-smoke: | |
| name: Fuzz harness smoke | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 | |
| with: | |
| toolchain: nightly-2026-07-20 | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| workspaces: fuzz -> target | |
| key: fuzz-smoke-nightly-2026-07-20-cargo-fuzz-0.13.2 | |
| - name: Install cargo-fuzz | |
| uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9 # v2.84.0 | |
| with: | |
| tool: cargo-fuzz@0.13.2 | |
| fallback: cargo-install | |
| - name: Verify locked fuzz dependencies | |
| run: cargo +nightly-2026-07-20 metadata --locked --no-deps --manifest-path fuzz/Cargo.toml --format-version 1 > /dev/null | |
| - name: Run bounded fuzz smoke | |
| shell: bash | |
| run: | | |
| set -u | |
| targets=(fuzz_sfc fuzz_mdx fuzz_astro fuzz_css fuzz_scripts) | |
| failed=0 | |
| for target in "${targets[@]}"; do | |
| echo "::group::Fuzz ${target}" | |
| if ! cargo +nightly-2026-07-20 fuzz run --target "$FUZZ_TARGET_TRIPLE" "$target" -- -max_total_time="$FUZZ_TIME_SECONDS" -timeout=10; then | |
| failed=1 | |
| fi | |
| echo "::endgroup::" | |
| done | |
| exit "$failed" | |
| - name: Upload fuzz crash artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: fuzz-artifacts-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: fuzz/artifacts/ | |
| if-no-files-found: ignore | |
| retention-days: 14 |