Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CI/test #1073

Merged
merged 15 commits into from
Jul 10, 2024
Merged

CI/test #1073

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .baedeker/collator-selection.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ local
m = import 'baedeker-library/mixin/spec.libsonnet',
;

function(relay_spec)

local relay = {
name: 'relay',
bin: 'bin/polkadot',
validatorIdAssignment: 'staking',
spec: {Genesis:{
chain: 'rococo-local',
chain: relay_spec,
modify:: m.genericRelay($),
}},
nodes: {
[name]: {
bin: $.bin,
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
},
Expand Down
1 change: 1 addition & 0 deletions .baedeker/forkless-data.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ local relay = {
[name]: {
bin: $.bin,
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
},
Expand Down
5 changes: 4 additions & 1 deletion .baedeker/node-only.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ local
m = import 'baedeker-library/mixin/spec.libsonnet',
;

function(relay_spec)

local relay = {
name: 'relay',
bin: 'bin/polkadot',
validatorIdAssignment: 'staking',
spec: {Genesis:{
chain: 'rococo-local',
chain: relay_spec,
modify:: m.genericRelay($),
}},
nodes: {
[name]: {
bin: $.bin,
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
},
Expand Down
7 changes: 4 additions & 3 deletions .baedeker/xcm-opal-async-backing.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ local relay = {
[name]: {
bin: $.bin,
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
},
};

local opal = {
name: 'opal',
local unique = {
name: 'unique',
bin: 'bin/unique',
paraId: 1001,
spec: {Genesis:{
Expand All @@ -66,6 +67,6 @@ local opal = {
relay + {
parachains: {
[para.name]: para,
for para in [opal]
for para in [unique]
},
}
10 changes: 6 additions & 4 deletions .baedeker/xcm-opal.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ local relay = {
[name]: {
bin: $.bin,
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
},
};

local opal = {
name: 'opal',
local unique = {
name: 'unique',
bin: 'bin/unique',
paraId: 1001,
spec: {Genesis:{
Expand All @@ -45,7 +46,7 @@ local opal = {

local westmint = {
name: 'westmint',
bin: 'bin/cumulus',
bin: 'bin/assethub',
paraId: 1002,
spec: {Genesis:{
chain: 'westmint-local',
Expand All @@ -55,6 +56,7 @@ local westmint = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob']
},
Expand All @@ -63,6 +65,6 @@ local westmint = {
relay + {
parachains: {
[para.name]: para,
for para in [opal, westmint]
for para in [unique, westmint]
},
}
10 changes: 6 additions & 4 deletions .baedeker/xcm-quartz.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ local relay = {
[name]: {
bin: $.bin,
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie']
},
};

local quartz = {
name: 'quartz',
local unique = {
name: 'unique',
bin: 'bin/unique',
paraId: 1001,
spec: {Genesis:{
Expand Down Expand Up @@ -89,7 +90,7 @@ local moonriver = {

local statemine = {
name: 'statemine',
bin: 'bin/cumulus',
bin: 'bin/assethub',
paraId: 1004,
spec: {Genesis:{
chain: 'statemine-local',
Expand All @@ -99,6 +100,7 @@ local statemine = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob']
},
Expand All @@ -124,6 +126,6 @@ local shiden = {
relay + {
parachains: {
[para.name]: para,
for para in [quartz, karura, moonriver, statemine, shiden]
for para in [unique, karura, moonriver, statemine, shiden]
},
}
4 changes: 3 additions & 1 deletion .baedeker/xcm-unique.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ local relay = {
[name]: {
bin: $.bin,
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly']
},
Expand Down Expand Up @@ -90,7 +91,7 @@ local moonbeam = {

local statemint = {
name: 'statemint',
bin: 'bin/cumulus',
bin: 'bin/assethub',
paraId: 1004,
spec: {Genesis:{
chain: 'statemint-local',
Expand All @@ -100,6 +101,7 @@ local statemint = {
[name]: {
bin: $.bin,
wantedKeys: 'para-ed',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob']
},
Expand Down
9 changes: 0 additions & 9 deletions .docker/Dockerfile-chain-dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM uniquenetwork/services:latest

ARG RUST_TOOLCHAIN
ARG NETWORK

ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -9,14 +8,6 @@ ENV NETWORK=$NETWORK
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"

RUN echo "$NETWORK\n" && echo "$RUST_TOOLCHAIN\n"

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
rustup default $RUST_TOOLCHAIN && \
rustup component add --toolchain $RUST_TOOLCHAIN rust-src && \
rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN

RUN mkdir /dev_chain
COPY . /dev_chain

Expand Down
7 changes: 0 additions & 7 deletions .docker/Dockerfile-chain-dev-unit
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,8 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"

ARG RUST_TOOLCHAIN
ARG NETWORK

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
rustup default $RUST_TOOLCHAIN && \
rustup component add --toolchain $RUST_TOOLCHAIN rust-src && \
rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN

RUN mkdir /dev_chain
COPY . /dev_chain

Expand Down
64 changes: 0 additions & 64 deletions .docker/Dockerfile-collators.j2

This file was deleted.

30 changes: 17 additions & 13 deletions .docker/Dockerfile-polkadot.j2 → .docker/Dockerfile-hydradx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
FROM ubuntu:22.04 as rust-builder
LABEL maintainer="Unique.Network"

ARG RUST_TOOLCHAIN
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
Expand All @@ -14,33 +15,36 @@ RUN apt-get update && \

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain install {{ RUST_TOOLCHAIN }} && \
rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} && \
rustup default {{ RUST_TOOLCHAIN }} && \
rustup component add --toolchain {{ RUST_TOOLCHAIN }} rust-src && \
RUN rustup toolchain install "${RUST_TOOLCHAIN}" && \
rustup target add wasm32-unknown-unknown --toolchain "${RUST_TOOLCHAIN}" && \
rustup default "${RUST_TOOLCHAIN}" && \
rustup component add --toolchain "${RUST_TOOLCHAIN}" rust-src && \
rustup target list --installed && \
rustup show

RUN mkdir /unique_parachain
WORKDIR /unique_parachain

# ===== BUILD POLKADOT =====
FROM rust-builder as builder-polkadot-bin
# ===== BUILD BIN =====
FROM rust-builder as builder-hydradx-bin

ARG HYDRADX_BUILD_BRANCH

WORKDIR /unique_parachain

RUN git clone -b {{ POLKADOT_BUILD_BRANCH }} --depth 1 https://github.com/paritytech/polkadot.git
RUN git clone --depth 1 -b "${HYDRADX_BUILD_BRANCH}" https://github.com/galacticcouncil/HydraDX-node.git

RUN --mount=type=cache,target=/cargo-home/registry \
--mount=type=cache,target=/cargo-home/git \
--mount=type=cache,target=/unique_parachain/polkadot/target \
cd polkadot && \
--mount=type=cache,target=/unique_parachain/parachain/target \
cd HydraDX-node && \
CARGO_INCREMENTAL=0 cargo build --release --locked && \
mv ./target/release/polkadot /unique_parachain/polkadot/
mkdir /unique_parachain/Hydradx && \
mv ./target/release/hydradx /unique_parachain/Hydradx/hydradx

# ===== BIN ======

FROM ubuntu:22.04 as builder-polkadot
FROM ubuntu:22.04 as builder-hydradx

COPY --from=builder-polkadot-bin /unique_parachain/polkadot/polkadot /bin/polkadot
ENTRYPOINT ["/bin/polkadot"]
COPY --from=builder-hydradx-bin /unique_parachain/Hydradx/hydradx /bin/hydradx
ENTRYPOINT ["/bin/hydradx"]
Loading
Loading