Skip to content

cuprated: fix deadlock (#534) #231

cuprated: fix deadlock (#534)

cuprated: fix deadlock (#534) #231

Workflow file for this run

name: Smoke-Test Fuzz Targets
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
fuzz:
runs-on: ubuntu-latest
env:
# The version of `cargo-fuzz` to install and use.
CARGO_FUZZ_VERSION: 0.12.0
# The number of seconds to run the fuzz target.
FUZZ_TIME: 60
# We need to turn lto off for fuzzing.
CARGO_PROFILE_RELEASE_LTO: false
strategy:
matrix:
include:
- fuzz_target: cryptonight
- fuzz_target: epee_encoding
- fuzz_target: epee_p2p_messages
- fuzz_target: levin_codec
- fuzz_target: oxide_block
- fuzz_target: oxide_tx
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.
- run: cargo fuzz build ${{ matrix.fuzz_target }} -O
- run: cargo fuzz run ${{ matrix.fuzz_target }} -O -- -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