Skip to content

release: 0.2.3

release: 0.2.3 #26

Workflow file for this run

name: Fuzz testing
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
fuzz:
runs-on: ${{ matrix.os }}
env:
# The version of `cargo-fuzz` to install and use.
CARGO_FUZZ_VERSION: 0.13.1
# The number of seconds to run the fuzz target. 300 seconds = 5 minutes.
FUZZ_TIME: 300
strategy:
matrix:
os: ["ubuntu-24.04-arm", "ubuntu-latest"]
include:
- fuzz_target: ecmascript_atomics_api
steps:
- uses: actions/checkout@v4
# Install the nightly Rust channel.
- run: rustup toolchain install nightly
- run: rustup default nightly
# Install and cache `cargo-fuzz`.
- uses: actions/cache@v4
with:
path: ${{ runner.tool_cache }}/cargo-fuzz
key: cargo-fuzz-bin-${{ env.CARGO_FUZZ_VERSION }}
- run: echo "${{ runner.tool_cache }}/cargo-fuzz/bin" >> $GITHUB_PATH
- run: cargo install --root "${{ runner.tool_cache }}/cargo-fuzz" --version ${{ env.CARGO_FUZZ_VERSION }} cargo-fuzz --locked
# Build and then run the fuzz target. Note that we use address sanitizer
# to hopefully catch any mistakes there.
- run: RUSTFLAGS=-Zsanitizer=address cargo +nightly fuzz build ${{ matrix.fuzz_target }}
- run: RUSTFLAGS=-Zsanitizer=address cargo +nightly fuzz run ${{ matrix.fuzz_target }} -- -max_total_time=${{ env.FUZZ_TIME }}
# Upload fuzzing artifacts on failure for post-mortem debugging.
- uses: actions/upload-artifact@v4
if: failure()
with:
name: fuzzing-artifacts-${{ matrix.fuzz_target }}-${{ github.sha }}
path: fuzz/artifacts