Skip to content

Commit

Permalink
deleting variables for separate branches for our chains
Browse files Browse the repository at this point in the history
  • Loading branch information
BuddyGlas committed Nov 22, 2024
1 parent 4e94f1f commit 42055dd
Showing 5 changed files with 41 additions and 36 deletions.
9 changes: 5 additions & 4 deletions .docker/Dockerfile-unique-release
Original file line number Diff line number Diff line change
@@ -4,13 +4,14 @@ FROM "uniquenetwork/services:base-nightly-1.67.0" as builder
WORKDIR /workdir

ARG UNIQUE_VERSION
RUN git clone -b "$UNIQUE_VERSION" --depth 1 https://github.com/uniquenetwork/unique-chain.git

ARG UNIQUE_HASH
ARG FEATURES
RUN --mount=type=cache,target=/cargo-home/registry \

RUN git clone -b "$UNIQUE_VERSION" --depth 1 https://github.com/uniquenetwork/unique-chain.git && \
cd unique-chain && git checkout "$UNIQUE_HASH" && \
--mount=type=cache,target=/cargo-home/registry \
--mount=type=cache,target=/cargo-home/git \
--mount=type=cache,target=/workdir/unique-chain/target \
cd unique-chain && \
CARGO_INCREMENTAL=0 cargo build --release --features="${FEATURES}" --locked && \
mv ./target/release/unique-collator /workdir/unique-chain/ && \
cd target/release/wbuild && find . -name "*.wasm" -exec sh -c 'mkdir -p "../../../wasm/$(dirname {})"; cp {} "../../../wasm/{}"' \;
16 changes: 9 additions & 7 deletions .github/workflows/forkless-update-data.yml
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ jobs:
id: create_matrix
with:
matrix: |
network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, node_branch {${{ env.OPAL_NODE_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, fork_source {${{ env.OPAL_REPLICA_FROM }}}
network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, node_branch {${{ env.QUARTZ_NODE_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, fork_source {${{ env.QUARTZ_REPLICA_FROM }}}
network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, node_branch {${{ env.UNIQUE_NODE_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, fork_source {${{ env.UNIQUE_REPLICA_FROM }}}
network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, fork_source {${{ env.OPAL_REPLICA_FROM }}}
network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, fork_source {${{ env.QUARTZ_REPLICA_FROM }}}
network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, fork_source {${{ env.UNIQUE_REPLICA_FROM }}}
forkless-data:

@@ -97,12 +97,13 @@ jobs:
id: mainnet
with:
container: uniquenetwork/ci-nodata-${{ matrix.network }}
tag: ${{ matrix.network }}-${{ matrix.mainnet_branch }}
tag: ${{ matrix.network }}-${{ env.MAINNET_BRANCH }}-${{ env.MAINNET_HASH}}
context: .docker
dockerfile: Dockerfile-unique-release
args: |
--build-arg NETWORK=${{ matrix.network }}
--build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}
--build-arg UNIQUE_VERSION=${{ env.MAINNET_BRANCH}}
--build-arg UNIQUE_HASH=${{ env.MAINNET_HASH}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

@@ -131,12 +132,13 @@ jobs:
id: node
with:
container: uniquenetwork/ci-data-${{ matrix.network }}
tag: ${{ matrix.network }}-${{ matrix.node_branch }}
tag: ${{ matrix.network }}-${{ env.NODE_BRANCH }}-${{ env.NODE_HASH}}
context: .docker
dockerfile: Dockerfile-unique-release
args: |
--build-arg NETWORK=${{ matrix.network }}
--build-arg UNIQUE_VERSION=${{ matrix.node_branch }}
--build-arg UNIQUE_VERSION=${{ env.NODE_BRANCH}}
--build-arg UNIQUE_HASH=${{ env.NODE_HASH}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

16 changes: 9 additions & 7 deletions .github/workflows/forkless-update-nodata.yml
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ jobs:
id: create_matrix
with:
matrix: |
network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, node_branch {${{ env.OPAL_NODE_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}
network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, node_branch {${{ env.QUARTZ_NODE_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}
network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, node_branch {${{ env.UNIQUE_NODE_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}
network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}
network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}
network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}
forkless-nodata:

@@ -97,12 +97,13 @@ jobs:
id: mainnet
with:
container: uniquenetwork/ci-nodata-${{ matrix.network }}
tag: ${{ matrix.network }}-${{ matrix.mainnet_branch }}
tag: ${{ matrix.network }}-${{ env.MAINNET_BRANCH }}-${{ env.MAINNET_HASH}}
context: .docker
dockerfile: Dockerfile-unique-release
args: |
--build-arg NETWORK=${{ matrix.network }}
--build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}
--build-arg UNIQUE_VERSION=${{ env.MAINNET_BRANCH}}
--build-arg UNIQUE_HASH=${{ env.MAINNET_HASH}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

@@ -131,12 +132,13 @@ jobs:
id: node
with:
container: uniquenetwork/ci-data-${{ matrix.network }}
tag: ${{ matrix.network }}-${{ matrix.node_branch }}
tag: ${{ matrix.network }}-${{ env.NODE_BRANCH }}-${{ env.NODE_HASH}}
context: .docker
dockerfile: Dockerfile-unique-release
args: |
--build-arg NETWORK=${{ matrix.network }}
--build-arg UNIQUE_VERSION=${{ matrix.node_branch }}
--build-arg UNIQUE_VERSION=${{ env.NODE_BRANCH}}
--build-arg UNIQUE_HASH=${{ env.NODE_HASH}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

30 changes: 15 additions & 15 deletions .github/workflows/node-only-update.yml
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ jobs:
id: create_matrix
with:
matrix: |
network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}
network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}
network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}
network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}
network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}
network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}
node-only-update:

@@ -101,12 +101,12 @@ jobs:
id: mainnet
with:
container: uniquenetwork/ci-node-only-${{ matrix.network }}
tag: ${{ matrix.mainnet_branch }}
tag: ${{ matrix.network }}-${{ env.MAINNET_BRANCH }}-${{ env.MAINNET_HASH}}
context: .docker
dockerfile: Dockerfile-unique-release
args: |
--build-arg FEATURES=${{ matrix.network }}-runtime
--build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}
--build-arg UNIQUE_VERSION=${{ env.MAINNET_BRANCH }}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

@@ -123,12 +123,12 @@ jobs:
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

- name: Checkout at '${{ matrix.mainnet_branch }}' branch
- name: Checkout at '${{ env.MAINNET_BRANCH }}' branch
uses: actions/checkout@v4.1.7
with:
#ref: ${{ github.head_ref }}
ref: ${{ matrix.mainnet_branch }} #Checking out head commit
path: ${{ matrix.mainnet_branch }}
ref: ${{ env.MAINNET_BRANCH }} #Checking out head commit
path: ${{ env.MAINNET_BRANCH }}

- uses: actions/setup-node@v4.0.2
with:
@@ -158,7 +158,7 @@ jobs:
ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}, extra_node_mixin={extraArgs: []})
- name: Ensure network is alive
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
working-directory: ${{ env.MAINNET_BRANCH }}/js-packages/tests
id: alive1
if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
run: |
@@ -169,7 +169,7 @@ jobs:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Parallel tests before Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
working-directory: ${{ env.MAINNET_BRANCH }}/js-packages/tests
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
run: |
echo "Ready to start tests"
@@ -179,7 +179,7 @@ jobs:

- name: Run Sequential tests before Node Parachain upgrade
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
working-directory: ${{ env.MAINNET_BRANCH }}/js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
@@ -197,7 +197,7 @@ jobs:
snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})
- name: Ensure network is alive
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
working-directory: ${{ env.MAINNET_BRANCH }}/js-packages/tests
id: alive2
if: ${{ !cancelled() && steps.reconcile1.outcome == 'success' }}
run: |
@@ -217,7 +217,7 @@ jobs:
snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})
- name: Ensure network is alive
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
working-directory: ${{ env.MAINNET_BRANCH }}/js-packages/tests
id: alive3
if: ${{ !cancelled() && steps.reconcile2.outcome == 'success' }}
run: |
@@ -226,7 +226,7 @@ jobs:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Parallel tests after Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
working-directory: ${{ env.MAINNET_BRANCH }}/js-packages/tests
if: ${{ !cancelled() && steps.alive3.outcome == 'success' }}
run: |
echo "Ready to start tests"
@@ -236,7 +236,7 @@ jobs:

- name: Run Sequential tests after Node Parachain upgrade
if: ${{ !cancelled() && steps.alive3.outcome == 'success' }}
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
working-directory: ${{ env.MAINNET_BRANCH }}/js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
6 changes: 3 additions & 3 deletions js-packages/scripts/generateEnv.ts
Original file line number Diff line number Diff line change
@@ -46,18 +46,18 @@ function fixupUnique(version: string): string {
// ff('wss://statemint-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINT_BUILD_BRANCH', v)),
ff('wss://acala-rpc-0.aca-api.network/', /^(.)(..)(.)$/, '$1.$2.$3').then(v => env = setVar(env, 'ACALA_BUILD_BRANCH', v)),
ff('wss://wss.api.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONBEAM_BUILD_BRANCH', v)),
ff('wss://ws.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'UNIQUE_MAINNET_BRANCH', fixupUnique(v))),
ff('wss://ws.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'MAINNET_BRANCH', fixupUnique(v))),

// ff('wss://kusama-rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'KUSAMA_MAINNET_BRANCH', v)),
ff('wss://rococo-rpc.polkadot.io/', /^(.)(...)(...)$/, 'v$1.$2.$3').then(v => env = setVar(env, 'KUSAMA_MAINNET_BRANCH', v)),
// ff('wss://statemine-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINE_BUILD_BRANCH', v)),
ff('wss://karura-rpc-0.aca-api.network/', /^(.)(..)(.)$/, 'release-karura-$1.$2.$3').then(v => env = setVar(env, 'KARURA_BUILD_BRANCH', v)),
ff('wss://wss.api.moonriver.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONRIVER_BUILD_BRANCH', v)),
ff('wss://ws-quartz.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'QUARTZ_MAINNET_BRANCH', fixupUnique(v))),
ff('wss://ws-quartz.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'MAINNET_BRANCH', fixupUnique(v))),

ff('wss://eu-ws-westend.unique.network/', /^(.)(..)(.)$/, 'release-v$1.$2.$3').then(v => env = setVar(env, 'UNIQUEWEST_MAINNET_BRANCH', v)),
ff('wss://westmint-rpc.polkadot.io/', /^(.......)$/, 'bad-branch-v$1').then(v => env = setVar(env, 'WESTMINT_BUILD_BRANCH', v)),
ff('wss://ws-opal.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'OPAL_MAINNET_BRANCH', fixupUnique(v))),
ff('wss://ws-opal.unique.network/', /^(........)$/, 'release-v$1').then(v => env = setVar(env, 'MAINNET_BRANCH', fixupUnique(v))),

ff('wss://rpc.astar.network/', /^(.+)$/, (_, r) => {
switch (r) {

0 comments on commit 42055dd

Please sign in to comment.