Fuzz #102
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 | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| schedule: | |
| - cron: "17 3 * * *" | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| ASAN_OPTIONS: quarantine_size_mb=1:malloc_context_size=0 | |
| jobs: | |
| fuzz_build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Install cargo-fuzz | |
| run: cargo install cargo-fuzz --locked | |
| - name: Build fuzz targets | |
| run: cargo +nightly fuzz build | |
| fuzz_smoke: | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| needs: fuzz_build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Install cargo-fuzz | |
| run: cargo install cargo-fuzz --locked | |
| - name: Smoke run router | |
| run: cargo +nightly fuzz run fuzz_router_match -- -max_len=512 -max_total_time=45 -rss_limit_mb=512 | |
| - name: Smoke run query | |
| run: cargo +nightly fuzz run fuzz_query_decode -- -max_len=1024 -max_total_time=45 -rss_limit_mb=512 | |
| fuzz_nightly: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| needs: fuzz_build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: fuzz_router_match | |
| max_len: 512 | |
| - target: fuzz_query_decode | |
| max_len: 1024 | |
| - target: fuzz_extractor_typed | |
| max_len: 4096 | |
| - target: fuzz_openapi_gen | |
| max_len: 256 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Install cargo-fuzz | |
| run: cargo install cargo-fuzz --locked | |
| - name: Nightly fuzz run | |
| run: cargo +nightly fuzz run ${{ matrix.target }} -- -max_len=${{ matrix.max_len }} -max_total_time=300 -rss_limit_mb=512 |