Skip to content

Commit

Permalink
fix: install cargo-fuzz dependency and add CI commands
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptonemo committed May 13, 2020
1 parent 7ae6bb0 commit c6495f6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ jobs:
steps:
- configure_environment_variables
- checkout
- run:
name: Update dependencies
command: apt-get update
no_output_timeout: 5m
- run:
name: Install dependencies
command: apt-get install -y clang-7 libfuzzer-7-dev
no_output_timeout: 5m
- run: clang++-7 --version
- run:
name: Calculate dependencies
command: cargo generate-lockfile
no_output_timeout: 30m
- restore_cache:
keys:
- cargo-v26d-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
- run: cargo install cargo-fuzz
- run: rustup install $(cat rust-toolchain)
- run: rustup default $(cat rust-toolchain)
- run: rustup component add rustfmt-preview
Expand Down Expand Up @@ -160,6 +170,38 @@ jobs:
command: cargo +$(cat rust-toolchain) build --benches --verbose --all
no_output_timeout: 15m

fuzz_nightly:
docker:
- image: filecoin/rust:latest
working_directory: /mnt/crate
resource_class: 2xlarge+
steps:
- configure_environment_variables
- checkout
- attach_workspace:
at: "."
- restore_cache:
keys:
- cargo-v26d-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
- restore_parameter_cache
- run:
name: Fuzz (nightly)
command: |
cd filecoin-proofs
cargo +$(cat rust-toolchain) fuzz run --release seal_pre_commit_phase1
cargo +$(cat rust-toolchain) fuzz run --release seal_pre_commit_phase2
cargo +$(cat rust-toolchain) fuzz run --release seal_commit_phase1
cargo +$(cat rust-toolchain) fuzz run --release seal_commit_phase2
cargo +$(cat rust-toolchain) fuzz run --release compute_d
cargo +$(cat rust-toolchain) fuzz run --release verify_seal
cargo +$(cat rust-toolchain) fuzz run --release verify_batch_seal
cargo +$(cat rust-toolchain) fuzz run --release get_unsealed_range
cargo +$(cat rust-toolchain) fuzz run --release validate_cache_for_precommit_phase2
cargo +$(cat rust-toolchain) fuzz run --release validate_cache_for_commit
cargo +$(cat rust-toolchain) fuzz run --release generate_window_post
cargo +$(cat rust-toolchain) fuzz run --release verify_window_post
no_output_timeout: 15m

metrics_capture:
docker:
- image: filecoin/rust:latest
Expand Down
2 changes: 1 addition & 1 deletion filecoin-proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dialoguer = "0.6.2"
generic-array = "0.13.2"
structopt = "0.3.12"
humansize = "1.1.0"
libfuzzer-sys = { version = "0.3", features = ["arbitrary-derive"] }
libfuzzer-sys = { version = "0.3.2", features = ["arbitrary-derive"] }

[dependencies.reqwest]
version = "0.9"
Expand Down

0 comments on commit c6495f6

Please sign in to comment.