From eeca2bb61a953c3b703920b4926541f7241ccdfc Mon Sep 17 00:00:00 2001
From: Shawn Tabrizi <shawntabrizi@gmail.com>
Date: Wed, 16 Feb 2022 05:33:08 -0700
Subject: [PATCH] Fix Runtime Benchmarks Feature Flag in Parachain Template
 (#991)

* Update Cargo.toml

* add checks to ci
---
 cumulus/.gitlab-ci.yml                     | 4 ++++
 cumulus/parachain-template/node/Cargo.toml | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/cumulus/.gitlab-ci.yml b/cumulus/.gitlab-ci.yml
index da01099252a..04151c92d4f 100644
--- a/cumulus/.gitlab-ci.yml
+++ b/cumulus/.gitlab-ci.yml
@@ -114,6 +114,8 @@ check-runtime-benchmarks:
   script:
     # Check that the node will compile with `runtime-benchmarks` feature flag.
     - time cargo check --all --features runtime-benchmarks
+    # Check that parachain-template will compile with `runtime-benchmarks` feature flag.
+    - time cargo check -p parachain-template-node --features runtime-benchmarks
     - sccache -s
 
 cargo-check-try-runtime:
@@ -122,6 +124,8 @@ cargo-check-try-runtime:
   script:
     # Check that the node will compile with `try-runtime` feature flag.
     - time cargo check --all --features try-runtime
+    # Check that parachain-template will compile with `try-runtime` feature flag.
+    - time cargo check -p parachain-template-node --features try-runtime
     - sccache -s
 
 cargo-check-benches:
diff --git a/cumulus/parachain-template/node/Cargo.toml b/cumulus/parachain-template/node/Cargo.toml
index 10a6e4744a3..bdb7c378253 100644
--- a/cumulus/parachain-template/node/Cargo.toml
+++ b/cumulus/parachain-template/node/Cargo.toml
@@ -20,7 +20,10 @@ name = "parachain-collator"
 path = "src/main.rs"
 
 [features]
-runtime-benchmarks = ["parachain-template-runtime/runtime-benchmarks"]
+runtime-benchmarks = [
+	"parachain-template-runtime/runtime-benchmarks",
+	"polkadot-cli/runtime-benchmarks",
+]
 try-runtime = ["parachain-template-runtime/try-runtime"]
 
 [dependencies]
-- 
GitLab