Skip to content

Commit

Permalink
Integrate benchmarks (#364)
Browse files Browse the repository at this point in the history
* Integrate benchmarks
* Fix runtime-benchmarks
* Removed Mock and benchmarking code to compile
* Update deps
* Std no_std configuration

Co-authored-by: Gautham <[email protected]>
Co-authored-by: mambisi <[email protected]>
  • Loading branch information
3 people committed Sep 26, 2021
1 parent 21e257e commit b39a651
Show file tree
Hide file tree
Showing 12 changed files with 433 additions and 107 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
- name: Install toolchain
run: ./scripts/init.sh
- name: Build Project
if: github.event_name == 'push'
run: cargo build
- run: cargo clean
run: |
cargo clean
cargo build --release --features runtime-benchmarks
cargo build
- name: Test Project
run: cargo test
- name: Run Cargo Trampulin
Expand Down
42 changes: 39 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 14 additions & 4 deletions pallets/pdex-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ sp-std = { default-features = false, git = "https://github.com/paritytech/substr
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { default-features= false, git = "https://github.com/paritytech/substrate", branch = "master" }
rand = { version = "0.7.2", default-features = false }

[dev-dependencies]
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master"}

[features]
default = ['std']
Expand All @@ -31,6 +33,14 @@ std = [
'frame-system/std',
'sp-runtime/std',
'pallet-balances/std',
'pallet-sudo/std'
'pallet-sudo/std',
]
runtime-benchmarks = [
"frame-benchmarking",
'frame-support/runtime-benchmarks',
'frame-system/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
# 'sp-io/std',
]
runtime-benchmarks = ["frame-benchmarking"]
try-runtime = ["frame-support/try-runtime"]
Loading

0 comments on commit b39a651

Please sign in to comment.