Skip to content

Commit

Permalink
Merge pull request #9 from srlabs/add-ci
Browse files Browse the repository at this point in the history
Add CI
  • Loading branch information
louismerlin authored May 29, 2024
2 parents ecfa4d8 + fa9b638 commit 8b847dc
Show file tree
Hide file tree
Showing 23 changed files with 8,949 additions and 1,567 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on: [push]

env:
CARGO_TERM_COLOR: always
SKIP_WASM_BUILD: 1

jobs:
run-fmt-and-clippy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: rustup default nightly
- run: rustup component add rustfmt clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: "runtimes -> runtimes/target\ntemplates -> templates/target"
- name: Run runtimes fmt
run: cargo fmt --check --manifest-path runtimes/Cargo.toml
- name: Run templates fmt
run: cargo fmt --check --manifest-path templates/Cargo.toml
- name: Run runtimes clippy
run: cargo clippy -q --workspace --no-deps --manifest-path runtimes/Cargo.toml -- -D clippy::pedantic
- name: Run templates clippy
run: cargo clippy -q --workspace --no-deps --manifest-path templates/Cargo.toml -- -D clippy::pedantic
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ cargo
.cargo
target
output
Cargo.lock
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Here are the steps to launch `substrate-runtime-fuzzer` against the [solochain t
cargo install ziggy cargo-afl honggfuzz grcov
rustup target add wasm32-unknown-unknown
git clone https://github.com/srlabs/substrate-runtime-fuzzer
cd substrate-runtime-fuzzer/solochain/
cd substrate-runtime-fuzzer/templates/solochain/
cargo ziggy fuzz -t 20
```

Expand All @@ -30,11 +30,11 @@ It will spawn multiple different coverage-guided fuzzers with the right configur

## How do I use this on my substrate-based runtime?

The first step is creating a project and adding the same dependencies as [this project](./solochain/Cargo.toml).
The first step is creating a project and adding the same dependencies as [this project](./templates/solochain/Cargo.toml).
Then, you can modify the `solochain-template-runtime` dependency to your own runtime (either as a local `path` or as a git URL).

Finally you should add a genesis configuration to make sure the fuzzer can reach as much of the code as possible.
You can take inspiration from the genesis configuration of the [kitchensink fuzzer](./kitchensink/src/main.rs).
You can take inspiration from the genesis configuration of the [kitchensink fuzzer](./templates/kitchensink/src/main.rs).

## License

Expand Down
246 changes: 0 additions & 246 deletions asset-hub-kusama/src/main.rs

This file was deleted.

Loading

0 comments on commit 8b847dc

Please sign in to comment.