Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
68 changes: 49 additions & 19 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ variables:

#### stage: test

test-linux-stable:
.test-linux-stable:
stage: test
<<: *docker-env
<<: *common-refs
Expand All @@ -95,7 +95,7 @@ test-linux-stable:
script:
- time cargo test --all --release --locked -- --include-ignored

check-runtime-benchmarks:
.check-runtime-benchmarks:
stage: test
<<: *docker-env
<<: *common-refs
Expand All @@ -105,7 +105,7 @@ check-runtime-benchmarks:
# Check that parachain-template will compile with `runtime-benchmarks` feature flag.
- time cargo check -p parachain-template-node --features runtime-benchmarks

cargo-check-try-runtime:
.cargo-check-try-runtime:
stage: test
<<: *docker-env
<<: *common-refs
Expand All @@ -119,7 +119,7 @@ cargo-check-try-runtime:
# Check that parachain-template will compile with `try-runtime` feature flag.
- time cargo check -p parachain-template-node --features try-runtime

check-rustdoc:
.check-rustdoc:
stage: test
<<: *docker-env
<<: *common-refs
Expand All @@ -129,7 +129,7 @@ check-rustdoc:
script:
- time cargo +nightly doc --workspace --all-features --verbose --no-deps

cargo-check-benches:
.cargo-check-benches:
stage: test
<<: *docker-env
<<: *common-refs
Expand All @@ -142,7 +142,7 @@ cargo-check-benches:

#### stage: build

build-linux-stable:
.build-linux-stable:
stage: build
<<: *docker-env
<<: *collect-artifacts
Expand All @@ -163,7 +163,7 @@ build-linux-stable:
- echo "___The VERSION is either a tag name or the curent branch if triggered not by a tag___"
- echo ${CI_COMMIT_REF_NAME} | tee ./artifacts/VERSION

build-test-parachain:
.build-test-parachain:
stage: build
<<: *docker-env
<<: *collect-artifacts
Expand Down Expand Up @@ -207,7 +207,7 @@ build-test-parachain:
after_script:
- buildah logout --all

build-push-image-polkadot-parachain-debug:
.build-push-image-polkadot-parachain-debug:
stage: publish
<<: *kubernetes-env
<<: *common-refs
Expand All @@ -220,7 +220,7 @@ build-push-image-polkadot-parachain-debug:
IMAGE_NAME: "docker.io/paritypr/polkadot-parachain-debug"
VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}"

build-push-image-test-parachain:
.build-push-image-test-parachain:
stage: publish
<<: *kubernetes-env
<<: *common-refs
Expand All @@ -233,7 +233,7 @@ build-push-image-test-parachain:
IMAGE_NAME: "docker.io/paritypr/test-parachain"
VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}"

publish-s3:
.publish-s3:
stage: publish
<<: *kubernetes-env
image: paritytech/awscli:latest
Expand Down Expand Up @@ -265,21 +265,21 @@ benchmarks-build:
<<: *benchmarks-manual-refs
script:
- time cargo build --profile production --locked --features runtime-benchmarks
- mkdir artifacts
- mkdir -p artifacts
- cp target/production/polkadot-parachain ./artifacts/

benchmarks:
.benchmarks-statemint:
stage: benchmarks-run
before_script:
- *rust-info-script
<<: *collect-artifacts
<<: *benchmarks-refs
script:
- ./scripts/benchmarks-ci.sh assets statemine
- ./scripts/benchmarks-ci.sh assets statemint
- ./scripts/benchmarks-ci.sh assets westmint
- ./scripts/benchmarks-ci.sh assets statemine ./artifacts
- ./scripts/benchmarks-ci.sh assets statemint ./artifacts
- ./scripts/benchmarks-ci.sh assets westmint ./artifacts
- git status
- export BRANCHNAME="weights-${CI_COMMIT_BRANCH}"
- export BRANCHNAME="weights-statemint-${CI_COMMIT_BRANCH}"
# Set git config
- rm -rf .git/config
- git config --global user.email "${GITHUB_EMAIL}"
Expand All @@ -293,14 +293,44 @@ benchmarks:
- git push origin $BRANCHNAME
# create PR
- curl -u ${GITHUB_USER}:${GITHUB_TOKEN}
-d '{"title":"[benchmarks] Update weights","body":"This PR is generated automatically by CI.","head":"'$BRANCHNAME'","base":"'${CI_COMMIT_BRANCH}'"}'
-d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'$BRANCHNAME'","base":"'${CI_COMMIT_BRANCH}'"}'
-X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls
after_script:
- rm -rf .git/config
tags:
- weights

