From 15c7c4b7d4c3776065d29c9a3b5458829471f819 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Tue, 24 Mar 2020 13:46:18 +0100 Subject: [PATCH] Add CI check for `runtme-benchmarks` --- .gitlab-ci.yml | 14 +++++++++++--- runtime/common/Cargo.toml | 2 +- runtime/kusama/Cargo.toml | 7 ++++++- runtime/polkadot/Cargo.toml | 7 ++++++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d31aebca29bb..9d69cfc70496 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -162,6 +162,16 @@ check-web-wasm: &test - time cargo build --locked --target=wasm32-unknown-unknown --manifest-path cli/Cargo.toml --no-default-features --features browser - sccache -s +check-runtime-benchmarks: &test + stage: test + <<: *test-refs + <<: *docker-env + <<: *compiler_info + script: + # Check that the node will compile with `runtime-benchmarks` feature flag. + - time cargo check --features runtime-benchmarks + - sccache -s + build-linux-release: &build stage: build @@ -266,7 +276,7 @@ publish-s3-release: - | cat <<-EOM | - | polkadot binary paths: + | polkadot binary paths: | | - https://${BUCKET}/${PREFIX}/${EXTRATAG}/polkadot | - https://${BUCKET}/${PREFIX}/${VERSION}/polkadot @@ -375,5 +385,3 @@ deploy-polkasync-kusama: -F "ref=master" \ -F "variables[POLKADOT_BUILD_REF]=${CI_COMMIT_REF_NAME}" \ ${GITLAB_API}/projects/${GITHUB_API_PROJECT}/trigger/pipeline | jq . - - diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 92274ee02a9f..02be270ba864 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -76,7 +76,7 @@ std = [ "log", ] runtime-benchmarks = [ - "libsecp256k1", + "libsecp256k1/hmac", "frame-benchmarking", "frame-support/runtime-benchmarks" ] diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 08a726549f1d..59f84d46e0e8 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -136,4 +136,9 @@ std = [ "randomness-collective-flip/std", "runtime-common/std", ] -runtime-benchmarks = ["frame-benchmarking", "runtime-common/runtime-benchmarks"] +runtime-benchmarks = [ + "frame-benchmarking", + "frame-support/runtime-benchmarks", + "runtime-common/runtime-benchmarks", + "elections-phragmen/runtime-benchmarks" +] diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 5f813c6f090b..9f2a268387f7 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -130,4 +130,9 @@ std = [ "sudo/std", "vesting/std", ] -runtime-benchmarks = ["frame-benchmarking", "runtime-common/runtime-benchmarks"] +runtime-benchmarks = [ + "frame-benchmarking", + "frame-support/runtime-benchmarks", + "runtime-common/runtime-benchmarks", + "elections-phragmen/runtime-benchmarks" +]