Skip to content

Commit

Permalink
[ci] Remove short-benchmarks from Gitlab (#5988)
Browse files Browse the repository at this point in the history
PR removes short-benchmarks from GitLab, adds condition for
cargo-check-rutimes
  • Loading branch information
alvicsam authored Oct 9, 2024
1 parent 6c2b46f commit 6765bcd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 230 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check-cargo-check-runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ concurrency:
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "cumulus/parachains/runtimes/*"

# Jobs in this workflow depend on each other, only for limiting peak amount of spawned workers

jobs:

preflight:
uses: ./.github/workflows/reusable-preflight.yml

Expand Down
7 changes: 0 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ include:
- .gitlab/pipeline/test.yml
# build jobs
- .gitlab/pipeline/build.yml
# short-benchmarks jobs
- .gitlab/pipeline/short-benchmarks.yml
# publish jobs
- .gitlab/pipeline/publish.yml
# zombienet jobs
Expand Down Expand Up @@ -284,8 +282,3 @@ cancel-pipeline-build-linux-substrate:
extends: .cancel-pipeline-template
needs:
- job: build-linux-substrate

cancel-pipeline-build-short-benchmark:
extends: .cancel-pipeline-template
needs:
- job: build-short-benchmark
102 changes: 1 addition & 101 deletions .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,6 @@ build-implementers-guide:
- mkdir -p artifacts
- mv polkadot/roadmap/implementers-guide/book artifacts/

build-short-benchmark:
stage: build
extends:
- .docker-env
- .common-refs
- .run-immediately
- .collect-artifacts
script:
- cargo build --profile release --locked --features=runtime-benchmarks,on-chain-release-build --bin polkadot --workspace
- mkdir -p artifacts
- target/release/polkadot --version
- cp ./target/release/polkadot ./artifacts/

build-polkadot-zombienet-tests:
stage: build
extends:
Expand All @@ -191,7 +178,6 @@ build-polkadot-zombienet-tests:
- mkdir -p artifacts
- cp polkadot-zombienet-tests.tar.zst ./artifacts


# build jobs from cumulus

build-linux-stable-cumulus:
Expand Down Expand Up @@ -234,92 +220,6 @@ build-test-parachain:
- mkdir -p ./artifacts/zombienet
- mv ./target/release/wbuild/cumulus-test-runtime/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm ./artifacts/zombienet/.

# build runtime only if files in $RUNTIME_PATH/$RUNTIME_NAME were changed
.build-runtime-template: &build-runtime-template
stage: build
extends:
- .docker-env
- .test-refs-no-trigger-prs-only
- .run-immediately
variables:
RUNTIME_PATH: "parachains/runtimes/assets"
script:
- cd ${RUNTIME_PATH}
- for directory in $(echo */); do
echo "_____Running cargo check for ${directory} ______";
cd ${directory};
pwd;
SKIP_WASM_BUILD=1 cargo check --locked;
cd ..;
done

# DAG: build-runtime-assets -> build-runtime-collectives -> build-runtime-bridge-hubs
# DAG: build-runtime-assets -> build-runtime-collectives -> build-runtime-contracts
# DAG: build-runtime-assets -> build-runtime-coretime
# DAG: build-runtime-assets -> build-runtime-testing
build-runtime-assets:
<<: *build-runtime-template
variables:
RUNTIME_PATH: "cumulus/parachains/runtimes/assets"

build-runtime-collectives:
<<: *build-runtime-template
variables:
RUNTIME_PATH: "cumulus/parachains/runtimes/collectives"
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
needs:
- job: build-runtime-assets
artifacts: false

build-runtime-coretime:
<<: *build-runtime-template
variables:
RUNTIME_PATH: "cumulus/parachains/runtimes/coretime"
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
needs:
- job: build-runtime-assets
artifacts: false

build-runtime-bridge-hubs:
<<: *build-runtime-template
variables:
RUNTIME_PATH: "cumulus/parachains/runtimes/bridge-hubs"
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
needs:
- job: build-runtime-collectives
artifacts: false

build-runtime-contracts:
<<: *build-runtime-template
variables:
RUNTIME_PATH: "cumulus/parachains/runtimes/contracts"
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
needs:
- job: build-runtime-collectives
artifacts: false

build-runtime-testing:
<<: *build-runtime-template
variables:
RUNTIME_PATH: "cumulus/parachains/runtimes/testing"
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
needs:
- job: build-runtime-assets
artifacts: false

build-short-benchmark-cumulus:
stage: build
extends:
- .docker-env
- .common-refs
- .run-immediately
- .collect-artifacts
script:
- cargo build --profile release --locked --features=runtime-benchmarks,on-chain-release-build -p polkadot-parachain-bin --bin polkadot-parachain --workspace
- mkdir -p artifacts
- target/release/polkadot-parachain --version
- cp ./target/release/polkadot-parachain ./artifacts/

# substrate

build-linux-substrate:
Expand All @@ -340,7 +240,7 @@ build-linux-substrate:
# tldr: we need to checkout the branch HEAD explicitly because of our dynamic versioning approach while building the substrate binary
# see https://github.com/paritytech/ci_cd/issues/682#issuecomment-1340953589
- git checkout -B "$CI_COMMIT_REF_NAME" "$CI_COMMIT_SHA"
- !reference [ .forklift-cache, before_script ]
- !reference [.forklift-cache, before_script]
script:
- time WASM_BUILD_NO_COLOR=1 cargo build --locked --release -p staging-node-cli
- mv $CARGO_TARGET_DIR/release/substrate-node ./artifacts/substrate/substrate
Expand Down
122 changes: 1 addition & 121 deletions .gitlab/pipeline/short-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,121 +1 @@
# This file is part of .gitlab-ci.yml
# Here are all jobs that are executed during "short-benchmarks" stage

# Run all pallet benchmarks only once to check if there are any errors

# run short-benchmarks for relay chain runtimes from polkadot

short-benchmark-westend: &short-bench
stage: short-benchmarks
extends:
- .docker-env
- .common-refs
needs:
- job: build-short-benchmark
artifacts: true
variables:
RUNTIME: westend
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: "full"
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
tags:
- benchmark
script:
- ./artifacts/polkadot benchmark pallet --chain $RUNTIME-dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1

short-benchmark-rococo: &short-bench
stage: short-benchmarks
extends:
- .docker-env
- .common-refs
needs:
- job: build-short-benchmark
artifacts: true
variables:
RUNTIME: rococo
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: "full"
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
tags:
- benchmark
script:
- ./artifacts/polkadot benchmark pallet --chain $RUNTIME-dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1

# run short-benchmarks for system parachain runtimes from cumulus

.short-benchmark-cumulus: &short-bench-cumulus
stage: short-benchmarks
extends:
- .common-refs
- .docker-env
needs:
- job: build-short-benchmark-cumulus
artifacts: true
variables:
RUNTIME_CHAIN: benchmarked-runtime-chain
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: "full"
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
tags:
- benchmark
script:
- ./artifacts/polkadot-parachain benchmark pallet --chain $RUNTIME_CHAIN --pallet "*" --extrinsic "*" --steps 2 --repeat 1

short-benchmark-asset-hub-rococo:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: asset-hub-rococo-dev

short-benchmark-asset-hub-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: asset-hub-westend-dev

short-benchmark-bridge-hub-rococo:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: bridge-hub-rococo-dev

short-benchmark-bridge-hub-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: bridge-hub-westend-dev

short-benchmark-collectives-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: collectives-westend-dev

short-benchmark-coretime-rococo:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: coretime-rococo-dev

short-benchmark-coretime-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: coretime-westend-dev

short-benchmark-people-rococo:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: people-rococo-dev

short-benchmark-people-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: people-westend-dev

short-benchmark-glutton-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: glutton-westend-dev-1300
---

0 comments on commit 6765bcd

Please sign in to comment.