Arrange buffer-sv2 fuzz and bench correctly #169
Workflow file for this run
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 Regression Check | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| fuzz: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| id: toolchain | |
| # NOTE: A repo-local `rust-toolchain.toml` is still respected by rustup. | |
| # `dtolnay/rust-toolchain` installs the requested toolchain but does not | |
| # automatically override it. | |
| - name: Override toolchain | |
| run: | | |
| rustup override set ${{ steps.toolchain.outputs.name }} | |
| - name: Install cargo-fuzz | |
| run: cargo install cargo-fuzz | |
| - name: Checkout fuzzing corpus | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: stratum-mining/stratum-fuzzing-corpus | |
| path: fuzz/repo-corpus | |
| - name: Run fuzz regressions | |
| run: | | |
| for TARGET in $(cargo fuzz list); do | |
| CORPUS_DIR="fuzz/repo-corpus/corpus/$TARGET" | |
| echo "==> Checking corpus for: $TARGET" | |
| if [ ! -d "$CORPUS_DIR" ]; then | |
| echo "==> Skipping $TARGET (no corpus found at $CORPUS_DIR)" | |
| continue | |
| fi | |
| echo "==> Running fuzz target: $TARGET" | |
| cargo fuzz run "$TARGET" "$CORPUS_DIR" -- -runs=0 -max_total_time=30 | |
| done | |