Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
add a new ci job to fuzz sp-arithmetic (#13673)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mira Ressel authored Mar 27, 2023
1 parent aeefc8b commit 83c8198
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions scripts/ci/gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,39 @@ cargo-check-each-crate-macos:
- time cargo check --workspace --locked
tags:
- osx

cargo-hfuzz:
stage: test
extends:
- .docker-env
- .test-refs
- .pipeline-stopper-artifacts
variables:
# max 10s per iteration, 60s per file
HFUZZ_RUN_ARGS: >
--exit_upon_crash
--exit_code_upon_crash 1
--timeout 10
--run_time 60
artifacts:
name: "hfuzz-$CI_COMMIT_SHORT_SHA"
expire_in: 7 days
when: on_failure
paths:
- primitives/arithmetic/fuzzer/hfuzz_workspace/
script:
# use git version of honggfuzz-rs until v0.5.56 is out, we need a few recent changes:
# https://github.com/rust-fuzz/honggfuzz-rs/pull/75 to avoid breakage on debian
# https://github.com/rust-fuzz/honggfuzz-rs/pull/81 fix to the above pr
# https://github.com/rust-fuzz/honggfuzz-rs/pull/82 fix for handling rusty-cachier's absolute CARGO_TARGET_DIR
- |
cat >>Cargo.toml <<EOF
[patch.crates-io]
honggfuzz = { git = 'https://github.com/altaua/honggfuzz-rs', rev = '205f7c8c059a0d98fe1cb912cdac84f324cb6981' }
EOF
- cd ./primitives/arithmetic/fuzzer
- rusty-cachier snapshot create
- cargo hfuzz build
- rusty-cachier cache upload
- for target in $(cargo read-manifest | jq -r '.targets | .[] | .name'); do
cargo hfuzz run "$target" || { printf "fuzzing failure for %s\n" "$target"; exit 1; }; done

0 comments on commit 83c8198

Please sign in to comment.