forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (122 loc) · 6.17 KB
/
zombienet_substrate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Zombienet Substrate
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: "./substrate/zombienet"
GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443"
# 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
jobs:
preflight:
uses: ./.github/workflows/zombienet-reusable-preflight.yml
zombienet-substrate-0000-block-building:
needs: [preflight]
# only run if we have changes in ./substrate directory and the build workflow already finish with success status.
if: ${{ needs.preflight.outputs.changes_substrate || github.event_name == 'workflow_dispatch' }}
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:
ZOMBIENET_INTEGRATION_TEST_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/substrate:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
echo "Img: $ZOMBIENET_INTEGRATION_TEST_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/$LOCAL_DIR/0000-block-building" --test="block-building.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
zombienet-substrate-0001-basic-warp-sync:
needs: [preflight]
# only run if we have changes in ./substrate directory and the build workflow already finish with success status.
if: ${{ needs.preflight.outputs.changes_substrate || github.event_name == 'workflow_dispatch' }}
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:
ZOMBIENET_INTEGRATION_TEST_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/substrate:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
echo "Img: $ZOMBIENET_INTEGRATION_TEST_IMAGE"
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/$LOCAL_DIR/0001-basic-warp-sync" --test="test-warp-sync.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
zombienet-substrate-0002-validators-warp-sync:
needs: [preflight]
# only run if we have changes in ./substrate directory and the build workflow already finish with success status.
if: ${{ needs.preflight.outputs.changes_substrate || github.event_name == 'workflow_dispatch' }}
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:
ZOMBIENET_INTEGRATION_TEST_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/substrate:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
echo "Img: $ZOMBIENET_INTEGRATION_TEST_IMAGE"
cp --remove-destination ${LOCAL_DIR}/0001-basic-warp-sync/chain-spec.json ${LOCAL_DIR}/0002-validators-warp-sync
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/$LOCAL_DIR/0002-validators-warp-sync" --test="test-validators-warp-sync.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*
zombienet-substrate-0003-block-building-warp-sync:
needs: [preflight]
# only run if we have changes in ./substrate directory and the build workflow already finish with success status.
if: ${{ needs.preflight.outputs.changes_substrate || github.event_name == 'workflow_dispatch' }}
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:
ZOMBIENET_INTEGRATION_TEST_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/substrate:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
echo "Img: $ZOMBIENET_INTEGRATION_TEST_IMAGE"
cp --remove-destination ${LOCAL_DIR}/0001-basic-warp-sync/chain-spec.json ${LOCAL_DIR}/0003-block-building-warp-sync
export DEBUG=${{ needs.preflight.outputs.DEBUG }}
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/$LOCAL_DIR/0003-block-building-warp-sync" --test="test-block-building-warp-sync.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-${{ github.job }}-${{ github.sha }}
path: |
/tmp/zombie*/logs/*