Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: broken fuzz lib #984

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ jobs:
cache-provider: "buildjet"
shared-key: cargo-check
save-if: ${{ github.ref == 'refs/heads/nightly' }}
workspaces: |
.
fuzz
- name: Run lint
run: |
if ! make lint ; then
Expand Down Expand Up @@ -109,6 +112,9 @@ jobs:
cache-provider: "buildjet"
shared-key: cargo-check
save-if: ${{ github.ref == 'refs/heads/nightly' }}
workspaces: |
.
fuzz
# intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
- name: cargo hack
run: make check-features
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ lint: ## cargo check and clippy. Skip clippy on guest code since it's not suppo
## fmt first, because it's the cheapest
cargo +nightly fmt --all --check
cargo check --all-targets --all-features
$(MAKE) check-fuzz
CI_SKIP_GUEST_BUILD=1 cargo clippy --all-targets --all-features

lint-fix: ## cargo fmt, fix and clippy. Skip clippy on guest code since it's not supported by risc0
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/accounts_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fuzz_target!(|input: (u16, [u8; 32], Vec<DefaultPrivateKey>)| -> Corpus {
let storage = <C as Spec>::Storage::with_path(tmpdir.path()).unwrap();
let working_set = &mut WorkingSet::new(storage);

let config: AccountConfig = keys.iter().map(|k| k.pub_key()).collect();
let config: AccountConfig<C> = keys.iter().map(|k| k.pub_key()).collect();
let accounts: Accounts<C> = Accounts::default();
accounts.genesis(&config, working_set).unwrap();

Expand Down