-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #722 from UniqueNetwork/release-v930032-for-master
Release v930032
- Loading branch information
Showing
497 changed files
with
58,077 additions
and
27,323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install {{ RUST_TOOLCHAIN }} && \ | ||
rustup default {{ RUST_TOOLCHAIN }} && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
# ===== BUILD ACALA ===== | ||
FROM rust-builder as builder-acala-bin | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone -b {{ ACALA_BUILD_BRANCH }} --depth 1 https://github.com/AcalaNetwork/Acala.git && \ | ||
cd Acala && \ | ||
make init && \ | ||
make build-release | ||
|
||
# ===== BIN ====== | ||
|
||
FROM ubuntu:20.04 as builder-acala | ||
|
||
COPY --from=builder-acala-bin /unique_parachain/Acala/target/production/acala /unique_parachain/Acala/target/production/acala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ARG RUST_TOOLCHAIN= | ||
ARG FEATURE= | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
ENV FEATURE=$FEATURE | ||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
|
||
RUN echo "$FEATURE\n" && echo "$RUST_TOOLCHAIN\n" | ||
|
||
RUN apt-get update && apt-get install -y git curl libssl-dev llvm pkg-config libclang-dev clang git make cmake protobuf-compiler | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install $RUST_TOOLCHAIN && \ | ||
rustup default $RUST_TOOLCHAIN && \ | ||
rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN | ||
|
||
RUN mkdir /dev_chain | ||
COPY . /dev_chain | ||
|
||
WORKDIR /dev_chain | ||
|
||
RUN cargo build --release | ||
RUN echo "$FEATURE" | ||
|
||
CMD cargo run --release --features=$FEATURE -- --dev -linfo --unsafe-ws-external --rpc-cors=all --unsafe-rpc-external |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
|
||
RUN apt-get update && apt-get install -y git curl libssl-dev llvm pkg-config libclang-dev clang git make cmake protobuf-compiler | ||
|
||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
ARG RUST_TOOLCHAIN= | ||
ARG FEATURE= | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install $RUST_TOOLCHAIN && \ | ||
rustup default $RUST_TOOLCHAIN && \ | ||
rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN | ||
|
||
RUN mkdir /dev_chain | ||
COPY . /dev_chain | ||
|
||
WORKDIR /dev_chain | ||
|
||
CMD cargo test --features=limit-testing --workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install {{ RUST_TOOLCHAIN }} && \ | ||
rustup default {{ RUST_TOOLCHAIN }} && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
# ===== BUILD CUMULUS ===== | ||
FROM rust-builder as builder-cumulus-bin | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone -b {{ CUMULUS_BUILD_BRANCH }} --depth 1 https://github.com/paritytech/cumulus.git && \ | ||
cd cumulus && \ | ||
cargo build --release | ||
|
||
# ===== BIN ====== | ||
|
||
FROM ubuntu:20.04 as builder-cumulus | ||
|
||
COPY --from=builder-cumulus-bin /unique_parachain/cumulus/target/release/polkadot-parachain /unique_parachain/cumulus/target/release/polkadot-parachain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install {{ RUST_TOOLCHAIN }} && \ | ||
rustup default {{ RUST_TOOLCHAIN }} && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
|
||
# ===== BUILD MOONBEAM ===== | ||
FROM rust-builder as builder-moonbeam-bin | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone -b {{ MOONBEAM_BUILD_BRANCH }} --depth 1 https://github.com/PureStake/moonbeam.git && \ | ||
cd moonbeam && \ | ||
cargo build --release | ||
|
||
# ===== BIN ====== | ||
|
||
FROM ubuntu:20.04 as builder-moonbeam | ||
|
||
COPY --from=builder-moonbeam-bin /unique_parachain/moonbeam/target/release/moonbeam /unique_parachain/moonbeam/target/release/moonbeam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
ARG POLKADOT_BUILD_BRANCH | ||
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot | ||
|
||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ARG RUST_TOOLCHAIN= | ||
|
||
ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN | ||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install $RUST_TOOLCHAIN && \ | ||
rustup default $RUST_TOOLCHAIN && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
|
||
# ===== BUILD current version ====== | ||
FROM rust-builder as builder-unique-current | ||
|
||
ARG PROFILE=release | ||
ARG FEATURE= | ||
ARG MAINNET_BRANCH= | ||
ARG REPO_URL= | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone $REPO_URL -b $MAINNET_BRANCH . && \ | ||
cargo build --features=$FEATURE --$PROFILE | ||
|
||
# ===== BUILD target version ====== | ||
FROM rust-builder as builder-unique-target | ||
|
||
ARG PROFILE=release | ||
ARG FEATURE= | ||
|
||
COPY . /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
RUN cargo build --features=$FEATURE --$PROFILE | ||
|
||
# ===== RUN ====== | ||
|
||
FROM ubuntu:20.04 | ||
|
||
ARG RUNTIME= | ||
ENV RUNTIME $RUNTIME | ||
ARG POLKADOT_BUILD_BRANCH= | ||
ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH | ||
|
||
RUN apt-get -y update && \ | ||
apt-get -y install curl git && \ | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ | ||
export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
nvm install v16.16.0 && \ | ||
nvm use v16.16.0 | ||
|
||
RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network | ||
|
||
RUN export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
npm install --global yarn && \ | ||
yarn install | ||
|
||
RUN echo "$RUNTIME" | ||
RUN echo "$POLKADOT_BUILD_BRANCH" | ||
|
||
COPY --from=builder-unique-current /unique_parachain/target/release/unique-collator /unique-chain/current/release/ | ||
COPY --from=builder-unique-target /unique_parachain/target/release/unique-collator /unique-chain/target/release/ | ||
COPY --from=builder-unique-target /unique_parachain/target/release/wbuild/"$RUNTIME"-runtime/"$RUNTIME"_runtime.compact.compressed.wasm /unique-chain/target/release/wbuild/"$RUNTIME"-runtime/"$RUNTIME"_runtime.compact.compressed.wasm | ||
|
||
COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ | ||
COPY --from=polkadot /unique_parachain/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm /polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm | ||
|
||
CMD export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
yarn start launch-config.json --test-upgrade-parachains -w -n | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install {{ RUST_TOOLCHAIN }} && \ | ||
rustup default {{ RUST_TOOLCHAIN }} && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
# ===== BUILD POLKADOT ===== | ||
FROM rust-builder as builder-polkadot-bin | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone -b {{ POLKADOT_BUILD_BRANCH }} --depth 1 https://github.com/paritytech/polkadot.git && \ | ||
cd polkadot && \ | ||
cargo build --release | ||
|
||
# ===== BIN ====== | ||
|
||
FROM ubuntu:20.04 as builder-polkadot | ||
|
||
COPY --from=builder-polkadot-bin /unique_parachain/polkadot/target/release/polkadot /unique_parachain/polkadot/target/release/polkadot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.