diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96d977ac513..f032901c6f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,11 +7,14 @@ stages: - test - build + # used for manual job run for regenerate weights for release-* branches (not needed anymore, just leave it here for a while as PlanB) - benchmarks-build + # used for manual job run for regenerate weights for release-* branches (not needed anymore, just leave it here for a while as PlanB) - benchmarks-run - publish - integration-tests - zombienet + - short-benchmarks default: interruptible: true @@ -142,7 +145,10 @@ include: - scripts/ci/gitlab/pipeline/test.yml # # build jobs - scripts/ci/gitlab/pipeline/build.yml + # short-benchmarks jobs + - scripts/ci/gitlab/pipeline/short-benchmarks.yml # # benchmarks jobs + # # used for manual job run for regenerate weights for release-* branches (not needed anymore, just leave it here for a while as PlanB) - scripts/ci/gitlab/pipeline/benchmarks.yml # # publish jobs - scripts/ci/gitlab/pipeline/publish.yml diff --git a/scripts/ci/gitlab/pipeline/build.yml b/scripts/ci/gitlab/pipeline/build.yml index e4678727e9b..b200e61deb0 100644 --- a/scripts/ci/gitlab/pipeline/build.yml +++ b/scripts/ci/gitlab/pipeline/build.yml @@ -121,3 +121,18 @@ build-runtime-testing: needs: - job: build-runtime-starters artifacts: false + +build-short-benchmark: + stage: build + extends: + - .docker-env + - .common-refs + - .collect-artifacts + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: check-rustdoc + artifacts: false + script: + - cargo build --profile release --locked --features=runtime-benchmarks + - mkdir -p ./artifacts + - cp ./target/release/polkadot-parachain ./artifacts/ diff --git a/scripts/ci/gitlab/pipeline/short-benchmarks.yml b/scripts/ci/gitlab/pipeline/short-benchmarks.yml new file mode 100644 index 00000000000..f63ad1e0d04 --- /dev/null +++ b/scripts/ci/gitlab/pipeline/short-benchmarks.yml @@ -0,0 +1,56 @@ +# 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 +.short-benchmark-template: &short-bench + stage: short-benchmarks + extends: + - .common-refs + - .docker-env + needs: + - job: build-short-benchmark + artifacts: true + variables: + RUNTIME_CHAIN: benchmarked-runtime-chain + script: + - ./artifacts/polkadot-parachain benchmark pallet --wasm-execution compiled --chain $RUNTIME_CHAIN --pallet "*" --extrinsic "*" --steps 2 --repeat 1 + +short-benchmark-asset-hub-polkadot: + <<: *short-bench + variables: + RUNTIME_CHAIN: asset-hub-polkadot-dev + +short-benchmark-asset-hub-kusama: + <<: *short-bench + variables: + RUNTIME_CHAIN: asset-hub-kusama-dev + +short-benchmark-asset-hub-westend: + <<: *short-bench + variables: + RUNTIME_CHAIN: asset-hub-westend-dev + +short-benchmark-bridge-hub-polkadot: + <<: *short-bench + variables: + RUNTIME_CHAIN: bridge-hub-polkadot-dev + +short-benchmark-bridge-hub-kusama: + <<: *short-bench + variables: + RUNTIME_CHAIN: bridge-hub-kusama-dev + +short-benchmark-bridge-hub-rococo: + <<: *short-bench + variables: + RUNTIME_CHAIN: bridge-hub-rococo-dev + +short-benchmark-collectives-polkadot : + <<: *short-bench + variables: + RUNTIME_CHAIN: collectives-polkadot-dev + +short-benchmark-glutton-kusama : + <<: *short-bench + variables: + RUNTIME_CHAIN: glutton-kusama-dev-1300