git.delta.rocks / unique-network / refs/commits / a73c3160b586

difftreelog

ci use upstream polkadot image (#1073)

Buddy Glass2024-07-10parent: #106cacb.patch.diff
in: master
* 1. delete own polkadot image and use native image from parity.
2. delete wasm-name variable
3. add rust-toolchain.toml and delete RUST_TOOLCHAIN variable
4. deleted unused docker files
5. miltiple fix workflows

* test without shiden

* fix chains for asset-hub

* fix polkadex for xcm

* fix polkadex for xcm

* update versions for gh-actions

* fix datapath for relay

* fix datapath for assethub

* fix assethub

* fix chains for assethub

* fix codestyle workflow

* fix conditions for workflows

* delete flag insecure-validator-i-know-what-i-do

---------

54 files changed

modified.baedeker/collator-selection.jsonnetdiffbeforeafterboth
2m = import 'baedeker-library/mixin/spec.libsonnet',2m = import 'baedeker-library/mixin/spec.libsonnet',
3;3;
44
5function(relay_spec)
6
5local relay = {7local relay = {
6 name: 'relay',8 name: 'relay',
7 bin: 'bin/polkadot',9 bin: 'bin/polkadot',
8 validatorIdAssignment: 'staking',10 validatorIdAssignment: 'staking',
9 spec: {Genesis:{11 spec: {Genesis:{
10 chain: 'rococo-local',12 chain: relay_spec,
11 modify:: m.genericRelay($),13 modify:: m.genericRelay($),
12 }},14 }},
13 nodes: {15 nodes: {
14 [name]: {16 [name]: {
15 bin: $.bin,17 bin: $.bin,
16 wantedKeys: 'relay',18 wantedKeys: 'relay',
19 expectedDataPath: '/parity',
17 },20 },
18 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']21 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
19 },22 },
modified.baedeker/forkless-data.jsonnetdiffbeforeafterboth
17 [name]: {17 [name]: {
18 bin: $.bin,18 bin: $.bin,
19 wantedKeys: 'relay',19 wantedKeys: 'relay',
20 expectedDataPath: '/parity',
20 },21 },
21 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']22 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
22 },23 },
modified.baedeker/node-only.jsonnetdiffbeforeafterboth
2m = import 'baedeker-library/mixin/spec.libsonnet',2m = import 'baedeker-library/mixin/spec.libsonnet',
3;3;
44
5function(relay_spec)
6
5local relay = {7local relay = {
6 name: 'relay',8 name: 'relay',
7 bin: 'bin/polkadot',9 bin: 'bin/polkadot',
8 validatorIdAssignment: 'staking',10 validatorIdAssignment: 'staking',
9 spec: {Genesis:{11 spec: {Genesis:{
10 chain: 'rococo-local',12 chain: relay_spec,
11 modify:: m.genericRelay($),13 modify:: m.genericRelay($),
12 }},14 }},
13 nodes: {15 nodes: {
14 [name]: {16 [name]: {
15 bin: $.bin,17 bin: $.bin,
16 wantedKeys: 'relay',18 wantedKeys: 'relay',
19 expectedDataPath: '/parity',
17 },20 },
18 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']21 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
19 },22 },
modified.baedeker/xcm-opal-async-backing.jsonnetdiffbeforeafterboth
39 [name]: {39 [name]: {
40 bin: $.bin,40 bin: $.bin,
41 wantedKeys: 'relay',41 wantedKeys: 'relay',
42 expectedDataPath: '/parity',
42 },43 },
43 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']44 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
44 },45 },
45};46};
4647
47local opal = {48local unique = {
48 name: 'opal',49 name: 'unique',
49 bin: 'bin/unique',50 bin: 'bin/unique',
50 paraId: 1001,51 paraId: 1001,
51 spec: {Genesis:{52 spec: {Genesis:{
66relay + {67relay + {
67 parachains: {68 parachains: {
68 [para.name]: para,69 [para.name]: para,
69 for para in [opal]70 for para in [unique]
70 },71 },
71}72}
7273
modified.baedeker/xcm-opal.jsonnetdiffbeforeafterboth
19 [name]: {19 [name]: {
20 bin: $.bin,20 bin: $.bin,
21 wantedKeys: 'relay',21 wantedKeys: 'relay',
22 expectedDataPath: '/parity',
22 },23 },
23 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']24 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
24 },25 },
25};26};
2627
27local opal = {28local unique = {
28 name: 'opal',29 name: 'unique',
29 bin: 'bin/unique',30 bin: 'bin/unique',
30 paraId: 1001,31 paraId: 1001,
31 spec: {Genesis:{32 spec: {Genesis:{
4546
46local westmint = {47local westmint = {
47 name: 'westmint',48 name: 'westmint',
48 bin: 'bin/cumulus',49 bin: 'bin/assethub',
49 paraId: 1002,50 paraId: 1002,
50 spec: {Genesis:{51 spec: {Genesis:{
51 chain: 'westmint-local',52 chain: 'westmint-local',
55 [name]: {56 [name]: {
56 bin: $.bin,57 bin: $.bin,
57 wantedKeys: 'para',58 wantedKeys: 'para',
59 expectedDataPath: '/parity',
58 },60 },
59 for name in ['alice', 'bob']61 for name in ['alice', 'bob']
60 },62 },
63relay + {65relay + {
64 parachains: {66 parachains: {
65 [para.name]: para,67 [para.name]: para,
66 for para in [opal, westmint]68 for para in [unique, westmint]
67 },69 },
68}70}
6971
modified.baedeker/xcm-quartz.jsonnetdiffbeforeafterboth
24 [name]: {24 [name]: {
25 bin: $.bin,25 bin: $.bin,
26 wantedKeys: 'relay',26 wantedKeys: 'relay',
27 expectedDataPath: '/parity',
27 },28 },
28 for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie']29 for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie']
29 },30 },
30};31};
3132
32local quartz = {33local unique = {
33 name: 'quartz',34 name: 'unique',
34 bin: 'bin/unique',35 bin: 'bin/unique',
35 paraId: 1001,36 paraId: 1001,
36 spec: {Genesis:{37 spec: {Genesis:{
8990
90local statemine = {91local statemine = {
91 name: 'statemine',92 name: 'statemine',
92 bin: 'bin/cumulus',93 bin: 'bin/assethub',
93 paraId: 1004,94 paraId: 1004,
94 spec: {Genesis:{95 spec: {Genesis:{
95 chain: 'statemine-local',96 chain: 'statemine-local',
99 [name]: {100 [name]: {
100 bin: $.bin,101 bin: $.bin,
101 wantedKeys: 'para',102 wantedKeys: 'para',
103 expectedDataPath: '/parity',
102 },104 },
103 for name in ['alice', 'bob']105 for name in ['alice', 'bob']
104 },106 },
124relay + {126relay + {
125 parachains: {127 parachains: {
126 [para.name]: para,128 [para.name]: para,
127 for para in [quartz, karura, moonriver, statemine, shiden]129 for para in [unique, karura, moonriver, statemine, shiden]
128 },130 },
129}131}
130132
modified.baedeker/xcm-unique.jsonnetdiffbeforeafterboth
25 [name]: {25 [name]: {
26 bin: $.bin,26 bin: $.bin,
27 wantedKeys: 'relay',27 wantedKeys: 'relay',
28 expectedDataPath: '/parity',
28 },29 },
29 for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly']30 for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly']
30 },31 },
9091
91local statemint = {92local statemint = {
92 name: 'statemint',93 name: 'statemint',
93 bin: 'bin/cumulus',94 bin: 'bin/assethub',
94 paraId: 1004,95 paraId: 1004,
95 spec: {Genesis:{96 spec: {Genesis:{
96 chain: 'statemint-local',97 chain: 'statemint-local',
100 [name]: {101 [name]: {
101 bin: $.bin,102 bin: $.bin,
102 wantedKeys: 'para-ed',103 wantedKeys: 'para-ed',
104 expectedDataPath: '/parity',
103 },105 },
104 for name in ['alice', 'bob']106 for name in ['alice', 'bob']
105 },107 },
modified.docker/Dockerfile-chain-devdiffbeforeafterboth
1FROM uniquenetwork/services:latest1FROM uniquenetwork/services:latest
22
3ARG RUST_TOOLCHAIN
4ARG NETWORK3ARG NETWORK
54
6ENV DEBIAN_FRONTEND=noninteractive5ENV DEBIAN_FRONTEND=noninteractive
9ENV CARGO_HOME="/cargo-home"8ENV CARGO_HOME="/cargo-home"
10ENV PATH="/cargo-home/bin:$PATH"9ENV PATH="/cargo-home/bin:$PATH"
1110
12RUN echo "$NETWORK\n" && echo "$RUST_TOOLCHAIN\n"
13
14RUN rustup toolchain uninstall $(rustup toolchain list) && \
15 rustup toolchain install $RUST_TOOLCHAIN && \
16 rustup default $RUST_TOOLCHAIN && \
17 rustup component add --toolchain $RUST_TOOLCHAIN rust-src && \
18 rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN
19
20RUN mkdir /dev_chain11RUN mkdir /dev_chain
21COPY . /dev_chain12COPY . /dev_chain
2213
modified.docker/Dockerfile-chain-dev-unitdiffbeforeafterboth
4ENV CARGO_HOME="/cargo-home"4ENV CARGO_HOME="/cargo-home"
5ENV PATH="/cargo-home/bin:$PATH"5ENV PATH="/cargo-home/bin:$PATH"
66
7ARG RUST_TOOLCHAIN
8ARG NETWORK7ARG NETWORK
98
10RUN rustup toolchain uninstall $(rustup toolchain list) && \
11 rustup toolchain install $RUST_TOOLCHAIN && \
12 rustup default $RUST_TOOLCHAIN && \
13 rustup component add --toolchain $RUST_TOOLCHAIN rust-src && \
14 rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN
15
16RUN mkdir /dev_chain9RUN mkdir /dev_chain
17COPY . /dev_chain10COPY . /dev_chain
1811
deleted.docker/Dockerfile-collators.j2diffbeforeafterboth

no changes

added.docker/Dockerfile-hydradxdiffbeforeafterboth

no changes

deleted.docker/Dockerfile-polkadot.j2diffbeforeafterboth

no changes

deleted.docker/Dockerfile-testnet.j2diffbeforeafterboth

no changes

modified.docker/Dockerfile-try-runtime.j2diffbeforeafterboth
1# ===== Rust builder =====1# ===== Rust builder =====
2FROM uniquenetwork/services:latest as rust-builder2FROM ubuntu:22.04 as rust-builder
3LABEL maintainer="Unique.Network"
34
4ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
5ENV CARGO_HOME="/cargo-home"5ENV CARGO_HOME="/cargo-home"
6ENV PATH="/cargo-home/bin:$PATH"6ENV PATH="/cargo-home/bin:$PATH"
7ENV TZ=UTC7ENV TZ=UTC
8RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
89
9RUN rustup toolchain uninstall $(rustup toolchain list) && \10RUN apt-get update && \
10 rustup toolchain install {{ RUST_TOOLCHAIN }} && \11 apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \
11 rustup default {{ RUST_TOOLCHAIN }} && \
12 rustup target list --installed && \
13 rustup component add --toolchain {{ RUST_TOOLCHAIN }} rust-src && \12 apt-get clean && \
14 rustup show13 rm -r /var/lib/apt/lists/*
15RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }}
1614
15RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
16
17RUN mkdir /unique_parachain17RUN mkdir /unique_parachain
18WORKDIR /unique_parachain18WORKDIR /unique_parachain
1919
30 echo "Fork from: {{ REPLICA_FROM }}\n" && \30 echo "Fork from: {{ REPLICA_FROM }}\n" && \
31 cargo build --features=try-runtime,{{ NETWORK }}-runtime --release31 cargo build --features=try-runtime,{{ NETWORK }}-runtime --release
3232
33CMD cargo run --release --features {{ NETWORK }}-runtime,try-runtime -- try-runtime --runtime target/release/wbuild/{{ WASM_NAME }}-runtime/{{ WASM_NAME }}_runtime.compact.compressed.wasm -lruntime=debug -ltry-runtime::cli=debug on-runtime-upgrade --checks live --uri {{ REPLICA_FROM }}33CMD cargo run --release --features {{ NETWORK }}-runtime,try-runtime -- try-runtime --runtime target/release/wbuild/{{ NETWORK }}-runtime/{{ NETWORK }}_runtime.compact.compressed.wasm -lruntime=debug -ltry-runtime::cli=debug on-runtime-upgrade --checks live --uri {{ REPLICA_FROM }}
3434
modified.docker/Dockerfile-uniquediffbeforeafterboth
1414
15RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none15RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
1616
17ARG RUST_TOOLCHAIN
18RUN echo "Using Rust '$RUST_TOOLCHAIN'" && \
19 rustup toolchain install $RUST_TOOLCHAIN && \
20 rustup target add wasm32-unknown-unknown --toolchain ${RUST_TOOLCHAIN} && \
21 rustup default $RUST_TOOLCHAIN && \
22 rustup component add --toolchain $RUST_TOOLCHAIN rust-src && \
23 rustup target list --installed && \
24 rustup show
25
26RUN mkdir /unique_parachain17RUN mkdir /unique_parachain
27WORKDIR /unique_parachain18WORKDIR /unique_parachain
2819
3324
34COPY . unique-chain/25COPY . unique-chain/
3526
36ARG RUNTIME_FEATURES27ARG FEATURES
37# registry for Updating registry. It is safe to cache it, because it only contains references to the dependency files,28# registry for Updating registry. It is safe to cache it, because it only contains references to the dependency files,
38# and the caches for the files themselves are set in Cargo.lock, which won't be updated because of --locked flag29# and the caches for the files themselves are set in Cargo.lock, which won't be updated because of --locked flag
39# git for Updating git repository. It is safe to cache it, because git dependencies are cached by revision,30# git for Updating git repository. It is safe to cache it, because git dependencies are cached by revision,
47 --mount=type=cache,target=/cargo-home/git \38 --mount=type=cache,target=/cargo-home/git \
48 --mount=type=cache,target=/unique_parachain/unique-chain/target \39 --mount=type=cache,target=/unique_parachain/unique-chain/target \
49 cd unique-chain && \40 cd unique-chain && \
50 echo "Using runtime features '$RUNTIME_FEATURES'" && \41 echo "Using runtime features ${FEATURES}" && \
51 CARGO_INCREMENTAL=0 cargo build --profile integration-tests --features=fast-inflation,"$RUNTIME_FEATURES" --locked && \42 CARGO_INCREMENTAL=0 cargo build --profile integration-tests --features=fast-inflation,"${FEATURES}" --locked && \
52 mv ./target/integration-tests/unique-collator /unique_parachain/unique-chain/ && \43 mv ./target/integration-tests/unique-collator /unique_parachain/unique-chain/ && \
53 cd target/integration-tests/wbuild && find . -name "*.wasm" -exec sh -c 'mkdir -p "../../../wasm/$(dirname {})"; cp {} "../../../wasm/{}"' \;44 cd target/integration-tests/wbuild && find . -name "*.wasm" -exec sh -c 'mkdir -p "../../../wasm/$(dirname {})"; cp {} "../../../wasm/{}"' \;
5445
modified.docker/Dockerfile-unique-releasediffbeforeafterboth
1414
15RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none15RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
1616
17ARG RUST_TOOLCHAIN
18RUN echo "Using Rust '$RUST_TOOLCHAIN'" && \
19 rustup toolchain install $RUST_TOOLCHAIN && \
20 rustup target add wasm32-unknown-unknown --toolchain ${RUST_TOOLCHAIN} && \
21 rustup default $RUST_TOOLCHAIN && \
22 rustup component add --toolchain $RUST_TOOLCHAIN rust-src && \
23 rustup target list --installed && \
24 rustup show
25
26RUN mkdir /unique_parachain17RUN mkdir /unique_parachain
27WORKDIR /unique_parachain18WORKDIR /unique_parachain
2819
34ARG UNIQUE_VERSION25ARG UNIQUE_VERSION
35RUN git clone -b "$UNIQUE_VERSION" --depth 1 https://github.com/uniquenetwork/unique-chain.git26RUN git clone -b "$UNIQUE_VERSION" --depth 1 https://github.com/uniquenetwork/unique-chain.git
3627
37ARG RUNTIME_FEATURES28ARG FEATURES
38RUN --mount=type=cache,target=/cargo-home/registry \29RUN --mount=type=cache,target=/cargo-home/registry \
39 --mount=type=cache,target=/cargo-home/git \30 --mount=type=cache,target=/cargo-home/git \
40 --mount=type=cache,target=/unique_parachain/polkadot/target \31 --mount=type=cache,target=/unique_parachain/polkadot/target \
41 cd unique-chain && \32 cd unique-chain && \
42 CARGO_INCREMENTAL=0 cargo build --release --features="$RUNTIME_FEATURES" --locked && \33 CARGO_INCREMENTAL=0 cargo build --release --features="${FEATURES}" --locked && \
43 mv ./target/release/unique-collator /unique_parachain/unique-chain/34 mv ./target/release/unique-collator /unique_parachain/unique-chain/
4435
45# ===== BIN ======36# ===== BIN ======
deleted.docker/docker-compose.collators.j2diffbeforeafterboth

no changes

deleted.docker/docker-compose.forkless-data.j2diffbeforeafterboth

no changes

deleted.docker/docker-compose.forkless-nodata.j2diffbeforeafterboth

no changes

modified.docker/docker-compose.gov.j2diffbeforeafterboth
4 node-dev:4 node-dev:
5 build:5 build:
6 args:6 args:
7 - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
8 - "NETWORK={{ NETWORK }}"7 - "NETWORK={{ NETWORK }}"
9 - "WASM_NAME={{ WASM_NAME }}"
10 context: ../8 context: ../
11 dockerfile: .docker/Dockerfile-chain-dev9 dockerfile: .docker/Dockerfile-chain-dev
12 image: node-dev10 image: node-dev
modified.docker/docker-compose.tmp-dev.j2diffbeforeafterboth
4 node-dev:4 node-dev:
5 build:5 build:
6 args:6 args:
7 - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
8 - "NETWORK={{ NETWORK }}"7 - "NETWORK={{ NETWORK }}"
9 context: ../8 context: ../
10 dockerfile: .docker/Dockerfile-chain-dev9 dockerfile: .docker/Dockerfile-chain-dev
deleted.docker/docker-compose.tmp-node.j2diffbeforeafterboth

no changes

modified.docker/docker-compose.tmp-unit.j2diffbeforeafterboth
6 context: ../6 context: ../
7 dockerfile: .docker/Dockerfile-chain-dev-unit7 dockerfile: .docker/Dockerfile-chain-dev-unit
8 args:8 args:
9 - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
10 - "NETWORK={{ NETWORK }}"9 - "NETWORK={{ NETWORK }}"
11 image: node-dev10 image: node-dev
12 container_name: node-dev 11 container_name: node-dev
deleted.docker/forkless-config/launch-config-forkless-nodata.j2diffbeforeafterboth

no changes

deleted.docker/testnet-config/launch-config.jsondiffbeforeafterboth

no changes

modified.envdiffbeforeafterboth
1RUST_TOOLCHAIN=nightly-2024-04-101RUST_TOOLCHAIN=nightly-2024-04-10
2POLKADOT_LAUNCH_BRANCH=unique-network
3RELAY_CHAIN_TYPE=westend2RELAY_CHAIN_TYPE=rococo
43
5POLKADOT_MAINNET_BRANCH=v1.2.44POLKADOT_MAINNET_BRANCH=v1.9.0
5STATEMINT_BUILD_BRANCH=1.9.0
6ACALA_BUILD_BRANCH=2.25.06ACALA_BUILD_BRANCH=2.25.0
7MOONBEAM_BUILD_BRANCH=runtime-29017MOONBEAM_BUILD_BRANCH=runtime-2901
8ASTAR_BUILD_BRANCH=v5.39.18ASTAR_BUILD_BRANCH=v5.39.1
9HYDRADX_BUILD_BRANCH=v27.0.0
10POLKADEX_BUILD_BRANCH=v6.0.0
9UNIQUE_MAINNET_BRANCH=release-v1003007111UNIQUE_MAINNET_BRANCH=release-v10030070
10UNIQUE_REPLICA_FROM=wss://ws.unique.network:44312UNIQUE_REPLICA_FROM=wss://ws.unique.network:443
13
11POLKADEX_BUILD_BRANCH=v1.1.014KUSAMA_MAINNET_BRANCH=v1.9.0
12HYDRADX_BUILD_BRANCH=v20.1.115STATEMINE_BUILD_BRANCH=1.9.0
13
14KUSAMA_MAINNET_BRANCH=v1.2.5
15KARURA_BUILD_BRANCH=release-karura-2.25.016KARURA_BUILD_BRANCH=2.25.0
16MOONRIVER_BUILD_BRANCH=runtime-290117MOONRIVER_BUILD_BRANCH=runtime-2901
17SHIDEN_BUILD_BRANCH=v5.39.118SHIDEN_BUILD_BRANCH=v5.39.1
18QUARTZ_MAINNET_BRANCH=release-v1003007119QUARTZ_MAINNET_BRANCH=release-v10030070
19QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:44320QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443
2021
21UNIQUEWEST_MAINNET_BRANCH=release-v0.9.4322UNIQUEWEST_MAINNET_BRANCH=v1.9.0
22WESTMINT_BUILD_BRANCH=bad-branch-v101100123WESTMINT_BUILD_BRANCH=1.9.0
23OPAL_MAINNET_BRANCH=release-v1003007124OPAL_MAINNET_BRANCH=release-v10030070
24OPAL_REPLICA_FROM=wss://ws-opal.unique.network:44325OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443
2526
2627
modified.github/actions/prepare/action.ymldiffbeforeafterboth
15 run: | 15 run: |
16 echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV}16 echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV}
17 - name: Run find-and-replace to remove slashes from branch name17 - name: Run find-and-replace to remove slashes from branch name
18 uses: mad9000/actions-find-and-replace-string@418 uses: mad9000/actions-find-and-replace-string@5
19 id: ref_slug19 id: ref_slug
20 with:20 with:
21 source: ${{ github.head_ref }}21 source: ${{ github.head_ref }}
deleted.github/workflows/canary.ymldiffbeforeafterboth

no changes

modified.github/workflows/ci-develop.ymldiffbeforeafterboth
26 uses: ./.github/workflows/unit-test.yml26 uses: ./.github/workflows/unit-test.yml
27 secrets: inherit 27 secrets: inherit
28
29 canary:
30 if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-canary')
31 uses: ./.github/workflows/canary.yml
32 secrets: inherit
3328
34 xcm:29 xcm:
35 if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-xcm')30 if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-xcm')
67 secrets: inherit62 secrets: inherit
6863
69 governance:64 governance:
70 if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-gov')65 if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-governance')
71 uses: ./.github/workflows/governance.yml66 uses: ./.github/workflows/governance.yml
72 secrets: inherit67 secrets: inherit
7368
modified.github/workflows/ci-master.ymldiffbeforeafterboth
24 uses: ./.github/workflows/unit-test.yml24 uses: ./.github/workflows/unit-test.yml
25 secrets: inherit 25 secrets: inherit
26
27 # canary:
28 # uses: ./.github/workflows/canary.yml
29 # secrets: inherit # pass all secrets from initial workflow to nested
3026
31 xcm:27 xcm:
32 uses: ./.github/workflows/xcm.yml28 uses: ./.github/workflows/xcm.yml
modified.github/workflows/codestyle.ymldiffbeforeafterboth
13 steps:13 steps:
14 - name: Clean Workspace14 - name: Clean Workspace
15 uses: AutoModality/action-clean@v1.1.015 uses: AutoModality/action-clean@v1.1.0
16 - uses: actions/checkout@v3.1.016 - uses: actions/checkout@v4.1.7
17 with:17 with:
18 ref: ${{ github.head_ref }} 18 ref: ${{ github.head_ref }}
19 - name: Read .env file19 - name: Read .env file
20 uses: xom9ikk/dotenv@v2 20 uses: xom9ikk/dotenv@v2.3.0
21 - name: Install toolchain version from .env21 - name: Install toolchain version from .env
22 uses: dtolnay/rust-toolchain@master22 uses: dtolnay/rust-toolchain@master
23 with:23 with:
35 steps:35 steps:
36 - name: Clean Workspace36 - name: Clean Workspace
37 uses: AutoModality/action-clean@v1.1.037 uses: AutoModality/action-clean@v1.1.0
38 - uses: actions/checkout@v3.1.038 - uses: actions/checkout@v4.1.7
39 with:39 with:
40 ref: ${{ github.head_ref }} 40 ref: ${{ github.head_ref }}
41 - uses: actions/setup-node@v3.5.141 - uses: actions/setup-node@v4.0.2
42 with:42 with:
43 node-version: 2043 node-version: 20
44 - name: Install modules44 - name: Install modules
50 clippy:50 clippy:
51 runs-on: [ self-hosted-ci ]51 runs-on: [ self-hosted-ci ]
52 steps:52 steps:
53 - name: Clean Workspace
54 uses: AutoModality/action-clean@v1.1.0
53 - uses: actions/checkout@v3.1.055 - uses: actions/checkout@v4.1.7
56 with:
57 ref: ${{ github.head_ref }}
54 - name: Install substrate dependencies58 - name: Install substrate dependencies
55 run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler59 run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler
56 - name: Read .env file60 - name: Read .env file
57 uses: xom9ikk/dotenv@v261 uses: xom9ikk/dotenv@v2.3.0
58 - name: Install toolchain version from .env62 - name: Install toolchain version from .env
59 uses: dtolnay/rust-toolchain@master63 uses: dtolnay/rust-toolchain@master
60 with:64 with:
modified.github/workflows/collator-selection.ymldiffbeforeafterboth
1name: collator-selection-test-run1name: collator-selection
22
3# Controls when the action will run.3# Controls when the action will run.
4on:4on:
28 uses: AutoModality/action-clean@v1.1.025 uses: AutoModality/action-clean@v1.1.0
2926
30 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it27 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31 - uses: actions/checkout@v3.1.028 - uses: actions/checkout@v4.1.7
32 with:29 with:
33 ref: ${{ github.head_ref }} #Checking out head commit30 ref: ${{ github.head_ref }} #Checking out head commit
3431
35 - name: Read .env file32 - name: Read .env file
36 uses: xom9ikk/dotenv@v233 uses: xom9ikk/dotenv@v2.3.0
3734
38 - name: Create Execution matrix35 - name: Create Execution matrix
39 uses: CertainLach/create-matrix-action@v436 uses: CertainLach/create-matrix-action@v4
47
48 needs: prepare-execution-marix44 needs: prepare-execution-marix
49 # The type of runner that the job will run on45 # The type of runner that the job will run on
50 runs-on: [self-hosted-ci,large]46 runs-on: [ self-hosted-ci ]
5147
52 timeout-minutes: 138048 timeout-minutes: 1380
5349
68 uses: AutoModality/action-clean@v1.1.064 uses: AutoModality/action-clean@v1.1.0
6965
70 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it66 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
71 - uses: actions/checkout@v3.1.067 - uses: actions/checkout@v4.1.7
72 with:68 with:
73 ref: ${{ github.head_ref }} #Checking out head commit69 ref: ${{ github.head_ref }} #Checking out head commit
7470
77 uses: ./.github/actions/prepare73 uses: ./.github/actions/prepare
7874
79 - name: Read .env file75 - name: Read .env file
80 uses: xom9ikk/dotenv@v276 uses: xom9ikk/dotenv@v2.3.0
8177
82 - name: Log in to Docker Hub78 - name: Log in to Docker Hub
83 uses: docker/login-action@v2.1.079 uses: docker/login-action@v3.2.0
84 with:80 with:
85 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}81 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
86 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}82 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
8783
88 - name: Run find-and-replace to remove slashes from branch name
89 uses: mad9000/actions-find-and-replace-string@4
90 id: branchname
91 with:
92 source: ${{ github.head_ref }}
93 find: '/'
94 replace: '-'
95
96 - name: Generate ENV related extend Dockerfile file for POLKADOT
97 uses: cuchi/jinja2-action@v1.2.0
98 with:
99 template: .docker/Dockerfile-polkadot.j2
100 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
101 variables: |
102 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
103 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
104
105 - name: Prepare polkadot84 - name: Check and pull polkadot image
106 uses: ./.github/actions/buildContainer
107 id: polkadot85 id: polkadot
86 uses: cloudposse/github-action-docker-image-exists@main
108 with:87 with:
109 container: uniquenetwork/builder-polkadot88 registry: registry.hub.docker.com
110 tag: ${{ matrix.relay_branch }}89 organization: parity
111 context: .docker90 repository: polkadot
112 dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml91 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
113 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}92 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
114 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}93 tag: ${{ matrix.relay_branch }}
115
116 # - name: pull needed images
117 # run: |
118 # docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
119
120 # - name: Build unique-chain
121 # run: |
122 # docker build --file .docker/Dockerfile-unique \
123 # --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \
124 # --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \
125 # --tag uniquenetwork/ci-collator-selection-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }} \
126 # .
127
128 # - name: Push docker image version
129 # run: docker push uniquenetwork/ci-collator-selection-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }}
130
13194
132 - name: Prepare latest95 - name: Prepare latest
137 tag: ${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}100 tag: ${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
138 context: .101 context: .
139 dockerfile: .docker/Dockerfile-unique102 dockerfile: .docker/Dockerfile-unique
140 args: |103 args: |
141 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }},session-test-timings104 --build-arg FEATURES=${{ matrix.network }}-runtime,session-test-timings
142 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
143 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}105 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
144 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}106 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
145107
146 - uses: actions/setup-node@v3.5.1108 - uses: actions/setup-node@v4.0.2
147 with:109 with:
148 node-version: 20110 node-version: 20
149111
150 - name: Install baedeker112 - name: Install baedeker
151 uses: UniqueNetwork/baedeker-action/setup@built113 uses: UniqueNetwork/baedeker-action/setup@v1-no-debug-output
114 with:
115 useCache: false
152116
153 - name: Setup library117 - name: Setup library
154 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library118 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library
155119
156 - name: Start network120 - name: Start network
157 uses: UniqueNetwork/baedeker-action@built121 uses: UniqueNetwork/baedeker-action@v1-no-debug-output
122 if: success()
158 id: bdk123 id: bdk
159 with:124 with:
160 jpath: |125 jpath: |
161 .baedeker/vendor126 .baedeker/vendor
162 tla-str: |127 tla-str: |
163 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local128 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local
164 inputs: |129 inputs: |
165 .baedeker/collator-selection.jsonnet130 .baedeker/collator-selection.jsonnet
166 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}})131 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.image }}:${{ steps.polkadot.outputs.tag }}'}})
167 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}})132 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}})
168133
169 - name: Upload network config134 - name: Upload network config
170 uses: actions/upload-artifact@v3135 uses: actions/upload-artifact@v3
173 path: ${{ steps.bdk.outputs.composeProject }}138 path: ${{ steps.bdk.outputs.composeProject }}
174 retention-days: 2139 retention-days: 2
140
141 - name: Ensure network is alive
142 working-directory: js-packages/tests
143 id: alive1
144 if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
145 run: |
146 yarn
147 yarn add mochawesome
148 ../scripts/wait_for_first_block.sh
149 env:
150 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
175151
176 - name: Run tests152 - name: Run tests
177 working-directory: js-packages/tests153 working-directory: js-packages/tests
154 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
178 run: |155 run: |
179 yarn install156 echo "Ready to start tests"
180 yarn add mochawesome157 NOW=$(date +%s) && yarn testCollators --reporter mochawesome --reporter-options reportFilename=test-collators-${NOW}
181 # Wanted by both wait_for_first_block
182 # export RPC_URL="${RELAY_SAPPHIRE_HTTP_URL:-${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}}"
183 ../scripts/wait_for_first_block.sh
184 echo "Ready to start tests"
185 NOW=$(date +%s) && yarn testCollators --reporter mochawesome --reporter-options reportFilename=test-collators-${NOW}
186 env:158 env:
187 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} 159 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
188160
189 - name: Test Report161 - name: Test Report
190 uses: phoenix-actions/test-reporting@v10162 uses: phoenix-actions/test-reporting@v15
191 id: test-report163 id: test-report
192 if: success() || failure()164 if: success() || failure()
193 with:165 with:
deleted.github/workflows/execution-matrix.ymldiffbeforeafterboth

no changes

modified.github/workflows/forkless-update-data.ymldiffbeforeafterboth
2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586869792/Forkless+update+with+data2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586869792/Forkless+update+with+data
33
4# Triger: only call from main workflow(re-usable workflows)4# Triger: only call from main workflow(re-usable workflows)
5name: forkless-update-data
6
5on:7on:
6 workflow_call:8 workflow_call:
9 workflow_dispatch:
710
811
9# A workflow run is made up of one or more jobs that can run sequentially or in parallel12# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1316
14 name: execution matrix17 name: execution matrix
1518
16 runs-on: self-hosted-ci19 runs-on: [ self-hosted-ci ]
17 outputs:20 outputs:
18 matrix: ${{ steps.create_matrix.outputs.matrix }}21 matrix: ${{ steps.create_matrix.outputs.matrix }}
1922
23 uses: AutoModality/action-clean@v1.1.026 uses: AutoModality/action-clean@v1.1.0
2427
25 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it28 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26 - uses: actions/checkout@v3.1.029 - uses: actions/checkout@v4.1.7
27 with:30 with:
28 ref: ${{ github.head_ref }} #Checking out head commit31 ref: ${{ github.head_ref }} #Checking out head commit
2932
30 - name: Read .env file33 - name: Read .env file
31 uses: xom9ikk/dotenv@v234 uses: xom9ikk/dotenv@v2.3.0
3235
33 - name: Create Execution matrix36 - name: Create Execution matrix
34 uses: CertainLach/create-matrix-action@v437 uses: CertainLach/create-matrix-action@v4
35 id: create_matrix38 id: create_matrix
36 with:39 with:
37 matrix: |40 matrix: |
38 network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, runtime_features {opal-runtime}, wasm_name {opal}, fork_source {${{ env.OPAL_REPLICA_FROM }}}41 network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, fork_source {${{ env.OPAL_REPLICA_FROM }}}
39 network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, runtime_features {quartz-runtime}, wasm_name {quartz}, fork_source {${{ env.QUARTZ_REPLICA_FROM }}}42 network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, fork_source {${{ env.QUARTZ_REPLICA_FROM }}}
40 network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, runtime_features {unique-runtime}, wasm_name {unique}, fork_source {${{ env.UNIQUE_REPLICA_FROM }}}43 network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, fork_source {${{ env.UNIQUE_REPLICA_FROM }}}
4144
42 forkless-data:45 forkless-data:
4346
61 uses: AutoModality/action-clean@v1.1.064 uses: AutoModality/action-clean@v1.1.0
6265
63 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it66 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
64 - uses: actions/checkout@v3.1.067 - uses: actions/checkout@v4.1.7
65 with:68 with:
66 ref: ${{ github.head_ref }} #Checking out head commit69 ref: ${{ github.head_ref }} #Checking out head commit
6770
70 uses: ./.github/actions/prepare73 uses: ./.github/actions/prepare
7174
72 - name: Read .env file75 - name: Read .env file
73 uses: xom9ikk/dotenv@v276 uses: xom9ikk/dotenv@v2.3.0
7477
75 - name: Log in to Docker Hub78 - name: Log in to Docker Hub
76 uses: docker/login-action@v2.1.079 uses: docker/login-action@v3.2.0
77 with:80 with:
78 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}81 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
79 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}82 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
8083
81 - name: Generate ENV related extend Dockerfile file for POLKADOT
82 uses: cuchi/jinja2-action@v1.2.0
83 with:
84 template: .docker/Dockerfile-polkadot.j2
85 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
86 variables: |
87 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
88 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
89
90 - name: Prepare polkadot84 - name: Check and pull polkadot image
91 uses: ./.github/actions/buildContainer
92 id: polkadot85 id: polkadot
86 uses: cloudposse/github-action-docker-image-exists@main
93 with:87 with:
94 container: uniquenetwork/builder-polkadot88 registry: registry.hub.docker.com
95 tag: ${{ matrix.relay_branch }}89 organization: parity
96 context: .docker90 repository: polkadot
97 dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml91 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
98 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}92 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
99 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}93 tag: ${{ matrix.relay_branch }}
10094
101 - name: Prepare latest95 - name: Prepare latest
102 uses: ./.github/actions/buildContainer96 uses: ./.github/actions/buildContainer
106 tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}100 tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
107 context: .101 context: .
108 dockerfile: .docker/Dockerfile-unique102 dockerfile: .docker/Dockerfile-unique
109 args: |103 args: |
110 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}104 --build-arg FEATURES=${{ matrix.network }}-runtime
111 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
112 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}105 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
113 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}106 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
114107
119 image: ${{ steps.latest.outputs.name }}112 image: ${{ steps.latest.outputs.name }}
120 directory: /wasm113 directory: /wasm
121114
122 - uses: actions/setup-node@v3.5.1115 - uses: actions/setup-node@v4.0.2
123 with:116 with:
124 node-version: 20117 node-version: 20
125118
126 - name: Install baedeker119 - name: Install baedeker
127 uses: UniqueNetwork/baedeker-action/setup@built120 uses: UniqueNetwork/baedeker-action/setup@v1-no-debug-output
121 with:
122 useCache: false
128123
129 - name: Setup library124 - name: Setup library
130 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library125 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library
131126
132 - name: Start network127 - name: Start network
133 uses: UniqueNetwork/baedeker-action@built128 uses: UniqueNetwork/baedeker-action@v1-no-debug-output
129 if: success()
134 id: bdk130 id: bdk
135 with:131 with:
136 jpath: |132 jpath: |
139 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local135 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local
140 forked_spec=${{ matrix.network }}136 forked_spec=${{ matrix.network }}
141 fork_source=${{ matrix.fork_source }}137 fork_source=${{ matrix.fork_source }}
142 inputs: |138 inputs: |
143 .baedeker/forkless-data.jsonnet139 .baedeker/forkless-data.jsonnet
144 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}})140 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.image }}:${{ steps.polkadot.outputs.tag }}'}})
145 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}})141 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}})
142
143 - name: Ensure network is alive
144 working-directory: js-packages/tests
145 id: alive1
146 if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
147 run: |
148 yarn
149 ../scripts/wait_for_first_block.sh
150 env:
151 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
146152
147 - name: "Reconcile: runtime is upgraded"153 - name: "Reconcile: runtime is upgraded"
148 working-directory: js-packages/tests154 working-directory: js-packages/tests
155 id: reconcile1
156 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
149 run: |157 run: |
150 yarn158 echo "Executing upgrade"
151 ../scripts/wait_for_first_block.sh
152 echo "Executing upgrade"159 yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ../scripts/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.network }}-runtime/${{ matrix.network }}_runtime.compact.compressed.wasm
153 yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ../scripts/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
154 env:160 env:
155 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}161 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
162
163 - name: Ensure network is alive
164 working-directory: js-packages/tests
165 id: alive2
166 if: ${{ !cancelled() && steps.reconcile1.outcome == 'success' }}
167 run: |
168 yarn
169 ../scripts/wait_for_first_block.sh
170 env:
171 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
156172
157 - name: Run Parallel tests after forkless upgrade173 - name: Run Parallel tests after forkless upgrade
158 working-directory: js-packages/tests174 working-directory: js-packages/tests
175 if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
159 run: |176 run: |
160 yarn 177 echo "Ready to start tests"
161 yarn add mochawesome
162 ../scripts/wait_for_first_block.sh
163 echo "Ready to start tests"178 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
164 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
165 env:179 env:
166 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}180 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
167181
168 - name: Run Sequential tests after forkless upgrade182 - name: Run Sequential tests after forkless upgrade
169 if: success() || failure()
170 working-directory: js-packages/tests183 working-directory: js-packages/tests
184 if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
171 run: |185 run: |
172 yarn186 NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
173 yarn add mochawesome
174 NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
175 env:187 env:
176 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}188 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
177189
modified.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth
2# Forkless update without data replication2# Forkless update without data replication
33
4# Triger: only call from main workflow(re-usable workflows)4# Triger: only call from main workflow(re-usable workflows)
5name: forkless-update-nodata
6
5on:7on:
6 workflow_call:8 workflow_call:
9 workflow_dispatch:
710
811
9# A workflow run is made up of one or more jobs that can run sequentially or in parallel12# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1316
14 name: execution matrix17 name: execution matrix
1518
16 runs-on: self-hosted-ci19 runs-on: [ self-hosted-ci ]
17 outputs:20 outputs:
18 matrix: ${{ steps.create_matrix.outputs.matrix }}21 matrix: ${{ steps.create_matrix.outputs.matrix }}
1922
23 uses: AutoModality/action-clean@v1.1.026 uses: AutoModality/action-clean@v1.1.0
2427
25 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it28 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26 - uses: actions/checkout@v3.1.029 - uses: actions/checkout@v4.1.7
27 with:30 with:
28 ref: ${{ github.head_ref }} #Checking out head commit31 ref: ${{ github.head_ref }} #Checking out head commit
2932
30 - name: Read .env file33 - name: Read .env file
31 uses: xom9ikk/dotenv@v234 uses: xom9ikk/dotenv@v2.3.0
3235
33 - name: Create Execution matrix36 - name: Create Execution matrix
34 uses: CertainLach/create-matrix-action@v437 uses: CertainLach/create-matrix-action@v4
35 id: create_matrix38 id: create_matrix
36 with:39 with:
37 matrix: |40 matrix: |
38 network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, runtime_features {opal-runtime}, wasm_name {opal}41 network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}
39 network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, runtime_features {quartz-runtime}, wasm_name {quartz}42 network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}
40 network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, runtime_features {unique-runtime}, wasm_name {unique}43 network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}
4144
42 forkless-nodata:45 forkless-nodata:
4346
61 uses: AutoModality/action-clean@v1.1.064 uses: AutoModality/action-clean@v1.1.0
6265
63 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it66 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
64 - uses: actions/checkout@v3.1.067 - uses: actions/checkout@v4.1.7
65 with:68 with:
66 ref: ${{ github.head_ref }} #Checking out head commit69 ref: ${{ github.head_ref }} #Checking out head commit
6770
70 uses: ./.github/actions/prepare73 uses: ./.github/actions/prepare
7174
72 - name: Read .env file75 - name: Read .env file
73 uses: xom9ikk/dotenv@v276 uses: xom9ikk/dotenv@v2.3.0
7477
75 - name: Log in to Docker Hub78 - name: Log in to Docker Hub
76 uses: docker/login-action@v2.1.079 uses: docker/login-action@v3.2.0
77 with:80 with:
78 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}81 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
79 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}82 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
8083
81 - name: Generate ENV related extend Dockerfile file for POLKADOT
82 uses: cuchi/jinja2-action@v1.2.0
83 with:
84 template: .docker/Dockerfile-polkadot.j2
85 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
86 variables: |
87 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
88 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
89
90 - name: Prepare polkadot84 - name: Check and pull polkadot image
91 uses: ./.github/actions/buildContainer
92 id: polkadot85 id: polkadot
86 uses: cloudposse/github-action-docker-image-exists@main
93 with:87 with:
94 container: uniquenetwork/builder-polkadot88 registry: registry.hub.docker.com
95 tag: ${{ matrix.relay_branch }}89 organization: parity
96 context: .docker90 repository: polkadot
97 dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml91 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
98 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}92 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
99 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}93 tag: ${{ matrix.relay_branch }}
10094
101 - name: Prepare mainnet95 - name: Prepare mainnet
102 uses: ./.github/actions/buildContainer96 uses: ./.github/actions/buildContainer
106 tag: ${{ matrix.mainnet_branch }}100 tag: ${{ matrix.mainnet_branch }}
107 context: .docker101 context: .docker
108 dockerfile: Dockerfile-unique-release102 dockerfile: Dockerfile-unique-release
109 args: |103 args: |
110 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}104 --build-arg NETWORK=${{ matrix.network }}
111 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}105 --build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}
112 --build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}
113 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}106 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
114 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}107 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
115108
121 tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}114 tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
122 context: .115 context: .
123 dockerfile: .docker/Dockerfile-unique116 dockerfile: .docker/Dockerfile-unique
124 args: |117 args: |
125 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}118 --build-arg FEATURES=${{ matrix.network }}-runtime
126 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
127 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}119 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
128 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}120 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
129121
134 image: ${{ steps.latest.outputs.name }}126 image: ${{ steps.latest.outputs.name }}
135 directory: /wasm127 directory: /wasm
136128
137 - uses: actions/setup-node@v3.5.1129 - uses: actions/setup-node@v4.0.2
138 with:130 with:
139 node-version: 20131 node-version: 20
140132
141 - name: Install baedeker133 - name: Install baedeker
142 uses: UniqueNetwork/baedeker-action/setup@built134 uses: UniqueNetwork/baedeker-action/setup@v1-no-debug-output
135 with:
136 useCache: false
143137
144 - name: Setup library138 - name: Setup library
145 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library139 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library
146140
147 - name: Start network141 - name: Start network
148 uses: UniqueNetwork/baedeker-action@built142 uses: UniqueNetwork/baedeker-action@v1-no-debug-output
149 id: bdk143 id: bdk
144 if: success()
150 with:145 with:
151 jpath: |146 jpath: |
152 .baedeker/vendor147 .baedeker/vendor
153 tla-str: |148 tla-str: |
154 relay_spec=rococo-local149 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local
155 inputs: |150 inputs: |
156 .baedeker/node-only.jsonnet151 .baedeker/node-only.jsonnet
157 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}})152 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.image }}:${{ steps.polkadot.outputs.tag }}'}})
158 # nodata build uses old runtime, but new chain, thus we use mainnet image for spec generation, and then latest image for nodes.153 # nodata build uses old runtime, but new chain, thus we use mainnet image for spec generation, and then latest image for nodes.
159 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, for_chain = false)154 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, for_chain = false)
160 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})155 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})
156
157 - name: Ensure network is alive
158 working-directory: js-packages/tests
159 id: alive1
160 if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
161 run: |
162 yarn
163 yarn add mochawesome
164 ../scripts/wait_for_first_block.sh
165 env:
166 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
161167
162 - name: "Reconcile: runtime is upgraded"168 - name: "Reconcile: runtime is upgraded"
163 working-directory: js-packages/tests169 working-directory: js-packages/tests
170 id: reconcile1
171 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
164 run: |172 run: |
165 yarn173 echo "Executing upgrade"
166 ../scripts/wait_for_first_block.sh
167 echo "Executing upgrade"174 yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ../scripts/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.network }}-runtime/${{ matrix.network }}_runtime.compact.compressed.wasm
168 yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ../scripts/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
169 env:175 env:
170 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}176 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
177
178 - name: Ensure network is alive
179 working-directory: js-packages/tests
180 id: alive2
181 if: ${{ !cancelled() && steps.reconcile1.outcome == 'success' }}
182 run: |
183 ../scripts/wait_for_first_block.sh
184 env:
185 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
171186
172 - name: Run Parallel tests after forkless upgrade187 - name: Run Parallel tests after forkless upgrade
173 working-directory: js-packages/tests188 working-directory: js-packages/tests
189 if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
174 run: |190 run: |
175 yarn add mochawesome191 echo "Ready to start tests"
176 ../scripts/wait_for_first_block.sh
177 echo "Ready to start tests"192 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
178 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
179 env:193 env:
180 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}194 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
181195
182 - name: Run Sequential tests after forkless upgrade196 - name: Run Sequential tests after forkless upgrade
183 if: success() || failure()
184 working-directory: js-packages/tests197 working-directory: js-packages/tests
198 if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
185 run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}199 run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
186 env:200 env:
187 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}201 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
deleted.github/workflows/generate-execution-matrix.ymldiffbeforeafterboth

no changes

modified.github/workflows/governance.ymldiffbeforeafterboth
1# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings1# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings
2name: governance tests2name: governance
33
4# Triger: only call from main workflow(re-usable workflows)4# Triger: only call from main workflow(re-usable workflows)
5on:5on:
6 workflow_call:6 workflow_call:
7 workflow_dispatch:
78
8# A workflow run is made up of one or more jobs that can run sequentially or in parallel9# A workflow run is made up of one or more jobs that can run sequentially or in parallel
9jobs:10jobs:
10 prepare-execution-marix:11 prepare-execution-marix:
11 name: Prepare execution matrix12 name: Prepare execution matrix
1213
13 runs-on: self-hosted-ci14 runs-on: [ self-hosted ]
14 outputs:15 outputs:
15 matrix: ${{ steps.create_matrix.outputs.matrix }}16 matrix: ${{ steps.create_matrix.outputs.matrix }}
1617
19 uses: AutoModality/action-clean@v1.1.020 uses: AutoModality/action-clean@v1.1.0
2021
21 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it22 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22 - uses: actions/checkout@v3.1.023 - uses: actions/checkout@v4.1.7
23 with:24 with:
24 ref: ${{ github.head_ref }} #Checking out head commit25 ref: ${{ github.head_ref }} #Checking out head commit
2526
26 - name: Read .env file27 - name: Read .env file
27 uses: xom9ikk/dotenv@v228 uses: xom9ikk/dotenv@v2.3.0
2829
29 - name: Create Execution matrix30 - name: Create Execution matrix
30 uses: CertainLach/create-matrix-action@v431 uses: CertainLach/create-matrix-action@v4
31 id: create_matrix32 id: create_matrix
32 with:33 with:
33 matrix: |34 matrix: |
34 network {unique}, wasm_name {unique}35 network {unique}
35 network {quartz}, wasm_name {quartz}36 network {quartz}
36 network {opal}, wasm_name {opal}37 network {opal}
3738
38 dev_build_int_tests:39 dev_build_int_tests:
39 needs: prepare-execution-marix40 needs: prepare-execution-marix
53 uses: AutoModality/action-clean@v1.1.054 uses: AutoModality/action-clean@v1.1.0
5455
55 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it56 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
56 - uses: actions/checkout@v3.1.057 - uses: actions/checkout@v4.1.7
57 with:58 with:
58 ref: ${{ github.head_ref }} #Checking out head commit59 ref: ${{ github.head_ref }} #Checking out head commit
5960
60 - name: Read .env file61 - name: Read .env file
61 uses: xom9ikk/dotenv@v262 uses: xom9ikk/dotenv@v2.3.0
6263
63 - name: Generate ENV related extend file for docker-compose64 - name: Generate ENV related extend file for docker-compose
64 uses: cuchi/jinja2-action@v1.2.065 uses: cuchi/jinja2-action@v1.2.0
65 with:66 with:
66 template: .docker/docker-compose.gov.j267 template: .docker/docker-compose.gov.j2
67 output_file: .docker/docker-compose.${{ matrix.network }}.yml68 output_file: .docker/docker-compose.${{ matrix.network }}.yml
68 variables: |69 variables: |
69 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}70 NETWORK=${{ matrix.network }}
70 NETWORK=${{ matrix.network }}
71 WASM_NAME=${{ matrix.wasm_name }}
7271
73 - name: Show build configuration72 - name: Show build configuration
74 run: cat .docker/docker-compose.${{ matrix.network }}.yml73 run: cat .docker/docker-compose.${{ matrix.network }}.yml
7574
76 - name: Build the stack75 - name: Build the stack
77 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans76 run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
7877
79 - uses: actions/setup-node@v3.5.178 - uses: actions/setup-node@v4.0.2
80 with:79 with:
81 node-version: 2080 node-version: 20
8281
92 RPC_URL: http://127.0.0.1:9944/91 RPC_URL: http://127.0.0.1:9944/
9392
94 - name: Test Report93 - name: Test Report
95 uses: phoenix-actions/test-reporting@v1094 uses: phoenix-actions/test-reporting@v15
96 id: test-report95 id: test-report
97 if: success() || failure() # run this step even if previous step failed96 if: success() || failure() # run this step even if previous step failed
98 with:97 with:
107106
108 - name: Stop running containers107 - name: Stop running containers
109 if: always() # run this step always108 if: always() # run this step always
110 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down109 run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down
111110
112 - name: Remove builder cache111 - name: Remove builder cache
113 if: always() # run this step always112 if: always() # run this step always
modified.github/workflows/make-bench.ymldiffbeforeafterboth
17 - name: Clean Workspace17 - name: Clean Workspace
18 uses: AutoModality/action-clean@v1.1.018 uses: AutoModality/action-clean@v1.1.0
1919
20 - uses: actions/checkout@v3.3.020 - uses: actions/checkout@v4.1.7
21 with:21 with:
22 ref: develop 22 ref: develop
2323
24 - name: Read .env file24 - name: Read .env file
25 uses: xom9ikk/dotenv@v2.1.1 25 uses: xom9ikk/dotenv@v2.3.0.3.0
2626
27 - name: Install substrate dependencies27 - name: Install substrate dependencies
28 run: sudo apt install -y curl cmake make libssl-dev pkg-config libclang-dev clang protobuf-compiler28 run: sudo apt install -y curl cmake make libssl-dev pkg-config libclang-dev clang protobuf-compiler
29
30 - name: Install actual toolchain
31 uses: actions-rs/toolchain@v1.0.7
32 with:
33 toolchain: ${{ env.RUST_TOOLCHAIN }}
34 default: true
35 target: wasm32-unknown-unknown
3629
37 - uses: actions/setup-node@v330 - uses: actions/setup-node@v3
38 with:31 with:
deleted.github/workflows/market-test.ymldiffbeforeafterboth

no changes

modified.github/workflows/node-only-update.ymldiffbeforeafterboth
1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837028/Nodes+only+update1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837028/Nodes+only+update
2# Node only update with restart polkadot-launch process.2# Node only update with restart polkadot-launch process.
33
4name: nodes-only update4name: node-only-update
55
6# Triger: only call from main workflow(re-usable workflows)6# Triger: only call from main workflow(re-usable workflows)
7on:7on:
8 workflow_call:8 workflow_call:
9 workflow_dispatch:
910
1011
11# A workflow run is made up of one or more jobs that can run sequentially or in parallel12# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1516
16 name: execution matrix17 name: execution matrix
1718
18 runs-on: self-hosted-ci19 runs-on: [ self-hosted-ci ]
19 outputs:20 outputs:
20 matrix: ${{ steps.create_matrix.outputs.matrix }}21 matrix: ${{ steps.create_matrix.outputs.matrix }}
2122
25 uses: AutoModality/action-clean@v1.1.026 uses: AutoModality/action-clean@v1.1.0
2627
27 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it28 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28 - uses: actions/checkout@v3.1.029 - uses: actions/checkout@v4.1.7
29 with:30 with:
30 ref: ${{ github.head_ref }} #Checking out head commit31 ref: ${{ github.head_ref }} #Checking out head commit
3132
32 - name: Read .env file33 - name: Read .env file
33 uses: xom9ikk/dotenv@v234 uses: xom9ikk/dotenv@v2.3.0
3435
35 - name: Create Execution matrix36 - name: Create Execution matrix
36 uses: CertainLach/create-matrix-action@v437 uses: CertainLach/create-matrix-action@v4
37 id: create_matrix38 id: create_matrix
38 with:39 with:
39 matrix: |40 matrix: |
40 network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, runtime_features {opal-runtime}41 network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}
41 network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, runtime_features {quartz-runtime}42 network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}
42 network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, runtime_features {unique-runtime}43 network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}
4344
44 node-only-update:45 node-only-update:
4546
67 uses: AutoModality/action-clean@v1.1.068 uses: AutoModality/action-clean@v1.1.0
6869
69 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it70 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
70 - uses: actions/checkout@v3.1.071 - uses: actions/checkout@v4.1.7
71 with:72 with:
72 ref: ${{ github.head_ref }} #Checking out head commit73 ref: ${{ github.head_ref }} #Checking out head commit
7374
76 uses: ./.github/actions/prepare77 uses: ./.github/actions/prepare
7778
78 - name: Read .env file79 - name: Read .env file
79 uses: xom9ikk/dotenv@v280 uses: xom9ikk/dotenv@v2.3.0
8081
81 - name: Log in to Docker Hub82 - name: Log in to Docker Hub
82 uses: docker/login-action@v2.1.083 uses: docker/login-action@v3.2.0
83 with:84 with:
84 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}85 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
85 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}86 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
8687
87 - name: Generate ENV related extend Dockerfile file for POLKADOT
88 uses: cuchi/jinja2-action@v1.2.0
89 with:
90 template: .docker/Dockerfile-polkadot.j2
91 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
92 variables: |
93 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
94 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
95
96 - name: Prepare polkadot88 - name: Check and pull polkadot image
97 uses: ./.github/actions/buildContainer
98 id: polkadot89 id: polkadot
90 uses: cloudposse/github-action-docker-image-exists@main
99 with:91 with:
100 container: uniquenetwork/builder-polkadot92 registry: registry.hub.docker.com
101 tag: ${{ matrix.relay_branch }}93 organization: parity
102 context: .docker94 repository: polkadot
103 dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml95 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
104 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}96 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
105 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}97 tag: ${{ matrix.relay_branch }}
10698
107 - name: Prepare mainnet99 - name: Prepare mainnet
108 uses: ./.github/actions/buildContainer100 uses: ./.github/actions/buildContainer
112 tag: ${{ matrix.mainnet_branch }}104 tag: ${{ matrix.mainnet_branch }}
113 context: .docker105 context: .docker
114 dockerfile: Dockerfile-unique-release106 dockerfile: Dockerfile-unique-release
115 args: |107 args: |
116 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}108 --build-arg FEATURES=${{ matrix.network }}-runtime
117 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}109 --build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}
118 --build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}
119 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}110 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
120 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}111 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
121112
127 tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}118 tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
128 context: .119 context: .
129 dockerfile: .docker/Dockerfile-unique120 dockerfile: .docker/Dockerfile-unique
130 args: |121 args: |
131 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}122 --build-arg FEATURES=${{ matrix.network }}-runtime
132 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
133 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}123 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
134 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}124 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
135125
136 - name: Checkout at '${{ matrix.mainnet_branch }}' branch126 - name: Checkout at '${{ matrix.mainnet_branch }}' branch
137 uses: actions/checkout@master127 uses: actions/checkout@v4.1.7
138 with:128 with:
139 #ref: ${{ github.head_ref }}129 #ref: ${{ github.head_ref }}
140 ref: ${{ matrix.mainnet_branch }} #Checking out head commit130 ref: ${{ matrix.mainnet_branch }} #Checking out head commit
141 path: ${{ matrix.mainnet_branch }}131 path: ${{ matrix.mainnet_branch }}
142132
143 - uses: actions/setup-node@v3.5.1133 - uses: actions/setup-node@v4.0.2
144 with:134 with:
145 node-version: 18.17.1 # Update node version to 20 after mainnet will have changes for it135 node-version: 20
146136
147 - name: Install baedeker137 - name: Install baedeker
148 uses: UniqueNetwork/baedeker-action/setup@built138 uses: UniqueNetwork/baedeker-action/setup@v1-no-debug-output
139 with:
140 useCache: false
149141
150 - name: Setup library142 - name: Setup library
151 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library143 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library
152144
153 - name: Start network145 - name: Start network
154 uses: UniqueNetwork/baedeker-action@built146 uses: UniqueNetwork/baedeker-action@v1-no-debug-output
147 if: success()
155 id: bdk148 id: bdk
156 with:149 with:
157 jpath: |150 jpath: |
158 .baedeker/vendor151 .baedeker/vendor
159 tla-str: |152 tla-str: |
160 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local153 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local
161 inputs: |154 inputs: |
162 .baedeker/node-only.jsonnet155 .baedeker/node-only.jsonnet
163 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}})156 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.image }}:${{ steps.polkadot.outputs.tag }}'}})
164 # extra_node_mixin due to mainnet unique node not supporting --increase-future-pool157 ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}, extra_node_mixin={extraArgs: []})
165 ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}, extra_node_mixin={extraArgs: []})158
159 - name: Ensure network is alive
160 working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
161 id: alive1
162 if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
163 run: |
164 yarn
165 yarn add mochawesome
166 ../scripts/wait_for_first_block.sh
167 env:
168 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
166169
167 - name: Run Parallel tests before Node Parachain upgrade170 - name: Run Parallel tests before Node Parachain upgrade
168 working-directory: ${{ matrix.mainnet_branch }}/tests171 working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
169 if: success()172 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
170 run: |173 run: |
171 yarn174 echo "Ready to start tests"
172 yarn add mochawesome
173 # TODO: Update to new script structure after mainnet will have it
174 ./scripts/wait_for_first_block.sh
175 echo "Ready to start tests"175 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
176 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
177 env:176 env:
178 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}177 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
179178
180 - name: Run Sequential tests before Node Parachain upgrade179 - name: Run Sequential tests before Node Parachain upgrade
181 if: success() || failure()180 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
182 working-directory: ${{ matrix.mainnet_branch }}/tests181 working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
183 run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}182 run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
184 env:183 env:
185 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}184 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
186185
187 - name: "Reconcile: only one old node"186 - name: "Reconcile: only one old node"
188 if: success() || failure()187 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
188 id: reconcile1
189 uses: UniqueNetwork/baedeker-action/reconcile@built189 uses: UniqueNetwork/baedeker-action/reconcile@v1-no-debug-output
190 with:190 with:
191 baedeker: ${{ steps.bdk.outputs.baedeker }}191 baedeker: ${{ steps.bdk.outputs.baedeker }}
192 # Chain should always be built with the mainnet spec, this we first set binary for all nodes expect one, then set mainnet binary for the last node, and then force chainspec to be still generated from mainnet192 # Chain should always be built with the mainnet spec, this we first set binary for all nodes expect one, then set mainnet binary for the last node, and then force chainspec to be still generated from mainnet
196 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})196 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})
197197
198 - name: Ensure network is alive198 - name: Ensure network is alive
199 working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
200 id: alive2
199 if: success()201 if: ${{ !cancelled() && steps.reconcile1.outcome == 'success' }}
200 run: |202 run: |
201 ./js-packages/scripts/wait_for_first_block.sh203 ../scripts/wait_for_first_block.sh
202 env:204 env:
203 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}205 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
204206
205 - name: "Reconcile: all nodes are updated"207 - name: "Reconcile: all nodes are updated"
206 if: success() || failure()208 if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
209 id: reconcile2
207 uses: UniqueNetwork/baedeker-action/reconcile@built210 uses: UniqueNetwork/baedeker-action/reconcile@v1-no-debug-output
208 with:211 with:
209 baedeker: ${{ steps.bdk.outputs.baedeker }}212 baedeker: ${{ steps.bdk.outputs.baedeker }}
210 # Chain should always be built with the mainnet spec, this we first set binary for all nodes, and then force chainspec to be still generated from mainnet213 # Chain should always be built with the mainnet spec, this we first set binary for all nodes, and then force chainspec to be still generated from mainnet
211 inputs: |214 inputs: |
212 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, for_chain = false)215 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, for_chain = false)
213 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})216 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})
217
218 - name: Ensure network is alive
219 working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
220 id: alive3
221 if: ${{ !cancelled() && steps.reconcile2.outcome == 'success' }}
222 run: |
223 ../scripts/wait_for_first_block.sh
224 env:
225 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
214226
215 - name: Run Parallel tests after Node Parachain upgrade227 - name: Run Parallel tests after Node Parachain upgrade
216 working-directory: ${{ matrix.mainnet_branch }}/tests228 working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
217 if: success() || failure() # run this step even if previous step failed229 if: ${{ !cancelled() && steps.alive3.outcome == 'success' }}
218 run: |230 run: |
219 yarn install231 echo "Ready to start tests"
220 yarn add mochawesome
221 # TODO: Update to new script structure after mainnet will have it
222 ./scripts/wait_for_first_block.sh
223 echo "Ready to start tests"232 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
224 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
225 env:233 env:
226 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}234 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
227235
228 - name: Run Sequential tests after Node Parachain upgrade236 - name: Run Sequential tests after Node Parachain upgrade
229 if: success() || failure()237 if: ${{ !cancelled() && steps.alive3.outcome == 'success' }}
230 working-directory: ${{ matrix.mainnet_branch }}/tests238 working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
231 run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}239 run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
232 env:240 env:
233 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}241 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
modified.github/workflows/polkadot-types.ymldiffbeforeafterboth
1# Integration test in --dev mode1# Integration test in --dev mode
2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests
3name: Polkadot types3name: polkadot-types
44
5# Triger: only call from main workflow(re-usable workflows)5# Triger: only call from main workflow(re-usable workflows)
6on:6on:
42 uses: AutoModality/action-clean@v1.1.042 uses: AutoModality/action-clean@v1.1.0
4343
44 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it44 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
45 - uses: actions/checkout@v345 - uses: actions/checkout@v4.1.7
46 with:46 with:
47 ref: ${{ github.head_ref }} #Checking out head commit47 ref: ${{ github.head_ref }} #Checking out head commit
4848
49 - name: Read .env file49 - name: Read .env file
50 uses: xom9ikk/dotenv@v250 uses: xom9ikk/dotenv@v2.3.0
5151
52 - name: Generate ENV related extend file for docker-compose52 - name: Generate ENV related extend file for docker-compose
53 uses: cuchi/jinja2-action@v1.2.053 uses: cuchi/jinja2-action@v1.2.0
54 with:54 with:
55 template: .docker/docker-compose.tmp-dev.j255 template: .docker/docker-compose.tmp-dev.j2
56 output_file: .docker/docker-compose.${{ matrix.network }}.yml56 output_file: .docker/docker-compose.${{ matrix.network }}.yml
57 variables: |57 variables: |
58 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}58 NETWORK=${{ matrix.network }}
59 NETWORK=${{ matrix.network }}59
60
61 - name: Show build configuration60 - name: Show build configuration
62 run: cat .docker/docker-compose.${{ matrix.network }}.yml61 run: cat .docker/docker-compose.${{ matrix.network }}.yml
6362
64 - name: Build the stack63 - name: Build the stack
65 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans64 run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
6665
67 - uses: actions/setup-node@v3.5.166 - uses: actions/setup-node@v4.0.2
68 with:67 with:
69 node-version: 2068 node-version: 20
7069
8483
85 - name: Stop running containers84 - name: Stop running containers
86 if: always() # run this step always85 if: always() # run this step always
87 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down86 run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down
8887
89 - name: Remove builder cache88 - name: Remove builder cache
90 if: always() # run this step always89 if: always() # run this step always
modified.github/workflows/schedule-trigger-for-develop-build.ymldiffbeforeafterboth
16 - name: Clean Workspace16 - name: Clean Workspace
17 uses: AutoModality/action-clean@v1.1.017 uses: AutoModality/action-clean@v1.1.0
18 - name: Checkout 🛎18 - name: Checkout 🛎
19 uses: actions/checkout@v3.1.019 uses: actions/checkout@v4.1.7
20 with:20 with:
21 # check out all branches21 # check out all branches
22 fetch-depth: 022 fetch-depth: 0
deleted.github/workflows/testnet-build.ymldiffbeforeafterboth

no changes

modified.github/workflows/try-runtime.ymldiffbeforeafterboth
2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2587656213/Try+runtime2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2587656213/Try+runtime
33
4# Triger: only call from main workflow(re-usable workflows)4# Triger: only call from main workflow(re-usable workflows)
5name: try-runtime
6
5on:7on:
6 workflow_call:8 workflow_call:
9 workflow_dispatch:
710
8# A workflow run is made up of one or more jobs that can run sequentially or in parallel11# A workflow run is made up of one or more jobs that can run sequentially or in parallel
9jobs:12jobs:
10 prepare-execution-marix:13 prepare-execution-marix:
1114
12 name: Prepare execution matrix15 name: Prepare execution matrix
1316
14 runs-on: self-hosted-ci17 runs-on: [ self-hosted-ci ]
15 outputs:18 outputs:
16 matrix: ${{ steps.create_matrix.outputs.matrix }}19 matrix: ${{ steps.create_matrix.outputs.matrix }}
1720
21 uses: AutoModality/action-clean@v1.1.024 uses: AutoModality/action-clean@v1.1.0
2225
23 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it26 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24 - uses: actions/checkout@v3.1.027 - uses: actions/checkout@v4.1.7
25 with:28 with:
26 ref: ${{ github.head_ref }} #Checking out head commit29 ref: ${{ github.head_ref }} #Checking out head commit
2730
28 - name: Read .env file31 - name: Read .env file
29 uses: xom9ikk/dotenv@v232 uses: xom9ikk/dotenv@v2.3.0
3033
31 - name: Create Execution matrix34 - name: Create Execution matrix
32 uses: CertainLach/create-matrix-action@v435 uses: CertainLach/create-matrix-action@v4
33 id: create_matrix36 id: create_matrix
34 with:37 with:
35 matrix: |38 matrix: |
36 network {opal}, wasm_name {opal}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}39 network {opal}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}
37 network {quartz}, wasm_name {quartz}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}40 network {quartz}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}
38 network {unique}, wasm_name {unique}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}41 network {unique}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}
3942
40 try-runtime-build:43 try-runtime-build:
41 needs: prepare-execution-marix44 needs: prepare-execution-marix
55 uses: AutoModality/action-clean@v1.1.058 uses: AutoModality/action-clean@v1.1.0
5659
57 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it60 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
58 - uses: actions/checkout@v3.1.061 - uses: actions/checkout@v4.1.7
59 with:62 with:
60 ref: ${{ github.head_ref }} #Checking out head commit63 ref: ${{ github.head_ref }} #Checking out head commit
6164
64 uses: ./.github/actions/prepare67 uses: ./.github/actions/prepare
6568
66 - name: Read .env file69 - name: Read .env file
67 uses: xom9ikk/dotenv@v270 uses: xom9ikk/dotenv@v2.3.0
6871
69 - name: Log in to Docker Hub72 - name: Log in to Docker Hub
70 uses: docker/login-action@v2.1.073 uses: docker/login-action@v3.2.0
71 with:74 with:
72 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}75 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
73 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}76 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
78 with:81 with:
79 template: .docker/Dockerfile-try-runtime.j282 template: .docker/Dockerfile-try-runtime.j2
80 output_file: .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml83 output_file: .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml
81 variables: |84 variables: |
82 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}85 NETWORK=${{ matrix.network }}
83 NETWORK=${{ matrix.network }}86 REPLICA_FROM=${{ matrix.replica_from_address }}
84 WASM_NAME=${{ matrix.wasm_name }}
85 REPLICA_FROM=${{ matrix.replica_from_address }}
8687
87 - name: Show build Dockerfile88 - name: Show build Dockerfile
88 run: cat .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml89 run: cat .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml
8990
90 - name: Run find-and-replace to remove slashes from branch name91 - name: Run find-and-replace to remove slashes from branch name
91 uses: mad9000/actions-find-and-replace-string@492 uses: mad9000/actions-find-and-replace-string@5
92 id: branchname93 id: branchname
93 with:94 with:
94 source: ${{ github.head_ref }}95 source: ${{ github.head_ref }}
137 uses: AutoModality/action-clean@v1.1.0138 uses: AutoModality/action-clean@v1.1.0
138139
139 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it140 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
140 - uses: actions/checkout@v3.1.0141 - uses: actions/checkout@v4.1.7
141 with:142 with:
142 ref: ${{ github.head_ref }} #Checking out head commit143 ref: ${{ github.head_ref }} #Checking out head commit
143144
150 echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV151 echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV
151152
152 - name: Run find-and-replace to remove slashes from branch name153 - name: Run find-and-replace to remove slashes from branch name
153 uses: mad9000/actions-find-and-replace-string@4154 uses: mad9000/actions-find-and-replace-string@5
154 id: branchname155 id: branchname
155 with:156 with:
156 source: ${{ github.head_ref }}157 source: ${{ github.head_ref }}
157 find: '/'158 find: '/'
158 replace: '-'159 replace: '-'
159160
160 - name: Read .env file161 - name: Read .env file
161 uses: xom9ikk/dotenv@v2162 uses: xom9ikk/dotenv@v2.3.0
162163
163 - name: Generate ENV related extend file for docker-compose164 - name: Generate ENV related extend file for docker-compose
164 uses: cuchi/jinja2-action@v1.2.0165 uses: cuchi/jinja2-action@v1.2.0
172 - name: Show build configuration173 - name: Show build configuration
173 run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml174 run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml
174175
175 - uses: actions/setup-node@v3.5.1176 - uses: actions/setup-node@v4.0.2
176 with:177 with:
177 node-version: 20178 node-version: 20
178179
179 - name: Log in to Docker Hub180 - name: Log in to Docker Hub
180 uses: docker/login-action@v2.1.0181 uses: docker/login-action@v3.2.0
181 with:182 with:
182 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}183 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
183 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}184 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
184185
185 - name: Build the stack186 - name: Build the stack
186 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300187 run: docker compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300
187188
188 - name: Check if docker logs consist logs related to Runtime Upgrade testing.189 - name: Check if docker logs consist logs related to Runtime Upgrade testing.
189 if: success()190 if: success()
243244
244 - name: Stop running containers245 - name: Stop running containers
245 if: always() # run this step always246 if: always() # run this step always
246 run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down247 run: docker compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down
247248
248 - name: Remove builder cache249 - name: Remove builder cache
249 if: always() # run this step always250 if: always() # run this step always
modified.github/workflows/unit-test.ymldiffbeforeafterboth
1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586738699/Unit+Tests1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586738699/Unit+Tests
2# Re-Usable Workflow for lanching Unit tests2# Re-Usable Workflow for lanching Unit tests
3name: unit tests3name: unit-tests
44
5# Controls when the action will run.5# Controls when the action will run.
6# Triger: only call from main workflow(re-usable workflows)6# Triger: only call from main workflow(re-usable workflows)
7on:7on:
8 workflow_call:8 workflow_call:
9 workflow_dispatch:
910
10# A workflow run is made up of one or more jobs that can run sequentially or in parallel11# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11jobs:12jobs:
25 uses: AutoModality/action-clean@v1.1.026 uses: AutoModality/action-clean@v1.1.0
2627
27 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it28 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28 - uses: actions/checkout@v3.1.029 - uses: actions/checkout@v4.1.7
29 with:30 with:
30 ref: ${{ github.head_ref }} #Checking out head commit31 ref: ${{ github.head_ref }} #Checking out head commit
3132
32 - name: Read .env file33 - name: Read .env file
33 uses: xom9ikk/dotenv@v234 uses: xom9ikk/dotenv@v2.3.0
3435
35 - name: Generate ENV related extend file for docker-compose36 - name: Generate ENV related extend file for docker-compose
36 uses: cuchi/jinja2-action@v1.2.037 uses: cuchi/jinja2-action@v1.2.0
37 with:38 with:
38 template: .docker/docker-compose.tmp-unit.j239 template: .docker/docker-compose.tmp-unit.j2
39 output_file: .docker/docker-compose.unit.yml40 output_file: .docker/docker-compose.unit.yml
40 variables: |
41 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
42
4341
44 - name: Show build configuration42 - name: Show build configuration
45 run: cat .docker/docker-compose.unit.yml43 run: cat .docker/docker-compose.unit.yml
4644
47 - name: Build the stack45 - name: Build the stack
48 run: docker-compose -f ".docker/docker-compose.unit.yml" up --build --force-recreate --timeout 300 --remove-orphans --exit-code-from node-dev46 run: docker compose -f ".docker/docker-compose.unit.yml" up --build --force-recreate --timeout 300 --remove-orphans --exit-code-from node-dev
4947
50 - name: Stop running containers48 - name: Stop running containers
51 if: always() # run this step always49 if: always() # run this step always
52 run: docker-compose -f ".docker/docker-compose.unit.yml" down50 run: docker compose -f ".docker/docker-compose.unit.yml" down
53 51
54 - name: Remove builder cache52 - name: Remove builder cache
55 if: always() # run this step always53 if: always() # run this step always
modified.github/workflows/xcm.ymldiffbeforeafterboth
25 uses: AutoModality/action-clean@v1.1.025 uses: AutoModality/action-clean@v1.1.0
2626
27 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it27 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28 - uses: actions/checkout@v3.1.028 - uses: actions/checkout@v4.1.7
29 with:29 with:
30 ref: ${{ github.head_ref }} #Checking out head commit30 ref: ${{ github.head_ref }} #Checking out head commit
3131
32 - name: Read .env file32 - name: Read .env file
33 uses: xom9ikk/dotenv@v233 uses: xom9ikk/dotenv@v2.3.0
3434
35 - name: Create Execution matrix35 - name: Create Execution matrix
36 uses: CertainLach/create-matrix-action@v436 uses: CertainLach/create-matrix-action@v4
37 id: create_matrix37 id: create_matrix
38 with:38 with:
39 matrix: |39 matrix: |
40 network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, polkadex_version {${{ env.POLKADEX_BUILD_BRANCH }}}, hydradx_version {${{ env.HYDRADX_BUILD_BRANCH }}}, runtest {testXcmOpal}, runtime_features {opal-runtime}40 network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, assethub_version {${{ env.WESTMINT_BUILD_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, acala_repository {acala-node}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, runtest {testXcmOpal}
41 network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, astar_version {${{ env.SHIDEN_BUILD_BRANCH }}}, polkadex_version {${{ env.POLKADEX_BUILD_BRANCH }}}, hydradx_version {${{ env.HYDRADX_BUILD_BRANCH }}}, runtest {testFullXcmQuartz}, runtime_features {quartz-runtime}41 network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, assethub_version {${{ env.STATEMINE_BUILD_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, acala_repository {karura-node}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, astar_version {${{ env.SHIDEN_BUILD_BRANCH }}}, runtest {testFullXcmQuartz}
42 network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, polkadex_version {${{ env.POLKADEX_BUILD_BRANCH }}}, hydradx_version {${{ env.HYDRADX_BUILD_BRANCH }}}, runtest {testFullXcmUnique}, runtime_features {unique-runtime}42 network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, assethub_version {${{ env.STATEMINT_BUILD_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, acala_repository {acala-node}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, runtest {testFullXcmUnique}
4343
44 xcm:44 xcm:
45 needs: prepare-execution-marix45 needs: prepare-execution-marix
65 uses: AutoModality/action-clean@v1.1.065 uses: AutoModality/action-clean@v1.1.0
6666
67 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it67 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
68 - uses: actions/checkout@v3.1.068 - uses: actions/checkout@v4.1.7
69 with:69 with:
70 ref: ${{ github.head_ref }} #Checking out head commit70 ref: ${{ github.head_ref }} #Checking out head commit
7171
74 uses: ./.github/actions/prepare74 uses: ./.github/actions/prepare
7575
76 - name: Read .env file76 - name: Read .env file
77 uses: xom9ikk/dotenv@v277 uses: xom9ikk/dotenv@v2.3.0
7878
79 - name: Log in to Docker Hub79 - name: Log in to Docker Hub
80 uses: docker/login-action@v2.1.080 uses: docker/login-action@v3.2.0
81 with:81 with:
82 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}82 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
83 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}83 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
8484
85 # Check POLKADOT version and build it if it doesn't exist in repository
86 - name: Generate ENV related extend Dockerfile file for POLKADOT85 - name: Check and pull polkadot image
86 id: polkadot
87 uses: cuchi/jinja2-action@v1.2.087 uses: cloudposse/github-action-docker-image-exists@main
88 with:88 with:
89 registry: registry.hub.docker.com
90 organization: parity
89 template: .docker/Dockerfile-polkadot.j291 repository: polkadot
92 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
90 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml93 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
91 variables: |94 tag: ${{ matrix.relay_branch }}
92 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}95
93 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
94
95 - name: Check if the dockerhub repository contains the needed version POLKADOT
96 run: |
97 # aquire token
98 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
99 export TOKEN=$TOKEN
100
101 # Get TAGS from DOCKERHUB POLKADOT repository
102 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')
103 # Show TAGS
104 echo "POLKADOT TAGS:"
105 echo $POLKADOT_TAGS
106 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS
107 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.relay_branch }}"($|[[:space:]]) ]]; then
108 echo "Repository has needed POLKADOT version";
109 docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
110 else
111 echo "Repository has not needed POLKADOT version, so build it";
112 cd .docker/ && docker build --file ./Dockerfile-polkadot.${{ matrix.relay_branch }}.yml --tag uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} .
113 echo "Push needed POLKADOT version to the repository";
114 docker push uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
115 fi
116 shell: bash
117
118 # Check ACALA version and build it if it doesn't exist in repository
119 - name: Generate ENV related extend Dockerfile file for ACALA96 - name: Check and pull acala image
97 id: acala
120 uses: cuchi/jinja2-action@v1.2.098 uses: cloudposse/github-action-docker-image-exists@main
121 with:99 with:
100 registry: registry.hub.docker.com
122 template: .docker/Dockerfile-acala.j2101 organization: acala
123 output_file: .docker/Dockerfile-acala.${{ matrix.acala_version }}.yml102 repository: ${{ matrix.acala_repository }}
103 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
104 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
124 variables: |105 tag: ${{ matrix.acala_version }}
125 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}106
126 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}
127
128 - name: Check if the dockerhub repository contains the needed ACALA version
129 run: |
130 # aquire token
131 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
132 export TOKEN=$TOKEN
133
134 # Get TAGS from DOCKERHUB repository
135 ACALA_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-acala/tags/?page_size=100 | jq -r '."results"[]["name"]')
136 # Show TAGS
137 echo "ACALA TAGS:"
138 echo $ACALA_TAGS
139 # Check correct version ACALA and build it if it doesn't exist in ACALA TAGS
140 if [[ ${ACALA_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.acala_version }}"($|[[:space:]]) ]]; then
141 echo "Repository has needed ACALA version";
142 docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }}
143 else
144 echo "Repository has not needed ACALA version, so build it";
145 cd .docker/ && docker build --file ./Dockerfile-acala.${{ matrix.acala_version }}.yml --tag uniquenetwork/builder-acala:${{ matrix.acala_version }} .
146 echo "Push needed ACALA version to the repository";
147 docker push uniquenetwork/builder-acala:${{ matrix.acala_version }}
148 fi
149 shell: bash
150
151 # Check MOONBEAM version and build it if it doesn't exist in repository
152 - name: Generate ENV related extend Dockerfile file for MOONBEAM107 - name: Check and pull MOONBEAM image
108 id: moonbeam
153 uses: cuchi/jinja2-action@v1.2.0109 uses: cloudposse/github-action-docker-image-exists@main
154 with:110 with:
111 registry: registry.hub.docker.com
112 organization: moonbeamfoundation
155 template: .docker/Dockerfile-moonbeam.j2113 repository: moonbeam
114 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
156 output_file: .docker/Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml115 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
157 variables: |116 tag: ${{ matrix.moonbeam_version }}
158 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}117
159 MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}
160
161 - name: Check if the dockerhub repository contains the needed MOONBEAM version
162 run: |
163 # aquire token
164 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
165 export TOKEN=$TOKEN
166
167 # Get TAGS from DOCKERHUB repository
168 MOONBEAM_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-moonbeam/tags/?page_size=100 | jq -r '."results"[]["name"]')
169 # Show TAGS
170 echo "MOONBEAM TAGS:"
171 echo $MOONBEAM_TAGS
172 # Check correct version MOONBEAM and build it if it doesn't exist in MOONBEAM TAGS
173 if [[ ${MOONBEAM_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.moonbeam_version }}"($|[[:space:]]) ]]; then
174 echo "Repository has needed MOONBEAM version";
175 docker pull uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
176 else
177 echo "Repository has not needed MOONBEAM version, so build it";
178 cd .docker/ && docker build --file ./Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml --tag uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} .
179 echo "Push needed MOONBEAM version to the repository";
180 docker push uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
181 fi
182 shell: bash
183
184 # Check CUMULUS version and build it if it doesn't exist in repository
185 - name: Generate ENV related extend Dockerfile file for CUMULUS118 - name: Check and pull ASSETHUB image
119 id: assethub
186 uses: cuchi/jinja2-action@v1.2.0120 uses: cloudposse/github-action-docker-image-exists@main
187 with:121 with:
122 registry: registry.hub.docker.com
123 organization: parity
188 template: .docker/Dockerfile-cumulus.j2124 repository: polkadot-parachain
125 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
189 output_file: .docker/Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml126 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
190 variables: |127 tag: ${{ matrix.assethub_version }}
191 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}128
192 CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}
193
194 - name: Check if the dockerhub repository contains the needed CUMULUS version
195 run: |
196 # aquire token
197 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
198 export TOKEN=$TOKEN
199
200 # Get TAGS from DOCKERHUB repository
201 CUMULUS_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-cumulus/tags/?page_size=100 | jq -r '."results"[]["name"]')
202 # Show TAGS
203 echo "CUMULUS TAGS:"
204 echo $CUMULUS_TAGS
205 # Check correct version CUMULUS and build it if it doesn't exist in CUMULUS TAGS
206 if [[ ${CUMULUS_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.cumulus_version }}"($|[[:space:]]) ]]; then
207 echo "Repository has needed CUMULUS version";
208 docker pull uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
209 else
210 echo "Repository has not needed CUMULUS version, so build it";
211 cd .docker/ && docker build --file ./Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml --tag uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} .
212 echo "Push needed CUMULUS version to the repository";
213 docker push uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
214 fi
215 shell: bash
216
217 # Check ASTAR version and build it if it doesn't exist in repository
218 - name: Generate ENV related extend Dockerfile file for ASTAR129 - name: Check and pull ASTAR image
130 id: astar
219 uses: cuchi/jinja2-action@v1.2.0131 uses: cloudposse/github-action-docker-image-exists@main
220 with:132 with:
133 registry: registry.hub.docker.com
134 organization: staketechnologies
221 template: .docker/Dockerfile-astar.j2135 repository: astar-collator
136 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
222 output_file: .docker/Dockerfile-astar.${{ matrix.astar_version }}.yml137 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
223 variables: |138 tag: ${{ matrix.astar_version }}
224 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
225 ASTAR_BUILD_BRANCH=${{ matrix.astar_version }}
226139
227 - name: Check if the dockerhub repository contains the needed ASTAR version140 - name: Check and pull POLKADEX image
141 id: polkadex
228 run: |142 uses: cloudposse/github-action-docker-image-exists@main
229 # aquire token143 with:
230 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)144 registry: registry.hub.docker.com
231 export TOKEN=$TOKEN145 organization: polkadex
232
233 # Get TAGS from DOCKERHUB repository
234 ASTAR_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-astar/tags/?page_size=100 | jq -r '."results"[]["name"]')
235 # Show TAGS
236 echo "ASTAR TAGS:"
237 echo $ASTAR_TAGS
238 # Check correct version ASTAR and build it if it doesn't exist in ASTAR TAGS
239 if [[ ${ASTAR_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.astar_version }}"($|[[:space:]]) ]]; then
240 echo "Repository has needed ASTAR version";
241 docker pull uniquenetwork/builder-astar:${{ matrix.astar_version }}
242 else
243 echo "Repository has not needed ASTAR version, so build it";
244 cd .docker/ && docker build --file ./Dockerfile-astar.${{ matrix.astar_version }}.yml --tag uniquenetwork/builder-astar:${{ matrix.astar_version }} .
245 echo "Push needed ASTAR version to the repository";
246 docker push uniquenetwork/builder-astar:${{ matrix.astar_version }}
247 fi
248 shell: bash146 repository: mainnet
249147 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
250 # Check POLKADEX version and build it if it doesn't exist in repository148 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
149 tag: ${{ env.POLKADEX_BUILD_BRANCH }}
150
251 - name: Generate ENV related extend Dockerfile file for POLKADEX151 - name: Prepare Hydradx
252 uses: cuchi/jinja2-action@v1.2.0152 uses: ./.github/actions/buildContainer
153 id: hydradx
253 with:154 with:
254 template: .docker/Dockerfile-polkadex.j2155 container: uniquenetwork/builder-hydradx
156 tag: ${{ env.HYDRADX_BUILD_BRANCH }}
157 context: .
255 output_file: .docker/Dockerfile-polkadex.${{ matrix.polkadex_version }}.yml158 dockerfile: .docker/Dockerfile-hydradx
256 variables: |159 args: |
257 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}160 --build-arg HYDRADX_BUILD_BRANCH=${{ env.HYDRADX_BUILD_BRANCH }}
258 POLKADEX_BUILD_BRANCH=${{ matrix.polkadex_version }}161 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
259162 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
260 - name: Check if the dockerhub repository contains the needed POLKADEX version163 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
261 run: |164
262 # aquire token
263 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
264 export TOKEN=$TOKEN
265
266 # Get TAGS from DOCKERHUB repository
267 POLKADEX_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadex/tags/?page_size=100 | jq -r '."results"[]["name"]')
268 # Show TAGS
269 echo "POLKADEX TAGS:"
270 echo $POLKADEX_TAGS
271 # Check correct version POLKADEX and build it if it doesn't exist in POLKADEX TAGS
272 if [[ ${POLKADEX_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.polkadex_version }}"($|[[:space:]]) ]]; then
273 echo "Repository has needed POLKADEX version";
274 docker pull uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }}
275 else
276 echo "Repository has not needed POLKADEX version, so build it";
277 cd .docker/ && docker build --file ./Dockerfile-polkadex.${{ matrix.polkadex_version }}.yml --tag uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }} .
278 echo "Push needed POLKADEX version to the repository";
279 docker push uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }}
280 fi
281 shell: bash
282
283 # Check Hydradx version and build it if it doesn't exist in repository
284 - name: Generate ENV related extend Dockerfile file for Hydradx165 - name: Prepare latest
285 uses: cuchi/jinja2-action@v1.2.0166 uses: ./.github/actions/buildContainer
167 id: latest
286 with:168 with:
169 container: uniquenetwork/ci-xcm-local
287 template: .docker/Dockerfile-hydradx.j2170 tag: ${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
171 context: .
288 output_file: .docker/Dockerfile-hydradx.${{ matrix.hydradx_version }}.yml172 dockerfile: .docker/Dockerfile-unique
289 variables: |173 args: |
290 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}174 --build-arg FEATURES=${{ matrix.network }}-runtime
291 HYDRADX_BUILD_BRANCH=${{ matrix.hydradx_version }}175 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
292176 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
293 - name: Check if the dockerhub repository contains the needed HYDRADX version
294 run: |
295 # aquire token
296 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
297 export TOKEN=$TOKEN
298
299 # Get TAGS from DOCKERHUB repository
300 HYDRADX_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-hydradx/tags/?page_size=100 | jq -r '."results"[]["name"]')
301 # Show TAGS
302 echo "HYDRADX TAGS:"
303 echo $HYDRADX_TAGS
304 # Check correct version HYDRADX and build it if it doesn't exist in HYDRADX TAGS
305 if [[ ${HYDRADX_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.hydradx_version }}"($|[[:space:]]) ]]; then
306 echo "Repository has needed HYDRADX version";
307 docker pull uniquenetwork/builder-hydradx:${{ matrix.hydradx_version }}
308 else
309 echo "Repository has not needed HYDRADX version, so build it";
310 cd .docker/ && docker build --file ./Dockerfile-hydradx.${{ matrix.hydradx_version }}.yml --tag uniquenetwork/builder-hydradx:${{ matrix.hydradx_version }} .
311 echo "Push needed HYDRADX version to the repository";
312 docker push uniquenetwork/builder-hydradx:${{ matrix.hydradx_version }}
313 fi
314 shell: bash
315
316
317 - name: Build unique-chain
318 run: |
319 docker build --file .docker/Dockerfile-unique \
320 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \
321 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \
322 --tag uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} \
323 .
324
325 - name: Push docker image version
326 run: docker push uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
327177
328 - uses: actions/setup-node@v3.5.1178 - uses: actions/setup-node@v4.0.2
329 with:179 with:
330 node-version: 20180 node-version: 20
331181
332 - name: Install baedeker182 - name: Install baedeker
333 uses: UniqueNetwork/baedeker-action/setup@built183 uses: UniqueNetwork/baedeker-action/setup@v1-no-debug-output
184 with:
185 useCache: false
334186
335 - name: Setup library187 - name: Setup library
336 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library188 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library
337189
338 - name: Start network190 - name: Start network
339 uses: UniqueNetwork/baedeker-action@built191 uses: UniqueNetwork/baedeker-action@v1-no-debug-output
340 id: bdk192 id: bdk
341 with:193 with:
342 jpath: |194 jpath: |
343 .baedeker/vendor195 .baedeker/vendor
344 tla-str: |196 tla-str: |
345 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local197 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local
346 inputs: |198 inputs: |
347 .baedeker/xcm-${{ matrix.network }}.jsonnet199 .baedeker/xcm-${{ matrix.network }}.jsonnet
348 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}'}})200 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.image }}:${{ steps.polkadot.outputs.tag }}'}})
349 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}'}})201 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}})
350 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/acala':{dockerImage:'uniquenetwork/builder-acala:${{ matrix.acala_version }}'}})202 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/acala':{dockerImage:'${{ steps.acala.outputs.image }}:${{ steps.acala.outputs.tag }}'}})
351 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/moonbeam':{dockerImage:'uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}'}})203 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/moonbeam':{dockerImage:'${{ steps.moonbeam.outputs.image }}:${{ steps.moonbeam.outputs.tag }}'}})
352 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/cumulus':{dockerImage:'uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}'}})204 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/assethub':{dockerImage:'${{ steps.assethub.outputs.image }}:${{ steps.assethub.outputs.tag }}'}})
353 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/astar':{dockerImage:'uniquenetwork/builder-astar:${{ matrix.astar_version }}'}})205 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/astar':{dockerImage:'${{ steps.astar.outputs.image }}:${{ steps.astar.outputs.tag }}', docker:'/usr/local/bin/astar-collator'}})
354 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadex':{dockerImage:'uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }}'}})206 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadex':{dockerImage:'${{ steps.polkadex.outputs.image }}:${{ steps.polkadex.outputs.tag }}'}})
355 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/hydradx':{dockerImage:'uniquenetwork/builder-hydradx:${{ matrix.hydradx_version }}'}})207 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/hydradx':{dockerImage:'${{ steps.latest.outputs.name }}'}})
356208
357 - name: Upload network config209 - name: Upload network config
358 uses: actions/upload-artifact@v3210 uses: actions/upload-artifact@v3
361 path: ${{ steps.bdk.outputs.composeProject }}213 path: ${{ steps.bdk.outputs.composeProject }}
362 retention-days: 2214 retention-days: 2
363215
364 - name: Yarn install216 - name: Ensure network is alive
365 working-directory: js-packages/tests217 working-directory: js-packages/tests
218 id: alive1
219 if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
366 run: |220 run: |
367 yarn install221 yarn
368 yarn add mochawesome222 yarn add mochawesome
223 ../scripts/wait_for_first_block.sh
224 env:
225 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
369226
370 - name: Call HRMP initialization227 - name: Call HRMP initialization
371 working-directory: js-packages/scripts228 working-directory: js-packages/scripts
229 id: hrmp
230 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
372 run: |231 run: |
373 yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm createHrmp.ts ${{matrix.network}}232 yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm createHrmp.ts ${{matrix.network}}
374233
375 - name: Run XCM tests234 - name: Run XCM tests
376 working-directory: js-packages/tests235 working-directory: js-packages/tests
236 id: tests
237 if: ${{ !cancelled() && steps.hrmp.outcome == 'success' }}
377 run: |238 run: |
378 # Wanted by both wait_for_first_block239 echo "Ready to start tests"
379 export RPC_URL="${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}"
380 ../scripts/wait_for_first_block.sh
381 echo "Ready to start tests"240 NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}
382 NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}241 env:
242 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
383243
384 - name: XCM Test Report244 - name: XCM Test Report
385 uses: phoenix-actions/test-reporting@v10245 uses: phoenix-actions/test-reporting@v15
386 id: test-report246 id: test-report
387 if: success() || failure()247 if: success() || failure()
388 with:248 with:
modified.github/workflows/xnft.ymldiffbeforeafterboth
25 uses: AutoModality/action-clean@v1.1.025 uses: AutoModality/action-clean@v1.1.0
2626
27 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it27 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28 - uses: actions/checkout@v3.1.028 - uses: actions/checkout@v4.1.7
29 with:29 with:
30 ref: ${{ github.head_ref }} #Checking out head commit30 ref: ${{ github.head_ref }} #Checking out head commit
3131
32 - name: Read .env file32 - name: Read .env file
33 uses: xom9ikk/dotenv@v233 uses: xom9ikk/dotenv@v2.3.0
3434
35 - name: Create Execution matrix35 - name: Create Execution matrix
36 uses: CertainLach/create-matrix-action@v436 uses: CertainLach/create-matrix-action@v4
37 id: create_matrix37 id: create_matrix
38 with:38 with:
39 matrix: |39 matrix: |
40 network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, runtest {all-quartz}, runtime_features {quartz-runtime}40 network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, acala_repository {karura-node}, runtest {all-quartz}
4141
42 xnft:42 xnft:
43 needs: prepare-execution-marix43 needs: prepare-execution-marix
60 run: exit 160 run: exit 1
6161
62 - name: Clean Workspace62 - name: Clean Workspace
63 if: always()
63 uses: AutoModality/action-clean@v1.1.064 uses: AutoModality/action-clean@v1.1.0
6465
65 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it66 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
66 - uses: actions/checkout@v3.1.067 - uses: actions/checkout@v4.1.7
67 with:68 with:
68 ref: ${{ github.head_ref }} #Checking out head commit69 ref: ${{ github.head_ref }} #Checking out head commit
6970
72 uses: ./.github/actions/prepare73 uses: ./.github/actions/prepare
7374
74 - name: Read .env file75 - name: Read .env file
75 uses: xom9ikk/dotenv@v276 uses: xom9ikk/dotenv@v2.3.0
7677
77 - name: Log in to Docker Hub78 - name: Log in to Docker Hub
78 uses: docker/login-action@v2.1.079 uses: docker/login-action@v3.2.0
79 with:80 with:
80 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}81 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
81 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}82 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
8283
83 # Check POLKADOT version and build it if it doesn't exist in repository
84 - name: Generate ENV related extend Dockerfile file for POLKADOT84 - name: Check and pull polkadot image
85 id: polkadot
85 uses: cuchi/jinja2-action@v1.2.086 uses: cloudposse/github-action-docker-image-exists@main
86 with:87 with:
88 registry: registry.hub.docker.com
89 organization: parity
87 template: .docker/Dockerfile-polkadot.j290 repository: polkadot
91 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
88 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml92 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
89 variables: |93 tag: ${{ matrix.relay_branch }}
90 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
91 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
9294
93 - name: Check if the dockerhub repository contains the needed version POLKADOT95 - name: Check and pull acala image
96 id: acala
94 run: |97 uses: cloudposse/github-action-docker-image-exists@main
95 # aquire token98 with:
96 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)99 registry: registry.hub.docker.com
97 export TOKEN=$TOKEN100 organization: acala
98101 repository: ${{ matrix.acala_repository }}
99 # Get TAGS from DOCKERHUB POLKADOT repository
100 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')
101 # Show TAGS
102 echo "POLKADOT TAGS:"
103 echo $POLKADOT_TAGS
104 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS
105 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.relay_branch }}"($|[[:space:]]) ]]; then
106 echo "Repository has needed POLKADOT version";
107 docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
108 else
109 echo "Repository has not needed POLKADOT version, so build it";
110 cd .docker/ && docker build --file ./Dockerfile-polkadot.${{ matrix.relay_branch }}.yml --tag uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} .
111 echo "Push needed POLKADOT version to the repository";
112 docker push uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
113 fi
114 shell: bash102 login: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
115103 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
116 # Check ACALA version and build it if it doesn't exist in repository104 tag: ${{ matrix.acala_version }}
105
117 - name: Generate ENV related extend Dockerfile file for ACALA106 - name: Prepare latest
118 uses: cuchi/jinja2-action@v1.2.0107 uses: ./.github/actions/buildContainer
108 id: latest
119 with:109 with:
110 container: uniquenetwork/ci-xnft-local
120 template: .docker/Dockerfile-acala.j2111 tag: ${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
112 context: .
121 output_file: .docker/Dockerfile-acala.${{ matrix.acala_version }}.yml113 dockerfile: .docker/Dockerfile-unique
122 variables: |114 args: |
123 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}115 --build-arg FEATURES=${{ matrix.network }}-runtime
124 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}116 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
125117 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
126 - name: Check if the dockerhub repository contains the needed ACALA version
127 run: |
128 # aquire token
129 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
130 export TOKEN=$TOKEN
131
132 # Get TAGS from DOCKERHUB repository
133 ACALA_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-acala/tags/?page_size=100 | jq -r '."results"[]["name"]')
134 # Show TAGS
135 echo "ACALA TAGS:"
136 echo $ACALA_TAGS
137 # Check correct version ACALA and build it if it doesn't exist in ACALA TAGS
138 if [[ ${ACALA_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.acala_version }}"($|[[:space:]]) ]]; then
139 echo "Repository has needed ACALA version";
140 docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }}
141 else
142 echo "Repository has not needed ACALA version, so build it";
143 cd .docker/ && docker build --file ./Dockerfile-acala.${{ matrix.acala_version }}.yml --tag uniquenetwork/builder-acala:${{ matrix.acala_version }} .
144 echo "Push needed ACALA version to the repository";
145 docker push uniquenetwork/builder-acala:${{ matrix.acala_version }}
146 fi
147 shell: bash
148
149 - name: Build unique-chain
150 run: |
151 docker build --file .docker/Dockerfile-unique \
152 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \
153 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \
154 --tag uniquenetwork/ci-xnft-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} \
155 .
156
157 - name: Push docker image version
158 run: docker push uniquenetwork/ci-xnft-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}
159118
160 - uses: actions/setup-node@v3.5.1119 - uses: actions/setup-node@v4.0.2
161 with:120 with:
162 node-version: 20121 node-version: 20
163122
164 - name: Clone xnft-tests123 - name: Clone xnft-tests
165 run: git clone https://github.com/UniqueNetwork/xnft-tests.git124 run: git clone -b ci https://github.com/UniqueNetwork/xnft-tests.git
166125
167 - name: Install baedeker126 - name: Install baedeker
168 uses: UniqueNetwork/baedeker-action/setup@built127 uses: UniqueNetwork/baedeker-action/setup@v1-no-debug-output
128 with:
129 useCache: false
169130
170 - name: Setup library131 - name: Setup library
171 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library132 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library
172133
173 - name: Start network134 - name: Start network
174 uses: UniqueNetwork/baedeker-action@built135 uses: UniqueNetwork/baedeker-action@v1-no-debug-output
136 if: success()
175 id: bdk137 id: bdk
176 with:138 with:
177 jpath: |139 jpath: |
178 .baedeker/vendor140 .baedeker/vendor
179 tla-str: |141 tla-str: |
180 relay_spec=rococo-local142 relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local
181 inputs: |143 inputs: |
182 xnft-tests/.baedeker/testnets.jsonnet144 xnft-tests/.baedeker/testnets.jsonnet
183 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}'}})145 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.image }}:${{ steps.polkadot.outputs.tag }}'}})
184 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/quartz':{dockerImage:'uniquenetwork/ci-xnft-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}'}})146 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/quartz':{dockerImage:'${{ steps.latest.outputs.name }}'}})
185 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/karura':{dockerImage:'uniquenetwork/builder-acala:${{ matrix.acala_version }}'}})147 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/karura':{dockerImage:'${{ steps.acala.outputs.image }}:${{ steps.acala.outputs.tag }}'}})
148
149 - name: Ensure network is alive
150 working-directory: js-packages/tests
151 id: alive1
152 if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
153 run: |
154 yarn
155 yarn add mochawesome
156 ../scripts/wait_for_first_block.sh
157 env:
158 RPC_URL: ${{ env.RELAY_QUARTZ_HTTP_URL }}
186159
187 - name: Yarn install160 - name: Yarn install
188 working-directory: xnft-tests161 working-directory: xnft-tests
192165
193 - name: Run XNFT Tests166 - name: Run XNFT Tests
194 working-directory: xnft-tests167 working-directory: xnft-tests
168 if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
195 run: |169 run: |
196 NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}170 NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}
171 env:
172 RPC_URL: ${{ env.RELAY_QUARTZ_HTTP_URL }}
197173
198 - name: XNFT Tests Report174 - name: XNFT Tests Report
199 uses: phoenix-actions/test-reporting@v10175 uses: phoenix-actions/test-reporting@v15
200 id: test-report176 id: test-report
201 if: success() || failure()177 if: success() || failure()
202 with:178 with:
205 reporter: mochawesome-json181 reporter: mochawesome-json
206 fail-on-error: 'false'182 fail-on-error: 'false'
207
208 - name: Clean Workspace
209 if: always()
210 uses: AutoModality/action-clean@v1.1.0
211183
212 - name: Remove builder cache184 - name: Remove builder cache
213 if: always()185 if: always()
modified.github/workflows/yarn-dev.ymldiffbeforeafterboth
1# Integration test in --dev mode1# Integration test in --dev mode
2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests
3name: yarn dev3name: yarn-dev
44
5# Triger: only call from main workflow(re-usable workflows)5# Triger: only call from main workflow(re-usable workflows)
6on:6on:
7 workflow_call:7 workflow_call:
88 workflow_dispatch:
9
109
11# A workflow run is made up of one or more jobs that can run sequentially or in parallel10# A workflow run is made up of one or more jobs that can run sequentially or in parallel
33 uses: AutoModality/action-clean@v1.1.031 uses: AutoModality/action-clean@v1.1.0
3432
35 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it33 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
36 - uses: actions/checkout@v3.1.034 - uses: actions/checkout@v4.1.7
37 with:35 with:
38 ref: ${{ github.head_ref }} #Checking out head commit36 ref: ${{ github.head_ref }} #Checking out head commit
3937
40 - name: Read .env file38 - name: Read .env file
41 uses: xom9ikk/dotenv@v239 uses: xom9ikk/dotenv@v2.3.0
4240
43 - name: Generate ENV related extend file for docker-compose41 - name: Generate ENV related extend file for docker-compose
44 uses: cuchi/jinja2-action@v1.2.042 uses: cuchi/jinja2-action@v1.2.0
45 with:43 with:
46 template: .docker/docker-compose.tmp-dev.j244 template: .docker/docker-compose.tmp-dev.j2
47 output_file: .docker/docker-compose.${{ matrix.network }}.yml45 output_file: .docker/docker-compose.${{ matrix.network }}.yml
48 variables: |46 variables: |
49 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}47 NETWORK=${{ matrix.network }}
50 NETWORK=${{ matrix.network }}48
51
52
53 - name: Show build configuration49 - name: Show build configuration
54 run: cat .docker/docker-compose.${{ matrix.network }}.yml50 run: cat .docker/docker-compose.${{ matrix.network }}.yml
5551
56 - name: Build the stack52 - name: Build the stack
57 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans53 run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
5854
59 - uses: actions/setup-node@v3.5.155 - uses: actions/setup-node@v4.0.2
60 with:56 with:
61 node-version: 2057 node-version: 20
6258
72 RPC_URL: http://127.0.0.1:9944/68 RPC_URL: http://127.0.0.1:9944/
7369
74 - name: Test Report70 - name: Test Report
75 uses: phoenix-actions/test-reporting@v1071 uses: phoenix-actions/test-reporting@v15
76 id: test-report72 id: test-report
77 if: success() || failure() # run this step even if previous step failed73 if: success() || failure() # run this step even if previous step failed
78 with:74 with:
9995
100 - name: Stop running containers96 - name: Stop running containers
101 if: always() # run this step always97 if: always() # run this step always
102 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down98 run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down
10399
104 - name: Remove builder cache100 - name: Remove builder cache
105 if: always() # run this step always101 if: always() # run this step always
modifieddoc/demo_milestone1-2.mddiffbeforeafterboth
17The node can be run using docker container:17The node can be run using docker container:
1818
19```19```
20docker-compose up -d20docker compose up -d
21```21```
2222
23#### NFT Tracking Module23#### NFT Tracking Module
addeddoc/how-not-to-break-rpc.mddiffbeforeafterboth

no changes

modifiedjs-packages/scripts/generateEnv.tsdiffbeforeafterboth
41 let env = (await readFile(join(dirname, '../../.env'))).toString();41 let env = (await readFile(join(dirname, '../../.env'))).toString();
42 await Promise.all([42 await Promise.all([
43 // Version from polkadot-fellows43 // Version from polkadot-fellows
44 //ff('wss://rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'POLKADOT_MAINNET_BRANCH', v)),
44 ff('wss://rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'POLKADOT_MAINNET_BRANCH', v)),45 ff('wss://rococo-rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'POLKADOT_MAINNET_BRANCH', v)),
45 // ff('wss://statemint-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINT_BUILD_BRANCH', v)),46 // ff('wss://statemint-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINT_BUILD_BRANCH', v)),
46 ff('wss://acala-rpc-0.aca-api.network/', /^(.)(..)(.)$/, '$1.$2.$3').then(v => env = setVar(env, 'ACALA_BUILD_BRANCH', v)),47 ff('wss://acala-rpc-0.aca-api.network/', /^(.)(..)(.)$/, '$1.$2.$3').then(v => env = setVar(env, 'ACALA_BUILD_BRANCH', v)),
47 ff('wss://wss.api.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONBEAM_BUILD_BRANCH', v)),48 ff('wss://wss.api.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONBEAM_BUILD_BRANCH', v)),
48 ff('wss://ws.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'UNIQUE_MAINNET_BRANCH', fixupUnique(v))),49 ff('wss://ws.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'UNIQUE_MAINNET_BRANCH', fixupUnique(v))),
4950
51 //ff('wss://kusama-rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'KUSAMA_MAINNET_BRANCH', v)),
50 ff('wss://kusama-rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'KUSAMA_MAINNET_BRANCH', v)),52 ff('wss://rococo-rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'KUSAMA_MAINNET_BRANCH', v)),
51 // ff('wss://statemine-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINE_BUILD_BRANCH', v)),53 // ff('wss://statemine-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINE_BUILD_BRANCH', v)),
52 ff('wss://karura-rpc-0.aca-api.network/', /^(.)(..)(.)$/, 'release-karura-$1.$2.$3').then(v => env = setVar(env, 'KARURA_BUILD_BRANCH', v)),54 ff('wss://karura-rpc-0.aca-api.network/', /^(.)(..)(.)$/, 'release-karura-$1.$2.$3').then(v => env = setVar(env, 'KARURA_BUILD_BRANCH', v)),
53 ff('wss://wss.api.moonriver.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONRIVER_BUILD_BRANCH', v)),55 ff('wss://wss.api.moonriver.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONRIVER_BUILD_BRANCH', v)),
54 ff('wss://ws-quartz.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'QUARTZ_MAINNET_BRANCH', fixupUnique(v))),56 ff('wss://ws-quartz.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'QUARTZ_MAINNET_BRANCH', fixupUnique(v))),
5557
56 ff('wss://ws-westend.unique.network/', /^(.)(..)(.)$/, 'release-v0.$1.$2').then(v => env = setVar(env, 'UNIQUEWEST_MAINNET_BRANCH', v)),58 ff('wss://eu-ws-westend.unique.network/', /^(.)(..)(.)$/, 'release-v$1.$2.$3').then(v => env = setVar(env, 'UNIQUEWEST_MAINNET_BRANCH', v)),
57 ff('wss://westmint-rpc.polkadot.io/', /^(.......)$/, 'bad-branch-v$1').then(v => env = setVar(env, 'WESTMINT_BUILD_BRANCH', v)),59 ff('wss://westmint-rpc.polkadot.io/', /^(.......)$/, 'bad-branch-v$1').then(v => env = setVar(env, 'WESTMINT_BUILD_BRANCH', v)),
58 ff('wss://ws-opal.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'OPAL_MAINNET_BRANCH', fixupUnique(v))),60 ff('wss://ws-opal.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'OPAL_MAINNET_BRANCH', fixupUnique(v))),
5961
modifiedjs-packages/scripts/wait_for_first_block.shdiffbeforeafterboth
66
7last_block_id=07last_block_id=0
8block_id=08block_id=0
9counter=0
9function get_block {10function get_block {
10 block_id_hex=$(do_rpc chain_getHeader | jq -r .result.number)11 block_id_hex=$(do_rpc chain_getHeader | jq -r .result.number)
11 block_id=$((block_id_hex))12 block_id=$((block_id_hex))
24function reset_check {25function reset_check {
25 last_block_id=026 last_block_id=0
26 block_id=027 block_id=0
28 counter=0
27}29}
2830
29while ! had_new_block; do31while ! had_new_block ; do
30 echo "Waiting for next block..."32 echo "Waiting for another block..."
33 counter=$((counter+1))
34 echo "counter="$counter
31 sleep 1235 sleep 12
36 if [ $counter -gt 400 ]; then
37 exit 1;
38 fi
32done39done
40
33reset_check41reset_check
3745
38while ! had_new_block; do46while ! had_new_block ; do
39 echo "Waiting for another block..."47 echo "Waiting for another block..."
48 counter=$((counter+1))
49 echo "counter="$counter
40 sleep 1250 sleep 12
51 if [ $counter -gt 400 ]; then
52 exit 1;
53 fi
41done54done
55
4256
deletedkb/how-not-to-break-rpc.mddiffbeforeafterboth

no changes

addedrust-toolchain.tomldiffbeforeafterboth

no changes