diff --git a/polkadot/.gitlab-ci.yml b/polkadot/.gitlab-ci.yml index 31c66b541b..bb58d293fd 100644 --- a/polkadot/.gitlab-ci.yml +++ b/polkadot/.gitlab-ci.yml @@ -9,11 +9,16 @@ # And "kubernetes-env" for everything else. Please mention "image:" container name to be used # with it, as there's no default one. +# All jobs are sorted according to their duration using DAG mechanism +# Currently, test-linux-stable job is the longest one and other jobs are +# sorted in order to complete during this job and occupy less runners in one +# moment of time. + stages: - - test - - build - - publish - - deploy + - stage1 + - stage2 + - stage3 + - stage4 workflow: rules: @@ -74,11 +79,18 @@ default: - sccache -s .test-refs: &test-refs + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + - if: $CI_COMMIT_REF_NAME == "master" + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + +.common-refs: &common-refs # these jobs run always* rules: - if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 .test-pr-refs: &test-pr-refs rules: @@ -145,230 +157,6 @@ default: vault: cicd/gitlab/$CI_PROJECT_PATH/REL_MAN_ROOM_ID@kv file: false - -#### stage: test - -check-runtime: - stage: test - image: paritytech/tools:latest - <<: *kubernetes-env - <<: *test-refs - variables: - GITLAB_API: "https://gitlab.parity.io/api/v4" - GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api" - script: - - ./scripts/gitlab/check_runtime.sh - allow_failure: true - -cargo-fmt: - stage: test - <<: *docker-env - <<: *test-refs - script: - - cargo +nightly --version - - cargo +nightly fmt --all -- --check - allow_failure: true - -test-deterministic-wasm: - stage: test - <<: *test-refs - <<: *docker-env - <<: *compiler-info - script: - - ./scripts/gitlab/test_deterministic_wasm.sh - -test-build-linux-stable: - stage: test - <<: *docker-env - <<: *compiler-info - <<: *collect-artifacts - variables: - RUST_TOOLCHAIN: stable - # Enable debug assertions since we are running optimized builds for testing - # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - script: - - ./scripts/gitlab/test_linux_stable.sh - # we're using the bin built here, instead of having a parallel `build-linux-release` - - time cargo build --profile testnet --features pyroscope --verbose --bin polkadot - - sccache -s - # pack artifacts - - mkdir -p ./artifacts - - VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name - - mv ./target/testnet/polkadot ./artifacts/. - - pushd artifacts - - sha256sum polkadot | tee polkadot.sha256 - - shasum -c polkadot.sha256 - - popd - - EXTRATAG="$(./artifacts/polkadot --version | - sed -n -r 's/^polkadot ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p')" - - EXTRATAG="${CI_COMMIT_REF_NAME}-${EXTRATAG}-$(cut -c 1-8 ./artifacts/polkadot.sha256)" - - echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})" - - echo -n ${VERSION} > ./artifacts/VERSION - - echo -n ${EXTRATAG} > ./artifacts/EXTRATAG - - cp -r scripts/* ./artifacts - -check-runtime-benchmarks: - stage: test - <<: *test-refs - <<: *docker-env - <<: *compiler-info - script: - # Check that everything compiles with `runtime-benchmarks` feature flag. - - cargo check --features runtime-benchmarks --all - - sccache -s - -check-try-runtime: - stage: test - <<: *test-refs - <<: *docker-env - <<: *compiler-info - script: - # Check that everything compiles with `try-runtime` feature flag. - - cargo check --features try-runtime --all - - sccache -s - -check-no-default-features: - stage: test - <<: *test-refs - <<: *docker-env - <<: *compiler-info - script: - # Check that polkadot-cli will compile no default features. - - pushd node/service && cargo check --no-default-features && popd - - pushd cli && cargo check --no-default-features --features "service" && popd - - sccache -s - -spellcheck: - stage: test - <<: *docker-env - <<: *test-refs - script: - - cargo spellcheck --version - # compare with the commit parent to the PR, given it's from a default branch - - git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH} - - echo "___Spellcheck is going to check your diff___" - - cargo spellcheck list-files -vvv $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges)) - - time cargo spellcheck check -vvv --cfg=scripts/gitlab/spellcheck.toml --checkers hunspell --code 1 - $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges)) - allow_failure: true - -build-test-collators: - stage: test - <<: *collect-artifacts - <<: *docker-env - <<: *compiler-info - <<: *test-refs - script: - - time cargo build --profile testnet --verbose -p test-parachain-adder-collator - - time cargo build --profile testnet --verbose -p test-parachain-undying-collator - - sccache -s - # pack artifacts - - mkdir -p ./artifacts - - mv ./target/testnet/adder-collator ./artifacts/. - - mv ./target/testnet/undying-collator ./artifacts/. - - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION - - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG - - echo "adder-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" - - echo "undying-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" - - cp -r scripts/* ./artifacts - -build-malus: - stage: test - <<: *collect-artifacts - <<: *docker-env - <<: *compiler-info - <<: *test-refs - script: - - time cargo build --profile testnet --verbose -p polkadot-test-malus - - sccache -s - # pack artifacts - - mkdir -p ./artifacts - - mv ./target/testnet/malus ./artifacts/. - - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION - - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG - - echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" - - cp -r scripts/* ./artifacts - -#### stage: build - -.check-dependent-project: &check-dependent-project - stage: build - <<: *docker-env - <<: *test-pr-refs - script: - - git clone - --depth=1 - "--branch=$PIPELINE_SCRIPTS_TAG" - https://github.com/paritytech/pipeline-scripts - - ./pipeline-scripts/check_dependent_project.sh - paritytech - polkadot - --polkadot - "$DEPENDENT_REPO" - "$GITHUB_PR_TOKEN" - "$CARGO_UPDATE_CRATES" - -check-dependent-cumulus: - <<: *check-dependent-project - variables: - DEPENDENT_REPO: cumulus - CARGO_UPDATE_CRATES: "sp-io polkadot-runtime-common" - -check-transaction-versions: - stage: build - <<: *test-refs - <<: *docker-env - image: node:15 - needs: - - job: test-build-linux-stable - artifacts: true - before_script: - - apt-get -y update; apt-get -y install jq lsof - - npm install --ignore-scripts -g @polkadot/metadata-cmp - # Set git config - - git config remote.origin.url "https://github.com/paritytech/polkadot.git" - - git fetch origin release - script: - - scripts/gitlab/check_extrinsics_ordering.sh - -generate-impl-guide: - stage: build - <<: *test-refs - <<: *docker-env - image: - name: michaelfbryan/mdbook-docker-image:v0.4.4 - entrypoint: [""] - script: - - mdbook build roadmap/implementers-guide - -build-rustdoc: - stage: build - <<: *docker-env - <<: *test-refs - variables: - SKIP_WASM_BUILD: 1 - artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc" - when: on_success - expire_in: 1 days - paths: - - ./crate-docs/ - script: - # FIXME: it fails with `RUSTDOCFLAGS="-Dwarnings"` and `--all-features` - - time cargo doc --workspace --verbose - - rm -f ./target/doc/.lock - - mv ./target/doc ./crate-docs - # FIXME: remove me after CI image gets nonroot - - chown -R nonroot:nonroot ./crate-docs - - echo "" > ./crate-docs/index.html - - sccache -s - .build-push-image: &build-push-image <<: *kubernetes-env image: quay.io/buildah/stable @@ -403,8 +191,204 @@ build-rustdoc: after_script: - buildah logout --all +#### stage: stage1 + +check-runtime: + stage: stage1 + image: paritytech/tools:latest + <<: *kubernetes-env + <<: *test-refs + variables: + GITLAB_API: "https://gitlab.parity.io/api/v4" + GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api" + script: + - ./scripts/gitlab/check_runtime.sh + allow_failure: true + +cargo-fmt: + stage: stage1 + <<: *docker-env + <<: *test-refs + script: + - cargo +nightly --version + - cargo +nightly fmt --all -- --check + allow_failure: true + +build-linux-stable: + stage: stage1 + <<: *docker-env + <<: *compiler-info + <<: *collect-artifacts + <<: *common-refs + variables: + RUST_TOOLCHAIN: stable + # Enable debug assertions since we are running optimized builds for testing + # but still want to have debug assertions. + RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + script: + - time cargo build --profile testnet --features pyroscope --verbose --bin polkadot + - sccache -s + # pack artifacts + - mkdir -p ./artifacts + - VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name + - mv ./target/testnet/polkadot ./artifacts/. + - pushd artifacts + - sha256sum polkadot | tee polkadot.sha256 + - shasum -c polkadot.sha256 + - popd + - EXTRATAG="$(./artifacts/polkadot --version | + sed -n -r 's/^polkadot ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p')" + - EXTRATAG="${CI_COMMIT_REF_NAME}-${EXTRATAG}-$(cut -c 1-8 ./artifacts/polkadot.sha256)" + - echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})" + - echo -n ${VERSION} > ./artifacts/VERSION + - echo -n ${EXTRATAG} > ./artifacts/EXTRATAG + - cp -r scripts/* ./artifacts + +test-linux-stable: + stage: stage1 + <<: *docker-env + <<: *compiler-info + <<: *common-refs + variables: + RUST_TOOLCHAIN: stable + # Enable debug assertions since we are running optimized builds for testing + # but still want to have debug assertions. + RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + script: + - time cargo test --workspace --profile testnet --verbose --locked --features=runtime-benchmarks,runtime-metrics + + + +spellcheck: + stage: stage1 + <<: *docker-env + <<: *test-refs + script: + - cargo spellcheck --version + # compare with the commit parent to the PR, given it's from a default branch + - git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH} + - echo "___Spellcheck is going to check your diff___" + - cargo spellcheck list-files -vvv $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges)) + - time cargo spellcheck check -vvv --cfg=scripts/gitlab/spellcheck.toml --checkers hunspell --code 1 + $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges)) + allow_failure: true + +build-test-collators: + stage: stage1 + <<: *collect-artifacts + <<: *docker-env + <<: *compiler-info + <<: *test-refs + script: + - time cargo build --profile testnet --verbose -p test-parachain-adder-collator + - time cargo build --profile testnet --verbose -p test-parachain-undying-collator + - sccache -s + # pack artifacts + - mkdir -p ./artifacts + - mv ./target/testnet/adder-collator ./artifacts/. + - mv ./target/testnet/undying-collator ./artifacts/. + - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION + - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG + - echo "adder-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" + - echo "undying-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" + - cp -r scripts/* ./artifacts + +build-malus: + stage: stage1 + <<: *collect-artifacts + <<: *docker-env + <<: *compiler-info + <<: *test-refs + script: + - time cargo build --profile testnet --verbose -p polkadot-test-malus + - sccache -s + # pack artifacts + - mkdir -p ./artifacts + - mv ./target/testnet/malus ./artifacts/. + - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION + - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG + - echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" + - cp -r scripts/* ./artifacts + +#### stage: stage2 + +.check-dependent-project: &check-dependent-project + stage: stage2 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: check-runtime + artifacts: false + <<: *docker-env + <<: *test-pr-refs + script: + - git clone + --depth=1 + "--branch=$PIPELINE_SCRIPTS_TAG" + https://github.com/paritytech/pipeline-scripts + - ./pipeline-scripts/check_dependent_project.sh + paritytech + polkadot + --polkadot + "$DEPENDENT_REPO" + "$GITHUB_PR_TOKEN" + "$CARGO_UPDATE_CRATES" + +check-dependent-cumulus: + <<: *check-dependent-project + variables: + DEPENDENT_REPO: cumulus + CARGO_UPDATE_CRATES: "sp-io polkadot-runtime-common" + +test-node-metrics: + stage: stage2 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: check-runtime + artifacts: false + <<: *docker-env + <<: *compiler-info + <<: *common-refs + variables: + RUST_TOOLCHAIN: stable + # Enable debug assertions since we are running optimized builds for testing + # but still want to have debug assertions. + RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + script: + - time cargo test --profile testnet --verbose --locked --features=runtime-metrics -p polkadot-node-metrics + +test-deterministic-wasm: + stage: stage2 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: cargo-fmt + artifacts: false + <<: *test-refs + <<: *docker-env + <<: *compiler-info + script: + - ./scripts/gitlab/test_deterministic_wasm.sh + +check-transaction-versions: + stage: stage2 + <<: *test-refs + <<: *docker-env + image: node:15 + needs: + - job: build-linux-stable + artifacts: true + before_script: + - apt-get -y update; apt-get -y install jq lsof + - npm install --ignore-scripts -g @polkadot/metadata-cmp + # Set git config + - git config remote.origin.url "https://github.com/paritytech/polkadot.git" + - git fetch origin release + script: + - scripts/gitlab/check_extrinsics_ordering.sh + + + publish-polkadot-image: - stage: build + stage: stage2 <<: *build-push-image variables: <<: *image-variables @@ -422,7 +406,7 @@ publish-polkadot-image: - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs needs: - - job: test-build-linux-stable + - job: build-linux-stable artifacts: true after_script: # pass artifacts to the zombienet-tests job @@ -437,7 +421,7 @@ publish-polkadot-image: publish-test-collators-image: # service image for Simnet - stage: build + stage: stage2 <<: *build-push-image <<: *zombienet-refs variables: @@ -460,7 +444,7 @@ publish-test-collators-image: publish-malus-image: # service image for Simnet - stage: build + stage: stage2 <<: *build-push-image <<: *zombienet-refs variables: @@ -481,37 +465,10 @@ publish-malus-image: # this artifact is used in zombienet-tests job dotenv: ./artifacts/malus.env -update_polkadot_weights: &update-weights - stage: build - when: manual - variables: - RUNTIME: polkadot - artifacts: - paths: - - ${RUNTIME}_weights_${CI_COMMIT_SHORT_SHA}.patch - script: - - ./scripts/run_benches_for_runtime.sh $RUNTIME - - git diff -P > ${RUNTIME}_weights_${CI_COMMIT_SHORT_SHA}.patch - # uses the "shell" executors - tags: - - weights - -update_kusama_weights: - <<: *update-weights - variables: - RUNTIME: kusama - -update_westend_weights: - <<: *update-weights - variables: - RUNTIME: westend - -#### stage: publish - publish-s3-release: &publish-s3 - stage: publish + stage: stage3 needs: - - job: test-build-linux-stable + - job: build-linux-stable artifacts: true <<: *kubernetes-env <<: *vault-secrets @@ -549,8 +506,253 @@ publish-s3-release: &publish-s3 - aws s3 ls s3://${AWS_BUCKET}/${PREFIX}/${EXTRATAG}/ --recursive --human-readable --summarize +update_polkadot_weights: &update-weights + stage: stage2 + when: manual + variables: + RUNTIME: polkadot + artifacts: + paths: + - ${RUNTIME}_weights_${CI_COMMIT_SHORT_SHA}.patch + script: + - ./scripts/run_benches_for_runtime.sh $RUNTIME + - git diff -P > ${RUNTIME}_weights_${CI_COMMIT_SHORT_SHA}.patch + # uses the "shell" executors + tags: + - weights + +update_kusama_weights: + <<: *update-weights + variables: + RUNTIME: kusama + +update_westend_weights: + <<: *update-weights + variables: + RUNTIME: westend + +#### stage: stage3 + +build-rustdoc: + stage: stage3 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: test-deterministic-wasm + artifacts: false + <<: *docker-env + <<: *test-refs + variables: + SKIP_WASM_BUILD: 1 + artifacts: + name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc" + when: on_success + expire_in: 1 days + paths: + - ./crate-docs/ + script: + # FIXME: it fails with `RUSTDOCFLAGS="-Dwarnings"` and `--all-features` + - time cargo doc --workspace --verbose + - rm -f ./target/doc/.lock + - mv ./target/doc ./crate-docs + # FIXME: remove me after CI image gets nonroot + - chown -R nonroot:nonroot ./crate-docs + - echo "" > ./crate-docs/index.html + - sccache -s + +generate-impl-guide: + stage: stage3 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: check-transaction-versions + artifacts: false + <<: *test-refs + <<: *docker-env + image: + name: michaelfbryan/mdbook-docker-image:v0.4.4 + entrypoint: [""] + script: + - mdbook build roadmap/implementers-guide + +check-runtime-benchmarks: + stage: stage3 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: test-node-metrics + artifacts: false + <<: *test-refs + <<: *docker-env + <<: *compiler-info + script: + # Check that everything compiles with `runtime-benchmarks` feature flag. + - cargo check --features runtime-benchmarks --all + - sccache -s + +check-try-runtime: + stage: stage3 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: test-node-metrics + artifacts: false + <<: *test-refs + <<: *docker-env + <<: *compiler-info + script: + # Check that everything compiles with `try-runtime` feature flag. + - cargo check --features try-runtime --all + - sccache -s + +check-no-default-features: + stage: stage3 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: test-deterministic-wasm + artifacts: false + <<: *test-refs + <<: *docker-env + <<: *compiler-info + script: + # Check that polkadot-cli will compile no default features. + - pushd node/service && cargo check --no-default-features && popd + - pushd cli && cargo check --no-default-features --features "service" && popd + - sccache -s + + +deploy-parity-testnet: + stage: stage3 + # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs + needs: + - job: test-deterministic-wasm + artifacts: false + <<: *publish-refs + variables: + POLKADOT_CI_COMMIT_NAME: "${CI_COMMIT_REF_NAME}" + POLKADOT_CI_COMMIT_REF: "${CI_COMMIT_SHORT_SHA}" + allow_failure: false + trigger: "parity/infrastructure/parity-testnet" + +zombienet-tests-parachains-smoke-test: + stage: stage3 + image: "${ZOMBIENET_IMAGE}" + <<: *kubernetes-env + <<: *zombienet-refs + needs: + - job: publish-polkadot-image + - job: publish-malus-image + - job: publish-test-collators-image + variables: + GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/smoke" + before_script: + - echo "Zombie-net Tests Config" + - echo "${ZOMBIENET_IMAGE}" + - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" + - echo "${MALUS_IMAGE_NAME} ${MALUS_IMAGE_TAG}" + - echo "${GH_DIR}" + - export DEBUG=zombie,zombie::network-node + - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} + - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} + - export COL_IMAGE="docker.io/paritypr/colander:4519" # The collator image is fixed + script: + - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0001-parachains-smoke-test.feature" + allow_failure: false + retry: 2 + tags: + - zombienet-polkadot-integration-test + +zombienet-tests-parachains-pvf: + stage: stage3 + image: "${ZOMBIENET_IMAGE}" + <<: *kubernetes-env + <<: *zombienet-refs + needs: + - job: publish-polkadot-image + - job: publish-test-collators-image + variables: + GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/functional" + before_script: + - echo "Zombie-net Tests Config" + - echo "${ZOMBIENET_IMAGE}" + - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" + - echo "COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG}" + - echo "${GH_DIR}" + - export DEBUG=zombie,zombie::network-node + - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} + - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} + - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} + script: + - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0001-parachains-pvf.feature" + allow_failure: true + retry: 2 + tags: + - zombienet-polkadot-integration-test + +zombienet-tests-parachains-disputes: + stage: stage3 + image: "${ZOMBIENET_IMAGE}" + <<: *kubernetes-env + <<: *zombienet-refs + needs: + - job: publish-polkadot-image + - job: publish-test-collators-image + - job: publish-malus-image + variables: + GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/functional" + before_script: + - echo "Zombie-net Tests Config" + - echo "${ZOMBIENET_IMAGE_NAME}" + - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" + - echo "${MALUS_IMAGE_NAME} ${MALUS_IMAGE_TAG}" + - echo "${GH_DIR}" + - export DEBUG=zombie,zombie::network-node + - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} + - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} + - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} + script: + - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0002-parachains-disputes.feature" + allow_failure: true + retry: 2 + tags: + - zombienet-polkadot-integration-test + +zombienet-tests-malus-dispute-valid: + stage: stage3 + image: "${ZOMBIENET_IMAGE}" + <<: *kubernetes-env + <<: *zombienet-refs + needs: + - job: publish-polkadot-image + - job: publish-malus-image + - job: publish-test-collators-image + variables: + GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/node/malus/integrationtests" + before_script: + - echo "Zombie-net Tests Config" + - echo "${ZOMBIENET_IMAGE_NAME}" + - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" + - echo "${MALUS_IMAGE_NAME} ${MALUS_IMAGE_TAG}" + - echo "${GH_DIR}" + - export DEBUG=zombie* + - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} + - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} + - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} + script: + - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0001-dispute-valid-block.feature" + allow_failure: false + retry: 2 + tags: + - zombienet-polkadot-integration-test + +#### stage: stage4 + publish-rustdoc: - stage: publish + stage: stage4 <<: *kubernetes-env <<: *vault-secrets image: paritytech/tools:latest @@ -597,133 +799,3 @@ publish-rustdoc: - echo "___Rustdoc was successfully published to https://paritytech.github.io/polkadot/___" after_script: - rm -rf .git/ ./* - -#### stage: deploy - -deploy-parity-testnet: - stage: deploy - <<: *publish-refs - variables: - POLKADOT_CI_COMMIT_NAME: "${CI_COMMIT_REF_NAME}" - POLKADOT_CI_COMMIT_REF: "${CI_COMMIT_SHORT_SHA}" - allow_failure: false - trigger: "parity/infrastructure/parity-testnet" - -zombienet-tests-parachains-smoke-test: - stage: deploy - image: "${ZOMBIENET_IMAGE}" - <<: *kubernetes-env - <<: *zombienet-refs - needs: - - job: publish-polkadot-image - - job: publish-malus-image - - job: publish-test-collators-image - variables: - GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/smoke" - before_script: - - echo "Zombie-net Tests Config" - - echo "${ZOMBIENET_IMAGE}" - - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" - - echo "${MALUS_IMAGE_NAME} ${MALUS_IMAGE_TAG}" - - echo "${GH_DIR}" - - export DEBUG=zombie,zombie::network-node - - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} - - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} - - export COL_IMAGE="docker.io/paritypr/colander:4519" # The collator image is fixed - script: - - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --test="0001-parachains-smoke-test.feature" - allow_failure: false - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-tests-parachains-pvf: - stage: deploy - image: "${ZOMBIENET_IMAGE}" - <<: *kubernetes-env - <<: *zombienet-refs - needs: - - job: publish-polkadot-image - - job: publish-test-collators-image - variables: - GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/functional" - before_script: - - echo "Zombie-net Tests Config" - - echo "${ZOMBIENET_IMAGE}" - - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" - - echo "COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG}" - - echo "${GH_DIR}" - - export DEBUG=zombie,zombie::network-node - - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} - - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} - - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} - script: - - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --test="0001-parachains-pvf.feature" - allow_failure: true - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-tests-parachains-disputes: - stage: deploy - image: "${ZOMBIENET_IMAGE}" - <<: *kubernetes-env - <<: *zombienet-refs - needs: - - job: publish-polkadot-image - - job: publish-test-collators-image - - job: publish-malus-image - variables: - GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/functional" - before_script: - - echo "Zombie-net Tests Config" - - echo "${ZOMBIENET_IMAGE_NAME}" - - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" - - echo "${MALUS_IMAGE_NAME} ${MALUS_IMAGE_TAG}" - - echo "${GH_DIR}" - - export DEBUG=zombie,zombie::network-node - - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} - - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} - - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} - script: - - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --test="0002-parachains-disputes.feature" - allow_failure: true - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-tests-malus-dispute-valid: - stage: deploy - image: "${ZOMBIENET_IMAGE}" - <<: *kubernetes-env - <<: *zombienet-refs - needs: - - job: publish-polkadot-image - - job: publish-malus-image - - job: publish-test-collators-image - variables: - GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/node/malus/integrationtests" - before_script: - - echo "Zombie-net Tests Config" - - echo "${ZOMBIENET_IMAGE_NAME}" - - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" - - echo "${MALUS_IMAGE_NAME} ${MALUS_IMAGE_TAG}" - - echo "${GH_DIR}" - - export DEBUG=zombie* - - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} - - export MALUS_IMAGE=${MALUS_IMAGE_NAME}:${MALUS_IMAGE_TAG} - - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} - script: - - /home/nonroot/zombie-net/scripts/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --test="0001-dispute-valid-block.feature" - allow_failure: false - retry: 2 - tags: - - zombienet-polkadot-integration-test diff --git a/polkadot/scripts/gitlab/test_linux_stable.sh b/polkadot/scripts/gitlab/test_linux_stable.sh deleted file mode 100755 index de1662420e..0000000000 --- a/polkadot/scripts/gitlab/test_linux_stable.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -eux - -#shellcheck source=../common/lib.sh -source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/../common/lib.sh" - -# Builds with the runtime benchmarks/metrics features are only to be used for testing. -time cargo test --workspace --profile testnet --verbose --locked --features=runtime-benchmarks,runtime-metrics - -# We need to separately run the `polkadot-node-metrics` tests. More specifically, because the -# `runtime_can_publish_metrics` test uses the `test-runtime` which doesn't support -# the `runtime-benchmarks` feature. -time cargo test --profile testnet --verbose --locked --features=runtime-metrics -p polkadot-node-metrics