publish-benchmarks-s3:
benchmarks-collectives:
stage: benchmarks-run
before_script:
- *rust-info-script
<<: *collect-artifacts
<<: *benchmarks-refs
script:
- ./scripts/benchmarks-ci.sh collectives collectives-polkadot ./artifacts
- git status
- export BRANCHNAME="weights-collectives-${CI_COMMIT_BRANCH}"
# Set git config
- rm -rf .git/config
- git config --global user.email "${GITHUB_EMAIL}"
- git config --global user.name "${GITHUB_USER}"
- git config remote.origin.url "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/paritytech/${CI_PROJECT_NAME}.git"
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
# push results to github
- git checkout -b $BRANCHNAME
- git add parachains/*
- git commit -m "[benchmarks] pr with weights"
- git push origin $BRANCHNAME
# create PR
- curl -u ${GITHUB_USER}:${GITHUB_TOKEN}
-d '{"title":"[benchmarks] Update weights for collectives","body":"This PR is generated automatically by CI.","head":"'$BRANCHNAME'","base":"'${CI_COMMIT_BRANCH}'"}'
-X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls
after_script:
- rm -rf .git/config
tags:
- weights

.publish-benchmarks-s3:
stage: publish
<<: *kubernetes-env
image: paritytech/awscli:latest
Expand All @@ -325,7 +355,7 @@ publish-benchmarks-s3:
# This job cancels the whole pipeline if any of provided jobs fail.
# In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests
# to fail the pipeline as soon as possible to shorten the feedback loop.
cancel-pipeline:
.cancel-pipeline:
stage: .post
needs:
- job: test-linux-stable
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ mod benches {
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_xcmp_queue, XcmpQueue]
// TODO:COLLECTIVES Add Alliance
[pallet_alliance, Alliance]
[pallet_collective, AllianceMotion]
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot-collator
// ./artifacts/polkadot-parachain
// benchmark
// --chain=statemint-dev
// pallet
// --chain=collectives-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=cumulus_pallet_xcmp_queue
// --extrinsic=*
// --steps=50
// --repeat=20
// --json-file=./bench-statemint.json
// --json
// --header=./file_header.txt
// --output=./polkadot-parachains/statemint/src/weights
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -46,13 +48,13 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(2_711_000 as Weight)
(5_294_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(2_627_000 as Weight)
(5_180_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@
//! Autogenerated weights for `frame_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot-collator
// ./artifacts/polkadot-parachain
// benchmark
// --chain=statemint-dev
// pallet
// --chain=collectives-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=frame_system
// --extrinsic=*
// --steps=50
// --repeat=20
// --json-file=./bench-statemint.json
// --json
// --header=./file_header.txt
// --output=./polkadot-parachains/statemint/src/weights
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -44,42 +46,45 @@ use sp_std::marker::PhantomData;
/// Weight functions for `frame_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
fn remark(b: u32, ) -> Weight {
/// The range of component `b` is `[0, 3932160]`.
fn remark(_b: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
(2_470_000 as Weight)
(5_069_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((403_000 as Weight).saturating_mul(i as Weight))
// Standard Error: 1_000
.saturating_add((624_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((304_000 as Weight).saturating_mul(i as Weight))
// Standard Error: 1_000
.saturating_add((530_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 1_000
.saturating_add((677_000 as Weight).saturating_mul(p as Weight))
// Standard Error: 2_000
.saturating_add((1_059_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
}
Loading