Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move zombienet cumulus pipeline to gha #7529

Merged
merged 8 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/zombienet-reusable-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,12 @@ jobs:
fi
sleep 10
done
echo "CI workflow is done."

#check if the build succeeded
CONCLUSION=$(gh run ls -c $SHA -w "Build and push images" --json name,conclusion --jq '.[] | select(.name == "Build and push images") | .conclusion')
if [[ $CONCLISION == "success"]]; then
echo "CI workflow is done."
else
echo "::warning:: CI workflow ('Build and push images') fails"
exit 1
fi;
315 changes: 315 additions & 0 deletions .github/workflows/zombienet_cumulus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,315 @@
name: Zombienet Cumulus

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
RUN_IN_CONTAINER: 1
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
LOCAL_DIR: "./cumulus/zombienet/tests"
GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443"

# only run if we have changes in [subtrate, cumulus, polkadot] directories or this workflow.
jobs:
preflight:
uses: ./.github/workflows/zombienet-reusable-preflight.yml

zombienet-cumulus-0001-sync_blocks_from_tip_without_connected_collator:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0001-sync_blocks_from_tip_without_connected_collator.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*

zombienet-cumulus-0002-pov_recovery:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0002-pov_recovery.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*

#
zombienet-cumulus-0003-full_node_catching_up:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0003-full_node_catching_up.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
#
#
zombienet-cumulus-0004-runtime_upgrade:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/[email protected]
with:
name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

- name: tar
run: tar -xvf artifacts.tar

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
ls -ltr *
cp ./artifacts/zombienet/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm /tmp/
ls /tmp
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0004-runtime_upgrade.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
#
#
zombienet-cumulus-0005-migrate_solo_to_para:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0005-migrate_solo_to_para.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
#
zombienet-cumulus-0006-rpc_collator_builds_blocks:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0006-rpc_collator_builds_blocks.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
#
zombienet-cumulus-0007-full_node_warp_sync:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0007-full_node_warp_sync.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
#
zombienet-cumulus-0008-elastic_authoring:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0008-elastic_authoring.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
#
zombienet-cumulus-0009-elastic_pov_recovery:
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:
RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: script
run: |
echo "RELAY_IMAGE: $RELAY_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="$(pwd)/$LOCAL_DIR"
--concurrency=1
--test="0009-elastic_pov_recovery.zndsl"

- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
Loading