Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • parity/mirrors/polkadot-sdk
1 result
Show changes
Commits on Source (32)
Showing
with 261 additions and 361 deletions
......@@ -15,7 +15,7 @@ exclude = [
[formatting]
reorder_arrays = true
inline_table_expand = false
array_auto_expand = false
array_auto_expand = true
array_auto_collapse = false
indent_string = " " # tab
......
......@@ -243,17 +243,17 @@ fetch_release_artifacts() {
# - REPO in the form paritytech/polkadot
fetch_debian_package_from_s3() {
BINARY=$1
echo "Version : $VERSION"
echo "Version : $NODE_VERSION"
echo "Repo : $REPO"
echo "Binary : $BINARY"
echo "Tag : $RELEASE_TAG"
echo "Tag : $VERSION"
OUTPUT_DIR=${OUTPUT_DIR:-"./release-artifacts/${BINARY}"}
echo "OUTPUT_DIR : $OUTPUT_DIR"
URL_BASE=$(get_s3_url_base $BINARY)
echo "URL_BASE=$URL_BASE"
URL=$URL_BASE/$RELEASE_TAG/x86_64-unknown-linux-gnu/${BINARY}_${VERSION}_amd64.deb
URL=$URL_BASE/$VERSION/x86_64-unknown-linux-gnu/${BINARY}_${NODE_VERSION}_amd64.deb
mkdir -p "$OUTPUT_DIR"
pushd "$OUTPUT_DIR" > /dev/null
......
......@@ -71,7 +71,7 @@ git_show_log() {
# 1_012_000 or 1_012_001 if SUFFIX is set
function get_spec_version() {
INPUT=$1
SUFFIX=${SUFFIX:-000} #this variable makes it possible to set a specific ruuntime version like 93826 it can be intialised as sestem variable
SUFFIX=${SUFFIX:-000} #this variable makes it possible to set a specific runtime version like 93826 it can be initialised as system variable
[[ $INPUT =~ .*([0-9]+\.[0-9]+\.[0-9]{1,2}).* ]]
VERSION="${BASH_REMATCH[1]}"
MATCH="${BASH_REMATCH[0]}"
......
......@@ -266,6 +266,9 @@ jobs:
path: artifacts.tar
retention-days: 1
### Build zombienet test artifacts ########################
#
#
#
......@@ -296,6 +299,66 @@ jobs:
path: artifacts.tar
retention-days: 1
#
#
#
prepare-polkadot-zombienet-artifacts:
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
timeout-minutes: 60
container:
image: ${{ needs.preflight.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: build
run: |
forklift cargo nextest --manifest-path polkadot/zombienet-sdk-tests/Cargo.toml archive --locked --features zombie-metadata --archive-file polkadot-zombienet-tests.tar.zst
- name: pack artifacts
run: |
mkdir -p artifacts
cp polkadot-zombienet-tests.tar.zst ./artifacts
- name: tar
run: tar -cvf artifacts.tar artifacts
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1
#
#
#
prepare-cumulus-zombienet-artifacts:
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
timeout-minutes: 60
container:
image: ${{ needs.preflight.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: build
run: |
forklift cargo nextest --manifest-path cumulus/zombienet/zombienet-sdk/Cargo.toml archive --locked --features zombie-ci --archive-file cumulus-zombienet-tests.tar.zst
- name: pack artifacts
run: |
mkdir -p artifacts
cp cumulus-zombienet-tests.tar.zst ./artifacts
- name: tar
run: tar -cvf artifacts.tar artifacts
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1
### Publish ########################
#
......
......@@ -102,7 +102,6 @@ jobs:
--exclude
"substrate/frame/contracts/fixtures/build"
"substrate/frame/contracts/fixtures/contracts/common"
"substrate/frame/revive/fixtures/contracts/common"
- name: deny git deps
run: python3 .github/scripts/deny-git-deps.py .
check-markdown:
......
name: Release - RC automation
on:
# TODO: Activate it and delete old branches patterns, when the release process from stable is setteled
# TODO: Activate it and delete old branches patterns, when the release process from stable is settled
#push:
# branches:
# # Catches release-polkadot-v1.2.3, release-v1.2.3-rc1, etc
......
......@@ -39,17 +39,6 @@ jobs:
RELEASE_TAG=$(validate_stable_tag ${{ inputs.release_tag }})
echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
get-rust-versions:
needs: [ validate-inputs ]
runs-on: ubuntu-latest
outputs:
rustc-stable: ${{ steps.get-rust-versions.outputs.stable }}
steps:
- id: get-rust-versions
run: |
RUST_STABLE_VERSION=$(curl -sS https://raw.githubusercontent.com/paritytech/scripts/master/dockerfiles/ci-unified/Dockerfile | grep -oP 'ARG RUST_STABLE_VERSION=\K[^ ]+')
echo "stable=$RUST_STABLE_VERSION" >> $GITHUB_OUTPUT
build-runtimes:
needs: [ validate-inputs ]
uses: "./.github/workflows/release-srtool.yml"
......@@ -65,7 +54,7 @@ jobs:
publish-release-draft:
runs-on: ubuntu-latest
environment: release
needs: [ validate-inputs, get-rust-versions, build-runtimes ]
needs: [ validate-inputs, build-runtimes ]
outputs:
release_url: ${{ steps.create-release.outputs.html_url }}
asset_upload_url: ${{ steps.create-release.outputs.upload_url }}
......@@ -86,7 +75,6 @@ jobs:
- name: Prepare draft
id: draft
env:
RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json
BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json
......@@ -100,6 +88,8 @@ jobs:
run: |
. ./.github/scripts/common/lib.sh
export RUSTC_STABLE=$(grep -oP '(?<=-)[0-9]+\.[0-9]+\.[0-9]+(?=-)' .github/env)
export REF1=$(get_latest_release_tag)
if [[ -z "$RELEASE_TAG" ]]; then
export REF2="${{ github.ref_name }}"
......
name: Release - Publish polakdot deb package
name: Release - Publish polkadot deb package
on:
workflow_dispatch:
inputs:
tag:
description: Current final release tag in the format polakdot-stableYYMM or polkadot-stable-YYMM-X
description: Current final release tag in the format polkadot-stableYYMM or polkadot-stable-YYMM-X
default: polkadot-stable2412
required: true
type: string
......@@ -44,9 +44,9 @@ jobs:
needs: [validate-inputs]
env:
REPO: ${{ github.repository }}
RELEASE_TAG: ${{ needs.validate-inputs.outputs.release_tag }}
VERSION: ${{ needs.validate-inputs.outputs.release_tag }}
outputs:
VERSION: ${{ steps.fetch_artifacts_from_s3.outputs.VERSION }}
NODE_VERSION: ${{ steps.fetch_artifacts_from_s3.outputs.NODE_VERSION }}
steps:
- name: Checkout sources
......@@ -57,8 +57,8 @@ jobs:
run: |
. ./.github/scripts/common/lib.sh
VERSION="$(get_polkadot_node_version_from_code)"
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
NODE_VERSION="$(get_polkadot_node_version_from_code)"
echo "NODE_VERSION=${NODE_VERSION}" >> $GITHUB_OUTPUT
fetch_debian_package_from_s3 polkadot
......@@ -76,7 +76,7 @@ jobs:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_DEB_PATH: "s3://releases-package-repos/deb"
LOCAL_DEB_REPO_PATH: ${{ github.workspace }}/deb
VERSION: ${{ needs.fetch-artifacts-from-s3.outputs.VERSION }}
NODE_VERSION: ${{ needs.fetch-artifacts-from-s3.outputs.NODE_VERSION }}
steps:
- name: Install pgpkkms
......@@ -135,7 +135,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
# Add the new deb to the repo
reprepro -b "$LOCAL_DEB_REPO_PATH" includedeb "${{ inputs.distribution }}" "release-artifacts/polkadot_${VERSION}_amd64.deb"
reprepro -b "$LOCAL_DEB_REPO_PATH" includedeb "${{ inputs.distribution }}" "release-artifacts/polkadot_${NODE_VERSION}_amd64.deb"
- name: Upload updated deb repo
env:
......
......@@ -281,7 +281,7 @@ jobs:
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
- name: Cache Docker layers
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
......
......@@ -35,6 +35,9 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
RELEASE_TAG: ${{ inputs.release_tag }}
PACKAGE: ${{ inputs.package }}
TARGET: ${{ inputs.target }}
steps:
- name: Checkout sources
......@@ -44,7 +47,7 @@ jobs:
id: prepare_final_tag
shell: bash
run: |
tag="$(echo ${{ inputs.release_tag }} | sed 's/-rc[0-9]*$//')"
tag="$(echo $RELEASE_TAG | sed 's/-rc[0-9]*$//')"
echo $tag
echo "FINAL_TAG=${tag}" >> $GITHUB_OUTPUT
......@@ -52,14 +55,17 @@ jobs:
run: |
. ./.github/scripts/common/lib.sh
VERSION="${{ inputs.release_tag }}"
if [[ ${{ inputs.package }} == 'polkadot' ]]; then
VERSION="$RELEASE_TAG"
if [[ "$PACKAGE" == 'polkadot' ]]; then
packages=(polkadot polkadot-prepare-worker polkadot-execute-worker)
for package in "${packages[@]}"; do
fetch_release_artifacts_from_s3 $package ${{ inputs.target }}
OUTPUT_DIR="./release-artifacts/$TARGET/${package}"
fetch_release_artifacts_from_s3 "$package" "$TARGET"
done
NODE_VERSION="$(get_polkadot_node_version_from_code)"
fetch_debian_package_from_s3 polkadot
else
fetch_release_artifacts_from_s3 ${{ inputs.package }} ${{ inputs.target }}
fetch_release_artifacts_from_s3 "$PACKAGE" "$TARGET"
fi
- name: Configure AWS Credentials
......@@ -73,11 +79,11 @@ jobs:
run: |
. ./.github/scripts/release/release_lib.sh
if [[ ${{ inputs.package }} == 'polkadot' ]]; then
if [[ "$PACKAGE" == 'polkadot' ]]; then
packages=(polkadot polkadot-prepare-worker polkadot-execute-worker)
for package in "${packages[@]}"; do
upload_s3_release $package ${{ steps.prepare_final_tag.outputs.final_tag }} ${{ inputs.target }}
done
else
upload_s3_release ${{ inputs.package }} ${{ steps.prepare_final_tag.outputs.final_tag }} ${{ inputs.target }}
upload_s3_release "$PACKAGE" ${{ steps.prepare_final_tag.outputs.final_tag }} "$TARGET"
fi
......@@ -15,7 +15,7 @@ on:
type: string
release_tag:
description: Tag matching the actual release candidate with the format stableYYMM-rcX or stableYYMM
description: Tag matching the actual release candidate with the format polkadpt-stableYYMM(-rcX) or plkadot-stableYYMM-X(-rcX)
required: true
type: string
......
......@@ -78,8 +78,8 @@ jobs:
preflight:
runs-on: ubuntu-latest
outputs:
changes_rust: ${{ steps.set_changes.outputs.rust_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_currentWorkflow: ${{ steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_rust: true
changes_currentWorkflow: true
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
......@@ -112,19 +112,20 @@ jobs:
echo "currentWorkflowFile=$(echo ${{ github.workflow_ref }} | sed -nE "s/.*(\.github\/workflows\/[a-zA-Z0-9_-]*\.y[a]?ml)@refs.*/\1/p")" >> $GITHUB_OUTPUT
echo "currentActionDir=$(echo ${{ github.action_path }} | sed -nE "s/.*(\.github\/actions\/[a-zA-Z0-9_-]*)/\1/p")" >> $GITHUB_OUTPUT
- name: Set changes
id: set_changes
uses: tj-actions/changed-files@v45
with:
files_yaml: |
rust:
- '**/*'
- '!.github/**/*'
- '!prdoc/**/*'
- '!docs/**/*'
currentWorkflow:
- '${{ steps.current_file.outputs.currentWorkflowFile }}'
- '.github/workflows/reusable-preflight.yml'
# removed due to https://news.ycombinator.com/item?id=43368870
#- name: Set changes
# id: set_changes
# uses: tj-actions/changed-files@v45
# with:
# files_yaml: |
# rust:
# - '**/*'
# - '!.github/**/*'
# - '!prdoc/**/*'
# - '!docs/**/*'
# currentWorkflow:
# - '${{ steps.current_file.outputs.currentWorkflowFile }}'
# - '.github/workflows/reusable-preflight.yml'
#
# Set image
......@@ -180,7 +181,6 @@ jobs:
shell: bash
run: |
echo "workflow file: ${{ steps.current_file.outputs.currentWorkflowFile }}"
echo "Modified: ${{ steps.set_changes.outputs.modified_keys }}"
#
#
......
......@@ -102,11 +102,11 @@ jobs:
preflight:
runs-on: ubuntu-latest
outputs:
changes_substrate: ${{ steps.set_changes.outputs.substrate_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_cumulus: ${{ steps.set_changes.outputs.cumulus_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_polkadot: ${{ steps.set_changes.outputs.polkadot_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_bridges: ${{ steps.set_changes.outputs.bridges_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_templates: ${{ steps.set_changes.outputs.templates_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_substrate: true
changes_cumulus: true
changes_polkadot: true
changes_bridges: true
changes_templates: true
ZOMBIENET_IMAGE: ${{ steps.set_vars.outputs.ZOMBIENET_IMAGE }}
ZOMBIENET_RUNNER: ${{ steps.set_vars.outputs.ZOMBIENET_RUNNER }}
......@@ -139,25 +139,26 @@ jobs:
echo "currentWorkflowFile=$(echo ${{ github.workflow_ref }} | sed -nE "s/.*(\.github\/workflows\/[a-zA-Z0-9_-]*\.y[a]?ml)@refs.*/\1/p")" >> $GITHUB_OUTPUT
echo "currentActionDir=$(echo ${{ github.action_path }} | sed -nE "s/.*(\.github\/actions\/[a-zA-Z0-9_-]*)/\1/p")" >> $GITHUB_OUTPUT
- name: Set changes
id: set_changes
uses: tj-actions/changed-files@v45
with:
files_yaml: |
substrate:
- 'substrate/**/*'
cumulus:
- 'cumulus/**/*'
polkadot:
- 'polkadot/**/*'
bridges:
- 'bridges/**/*'
templates:
- 'templates/**/*'
currentWorkflow:
- '${{ steps.current_file.outputs.currentWorkflowFile }}'
- '.github/workflows/zombienet-reusable-preflight.yml'
- '.github/zombienet-env'
# removed due to https://news.ycombinator.com/item?id=43368870
#- name: Set changes
# id: set_changes
# uses: tj-actions/changed-files@v45
# with:
# files_yaml: |
# substrate:
# - 'substrate/**/*'
# cumulus:
# - 'cumulus/**/*'
# polkadot:
# - 'polkadot/**/*'
# bridges:
# - 'bridges/**/*'
# templates:
# - 'templates/**/*'
# currentWorkflow:
# - '${{ steps.current_file.outputs.currentWorkflowFile }}'
# - '.github/workflows/zombienet-reusable-preflight.yml'
# - '.github/zombienet-env'
#
# Set environment vars (including runner/image)
......@@ -187,7 +188,6 @@ jobs:
shell: bash
run: |
echo "workflow file: ${{ steps.current_file.outputs.currentWorkflowFile }}"
echo "Modified: ${{ steps.set_changes.outputs.modified_keys }}"
echo "ZOMBIENET_IMAGE: ${{ steps.set_vars.outputs.ZOMBIENET_IMAGE }}"
#
......@@ -220,7 +220,7 @@ jobs:
wait_build_images:
needs: [ci-env]
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 90
outputs:
BUILD_RUN_ID: ${{ steps.wait_build.outputs.BUILD_RUN_ID }}
steps:
......
......@@ -315,3 +315,57 @@ jobs:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
zombienet-cumulus-0010-elastic_scaling_multiple_block_per_slot:
needs: [preflight]
if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }}
runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes)
timeout-minutes: 60
container:
image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }}
env:
# sdk tests are looking for POLKADOT_IMAGE
POLKADOT_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
RUST_LOG: ${{ needs.preflight.outputs.RUST_LOG }}
ZOMBIE_PROVIDER: ${{ needs.preflight.outputs.ZOMBIE_PROVIDER }}
# don't retry sdk tests
NEXTEST_RETRIES: 0
steps:
- name: k8s_auth
shell: bash
run: |
. /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
k8s_auth
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4.1.8
with:
name: prepare-cumulus-zombienet-artifacts-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}
- name: tar
run: tar -xvf artifacts.tar
- name: script
run: |
echo "POLKADOT_IMAGE: $POLKADOT_IMAGE"
echo "CUMULUS_IMAGE: $CUMULUS_IMAGE"
ls -ltr ./artifacts
# use spot by default
export X_INFRA_INSTANCE=spot
# we want to use `--no-capture` in zombienet tests.
unset NEXTEST_FAILURE_OUTPUT
unset NEXTEST_SUCCESS_OUTPUT
cargo nextest run --archive-file ./artifacts/cumulus-zombienet-tests.tar.zst --no-capture -- elastic_scaling::elastic_scaling_multiple_blocks_per_slot::elastic_scaling_multiple_block_per_slot
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
ZOMBIENET_IMAGE=docker.io/paritytech/zombienet:v1.3.119
ZOMBIENET_IMAGE=docker.io/paritytech/zombienet:v1.3.126
ZOMBIENET_RUNNER=zombienet-arc-runner
PUSHGATEWAY_URL=http://zombienet-prometheus-pushgateway.managed-monitoring:9091/metrics/job/zombie-metrics
DEBUG=zombie,zombie::network-node,zombie::kube::client::logs
......
......@@ -12,10 +12,6 @@
timeout: 60m
include:
# substrate tests
- .gitlab/pipeline/zombienet/substrate.yml
# cumulus tests
- .gitlab/pipeline/zombienet/cumulus.yml
# polkadot tests
- .gitlab/pipeline/zombienet/polkadot.yml
# bridges tests
......
# This file is part of .gitlab-ci.yml
# Here are all jobs that are executed during "zombienet" stage
.zombienet-before-script:
before_script:
# Exit if the job is not merge queue
# - if [[ $CI_COMMIT_REF_NAME != *"gh-readonly-queue"* ]]; then echo "I will run only in a merge queue"; exit 0; fi
# Docker images have different tag in merge queues
- if [[ $CI_COMMIT_REF_NAME == *"gh-readonly-queue"* ]]; then export DOCKER_IMAGES_VERSION="${CI_COMMIT_SHORT_SHA}"; fi
- export POLKADOT_IMAGE="docker.io/paritypr/polkadot-debug:${DOCKER_IMAGES_VERSION}"
- export COL_IMAGE="docker.io/paritypr/test-parachain:${DOCKER_IMAGES_VERSION}"
- echo "Zombie-net Tests Config"
- echo "${ZOMBIENET_IMAGE}"
- echo "${POLKADOT_IMAGE}"
- echo "${COL_IMAGE}"
- echo "${GH_DIR}"
- echo "${LOCAL_DIR}"
- export RELAY_IMAGE=${POLKADOT_IMAGE}
- export COL_IMAGE=${COL_IMAGE}
.zombienet-after-script:
after_script:
- mkdir -p ./zombienet-logs
- cp /tmp/zombie*/logs/* ./zombienet-logs/
# common settings for all zombienet jobs
.zombienet-cumulus-common:
stage: zombienet
image: "${ZOMBIENET_IMAGE}"
needs:
- job: build-push-image-test-parachain
artifacts: true
- job: build-push-image-polkadot-debug
artifacts: true
variables:
# POLKADOT_IMAGE: "docker.io/paritypr/polkadot-debug:${DOCKER_IMAGES_VERSION}"
GH_DIR: "https://github.com/paritytech/cumulus/tree/${CI_COMMIT_SHORT_SHA}/zombienet/tests"
LOCAL_DIR: "/builds/parity/mirrors/polkadot-sdk/cumulus/zombienet/tests"
# COL_IMAGE: "docker.io/paritypr/test-parachain:${DOCKER_IMAGES_VERSION}"
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
RUN_IN_CONTAINER: "1"
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: always
expire_in: 2 days
paths:
- ./zombienet-logs
allow_failure: true
retry:
max: 1
when: runner_system_failure
tags:
- zombienet-polkadot-integration-test
zombienet-cumulus-0001-sync_blocks_from_tip_without_connected_collator:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0001-sync_blocks_from_tip_without_connected_collator.zndsl"
zombienet-cumulus-0002-pov_recovery:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0002-pov_recovery.zndsl"
zombienet-cumulus-0003-full_node_catching_up:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0003-full_node_catching_up.zndsl"
zombienet-cumulus-0004-runtime_upgrade:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
needs:
- !reference [.zombienet-cumulus-common, needs]
- job: build-test-parachain
artifacts: true
before_script:
- ls -ltr *
- cp ./artifacts/zombienet/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm /tmp/
- ls /tmp
- !reference [.zombienet-before-script, before_script]
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0004-runtime_upgrade.zndsl"
zombienet-cumulus-0005-migrate_solo_to_para:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
needs:
- !reference [.zombienet-cumulus-common, needs]
- job: build-test-parachain
artifacts: true
before_script:
- ls -ltr *
- !reference [.zombienet-before-script, before_script]
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0005-migrate_solo_to_para.zndsl"
zombienet-cumulus-0006-rpc_collator_builds_blocks:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0006-rpc_collator_builds_blocks.zndsl"
zombienet-cumulus-0007-full_node_warp_sync:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0007-full_node_warp_sync.zndsl"
zombienet-cumulus-0008-elastic_authoring:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0008-elastic_authoring.zndsl"
zombienet-cumulus-0009-elastic_pov_recovery:
extends:
- .zombienet-cumulus-common
- .zombienet-refs
- .zombienet-before-script
- .zombienet-after-script
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}"
--concurrency=1
--test="0009-elastic_pov_recovery.zndsl"
# This file is part of .gitlab-ci.yml
# Here are all jobs that are executed during "zombienet" stage
# common settings for all zombienet jobs
.zombienet-substrate-common:
before_script:
# Exit if the job is not merge queue
# - if [[ $CI_COMMIT_REF_NAME != *"gh-readonly-queue"* ]]; then echo "I will run only in a merge queue"; exit 0; fi
# Docker images have different tag in merge queues
- if [[ $CI_COMMIT_REF_NAME == *"gh-readonly-queue"* ]]; then export DOCKER_IMAGES_VERSION="${CI_COMMIT_SHORT_SHA}"; fi
- export SUBSTRATE_IMAGE_TAG=${DOCKER_IMAGES_VERSION}
- echo "Zombienet Tests Config"
- echo "${ZOMBIENET_IMAGE}"
- echo "${GH_DIR}"
- echo "${LOCAL_DIR}"
- export ZOMBIENET_INTEGRATION_TEST_IMAGE="${SUBSTRATE_IMAGE}":${SUBSTRATE_IMAGE_TAG}
- echo "${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
stage: zombienet
image: "${ZOMBIENET_IMAGE}"
needs:
- job: build-push-image-substrate-pr
extends:
- .kubernetes-env
- .zombienet-refs
variables:
# SUBSTRATE_IMAGE_TAG: ${DOCKER_IMAGES_VERSION}
SUBSTRATE_IMAGE: "docker.io/paritypr/substrate"
GH_DIR: "https://github.com/paritytech/substrate/tree/${CI_COMMIT_SHA}/zombienet"
LOCAL_DIR: "/builds/parity/mirrors/polkadot-sdk/substrate/zombienet"
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
RUN_IN_CONTAINER: "1"
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: always
expire_in: 2 days
paths:
- ./zombienet-logs
after_script:
- mkdir -p ./zombienet-logs
- cp /tmp/zombie*/logs/* ./zombienet-logs/
retry:
max: 1
when: runner_system_failure
tags:
- zombienet-polkadot-integration-test
.zombienet-substrate-warp-sync-common:
extends:
- .zombienet-substrate-common
variables:
# DB generated from commit: https://github.com/paritytech/polkadot-sdk/commit/868788a5bff3ef94869bd36432726703fe3b4e96
# TODO: As a workaround for https://github.com/paritytech/polkadot-sdk/issues/2568 the DB was generated in archive mode.
# After the issue is fixed, we should replace it with a pruned version of the DB.
DB_SNAPSHOT: "https://storage.googleapis.com/zombienet-db-snaps/substrate/0001-basic-warp-sync/chains-9677807d738b951e9f6c82e5fd15518eb0ae0419.tgz"
DB_BLOCK_HEIGHT: 56687
zombienet-substrate-0000-block-building:
extends:
- .zombienet-substrate-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/0000-block-building"
--test="block-building.zndsl"
zombienet-substrate-0001-basic-warp-sync:
extends:
- .zombienet-substrate-warp-sync-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/0001-basic-warp-sync"
--test="test-warp-sync.zndsl"
zombienet-substrate-0002-validators-warp-sync:
extends:
- .zombienet-substrate-warp-sync-common
before_script:
- !reference [ .zombienet-substrate-warp-sync-common, before_script ]
- cp --remove-destination ${LOCAL_DIR}/0001-basic-warp-sync/chain-spec.json ${LOCAL_DIR}/0002-validators-warp-sync
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/0002-validators-warp-sync"
--test="test-validators-warp-sync.zndsl"
zombienet-substrate-0003-block-building-warp-sync:
extends:
- .zombienet-substrate-warp-sync-common
before_script:
- !reference [ .zombienet-substrate-warp-sync-common, before_script ]
- cp --remove-destination ${LOCAL_DIR}/0001-basic-warp-sync/chain-spec.json ${LOCAL_DIR}/0003-block-building-warp-sync
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/0003-block-building-warp-sync"
--test="test-block-building-warp-sync.zndsl"
......@@ -4265,6 +4265,7 @@ dependencies = [
"polkadot-node-subsystem-util",
"polkadot-overseer",
"polkadot-primitives",
"rstest",
"sc-client-api",
"sc-consensus",
"sc-consensus-aura",
......@@ -4500,6 +4501,7 @@ dependencies = [
"pallet-aura",
"pallet-timestamp",
"parity-scale-codec",
"rstest",
"scale-info",
"sp-application-crypto 30.0.0",
"sp-consensus-aura",
......@@ -5082,6 +5084,39 @@ dependencies = [
"url",
]
 
[[package]]
name = "cumulus-zombienet-sdk-helpers"
version = "0.1.0"
dependencies = [
"anyhow",
"log",
"parity-scale-codec",
"polkadot-primitives",
"serde",
"serde_json",
"subxt 0.38.1",
"subxt-signer 0.38.0",
"tokio",
]
[[package]]
name = "cumulus-zombienet-sdk-tests"
version = "0.1.0"
dependencies = [
"anyhow",
"cumulus-zombienet-sdk-helpers",
"env_logger 0.11.3",
"log",
"parity-scale-codec",
"polkadot-primitives",
"serde",
"serde_json",
"subxt 0.38.1",
"subxt-signer 0.38.0",
"tokio",
"zombienet-sdk",
]
[[package]]
name = "curl"
version = "0.4.46"
......@@ -9688,9 +9723,9 @@ checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
 
[[package]]
name = "litep2p"
version = "0.9.1"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e5a3d13ee6af6f01bb2093aa6d5f29b79ede7de6277e5d0394e8f5d8eaa5a86"
checksum = "fa3aa5628ae2b2283aa01dfa58947f1926aedba0160dd25041e2cd4bc71534c9"
dependencies = [
"async-trait",
"bs58",
......@@ -10838,11 +10873,10 @@ dependencies = [
 
[[package]]
name = "num-integer"
version = "0.1.45"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
"autocfg",
"num-traits",
]
 
......@@ -12813,6 +12847,9 @@ dependencies = [
"hex-literal",
"impl-trait-for-tuples",
"log",
"num-bigint",
"num-integer",
"num-traits",
"pallet-balances",
"pallet-proxy",
"pallet-revive-fixtures",
......@@ -12828,6 +12865,7 @@ dependencies = [
"pretty_assertions",
"rand 0.8.5",
"rand_pcg",
"ripemd",
"rlp 0.6.1",
"scale-info",
"secp256k1 0.28.2",
......@@ -12845,6 +12883,7 @@ dependencies = [
"sp-tracing 16.0.0",
"staging-xcm",
"staging-xcm-builder",
"substrate-bn",
"subxt-signer 0.38.0",
]
 
......@@ -12889,6 +12928,8 @@ name = "pallet-revive-fixtures"
version = "0.1.0"
dependencies = [
"anyhow",
"cargo_metadata",
"pallet-revive-uapi",
"polkavm-linker 0.21.0",
"sp-core 28.0.0",
"sp-io 30.0.0",
......@@ -13537,6 +13578,7 @@ dependencies = [
"sp-core 28.0.0",
"sp-io 30.0.0",
"sp-runtime 31.0.1",
"sp-tracing 16.0.0",
"staging-xcm",
"staging-xcm-builder",
"staging-xcm-executor",
......@@ -16711,6 +16753,7 @@ name = "polkadot-zombienet-sdk-tests"
version = "0.1.0"
dependencies = [
"anyhow",
"cumulus-zombienet-sdk-helpers",
"env_logger 0.11.3",
"log",
"parity-scale-codec",
......@@ -24491,6 +24534,19 @@ dependencies = [
"zeroize",
]
 
[[package]]
name = "substrate-bn"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c"
dependencies = [
"byteorder",
"crunchy",
"lazy_static",
"rand 0.8.5",
"rustc-hex",
]
[[package]]
name = "substrate-build-script-utils"
version = "11.0.0"
......
......@@ -148,6 +148,8 @@ members = [
"cumulus/test/runtime",
"cumulus/test/service",
"cumulus/xcm/xcm-emulator",
"cumulus/zombienet/zombienet-sdk",
"cumulus/zombienet/zombienet-sdk-helpers",
"docs/sdk",
"docs/sdk/packages/guides/first-pallet",
"docs/sdk/packages/guides/first-runtime",
......@@ -643,6 +645,7 @@ bitvec = { version = "1.0.1", default-features = false }
blake2 = { version = "0.10.4", default-features = false }
blake2b_simd = { version = "1.0.2", default-features = false }
blake3 = { version = "1.5" }
bn = { package = "substrate-bn", version = "0.6", default-features = false }
bounded-collections = { version = "0.2.3", default-features = false }
bounded-vec = { version = "0.7" }
bp-asset-hub-rococo = { path = "bridges/chains/chain-asset-hub-rococo", default-features = false }
......@@ -741,6 +744,7 @@ cumulus-test-client = { path = "cumulus/test/client" }
cumulus-test-relay-sproof-builder = { path = "cumulus/test/relay-sproof-builder", default-features = false }
cumulus-test-runtime = { path = "cumulus/test/runtime" }
cumulus-test-service = { path = "cumulus/test/service" }
cumulus-zombienet-sdk-helpers = { path = "cumulus/zombienet/zombienet-sdk-helpers", default-features = false }
curve25519-dalek = { version = "4.1.3" }
derive-syn-parse = { version = "0.2.0" }
derive-where = { version = "1.2.7" }
......@@ -854,7 +858,7 @@ linked-hash-map = { version = "0.5.4" }
linked_hash_set = { version = "0.1.4" }
linregress = { version = "0.5.1" }
lite-json = { version = "0.2.0", default-features = false }
litep2p = { version = "0.9.1", features = ["websocket"] }
litep2p = { version = "0.9.3", features = ["websocket"] }
log = { version = "0.4.22", default-features = false }
macro_magic = { version = "0.5.1" }
maplit = { version = "1.0.2" }
......@@ -885,8 +889,9 @@ node-rpc = { path = "substrate/bin/node/rpc" }
node-testing = { path = "substrate/bin/node/testing" }
nohash-hasher = { version = "0.2.0" }
novelpoly = { version = "2.0.0", package = "reed-solomon-novelpoly" }
num-bigint = { version = "0.4.3" }
num-bigint = { version = "0.4.3", default-features = false }
num-format = { version = "0.4.3" }
num-integer = { version = "0.1.46", default-features = false }
num-rational = { version = "0.4.1" }
num-traits = { version = "0.2.17", default-features = false }
num_cpus = { version = "1.13.1" }
......@@ -1134,6 +1139,7 @@ relay-substrate-client = { path = "bridges/relays/client-substrate" }
relay-utils = { path = "bridges/relays/utils" }
remote-externalities = { path = "substrate/utils/frame/remote-externalities", default-features = false, package = "frame-remote-externalities" }
reqwest = { version = "0.12.9", default-features = false }
ripemd = { version = "0.1.3", default-features = false }
rlp = { version = "0.6.1", default-features = false }
rococo-emulated-chain = { path = "cumulus/parachains/integration-tests/emulated/chains/relays/rococo" }
rococo-parachain-runtime = { path = "cumulus/parachains/runtimes/testing/rococo-parachain" }
......