git.delta.rocks / unique-network / refs/commits / 0643ad58bc6c

difftreelog

Removed un-needed artefacts. Added additional build ARGS.

Alexander Aksenov2022-08-04parent: #b5dea1d.patch.diff
in: master

13 files changed

modified.docker/Dockerfile-chain-devdiffbeforeafterboth
1010
11RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none11RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
1212
13ARG RUST_TOOLCHAIN=nightly-2022-04-0713ARG RUST_TOOLCHAIN=nightly-2022-05-11
14ARG BRANCH=develop14ARG POLKA_VERSION=release-v0.9.24
15ARG BRANCH=
15ARG REPO_URL=https://github.com/UniqueNetwork/unique-chain.git16ARG REPO_URL=
16ARG FEATURE=17ARG FEATURE=
1718
18RUN rustup toolchain uninstall $(rustup toolchain list) && \19RUN rustup toolchain uninstall $(rustup toolchain list) && \
2526
26RUN cargo build --release27RUN cargo build --release
2728
28EXPOSE 9844
29EXPOSE 9944
30EXPOSE 9933
31EXPOSE 9833
32EXPOSE 40333
33EXPOSE 30333
34
35CMD cargo run --release $FEATURE -- --dev -linfo --unsafe-ws-external --rpc-cors=all --unsafe-rpc-external29CMD cargo run --release $FEATURE -- --dev -linfo --unsafe-ws-external --rpc-cors=all --unsafe-rpc-external
3630
modified.docker/Dockerfile-parachaindiffbeforeafterboth
1# ===== Rust builder =====1# ===== Rust builder =====
2FROM phusion/baseimage:focal-1.1.0 as rust-builder2FROM ubuntu:20.04 as rust-builder
3LABEL maintainer="Unique.Network"3LABEL maintainer="Unique.Network"
44
5ARG RUST_TOOLCHAIN=nightly-2022-05-115ARG RUST_TOOLCHAIN=nightly-2022-05-11
6#ARG RUST_C=1.62.0-nightly
7ARG POLKA_VERSION=release-v0.9.24
8ARG UNIQUE_BRANCH=develop
96
10#ARG USER=***
11#ARG PASS=***
12
13
14ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN7ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
15#ENV RUST_C $RUST_C
16ENV POLKA_VERSION $POLKA_VERSION
17ENV UNIQUE_BRANCH $UNIQUE_BRANCH
18
19
20#RUN echo $RUST_TOOLCHAIN
21#RUN echo $RUST_C
22#RUN echo $POLKA_VERSION
23#RUN echo $UNIQUE_BRANCH
24
25ENV CARGO_HOME="/cargo-home"8ENV CARGO_HOME="/cargo-home"
26ENV PATH="/cargo-home/bin:$PATH"9ENV PATH="/cargo-home/bin:$PATH"
2710
38 rustup show21 rustup show
39RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN22RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN
4023
41RUN cargo install cargo-chef24RUN pwd && ls -la
4225
43RUN mkdir unique_parachain26RUN mkdir unique_parachain
44WORKDIR /unique_parachain27WORKDIR /unique_parachain
4528
46# ===== Chef =====
47FROM rust-builder as chef
48
49COPY . .
50RUN cargo chef prepare --recipe-path recipe.json
51
52# ===== BUILD ======29# ===== BUILD ======
53FROM rust-builder as builder30FROM rust-builder as builder
5431
32ARG PROFILE=release
33
55RUN mkdir unique_parachain34RUN mkdir unique_parachain
56WORKDIR /unique_parachain35WORKDIR /unique_parachain
5736
58COPY --from=chef /unique_parachain/recipe.json recipe.json
59ARG PROFILE=release
60RUN cargo chef cook "--$PROFILE" --recipe-path recipe.json37RUN pwd && ls -la
61
62COPY . .38COPY . .
63RUN cargo build "--$PROFILE"39RUN cargo build --$PROFILE
64 # && \40 # && \
65 # cargo test41 # cargo test
6642
67# ===== BUILD POLKADOT =====43# ===== BUILD POLKADOT =====
68FROM rust-builder as builder-polkadot44FROM rust-builder as builder-polkadot
6945
46ARG POLKA_VERSION=release-v0.9.24
47ENV POLKA_VERSION $POLKA_VERSION
48
70RUN mkdir unique_parachain49RUN mkdir unique_parachain
71WORKDIR /unique_parachain50WORKDIR /unique_parachain
7251
73RUN git clone -b $POLKA_VERSION --depth 1 https://github.com/paritytech/polkadot.git && \52RUN git clone -b $POLKA_VERSION --depth 1 https://github.com/paritytech/polkadot.git && \
74 cd polkadot && \53 cd polkadot && \
75 git tag -n && \54 cargo build --release
76 cargo build --release
7755
78# ===== RUN ======56# ===== RUN ======
7957
80FROM phusion/baseimage:focal-1.1.058FROM ubuntu:20.04
8159
82ARG PROFILE=release60ARG PROFILE=release
8361
87 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \65 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \
88 export NVM_DIR="$HOME/.nvm" && \66 export NVM_DIR="$HOME/.nvm" && \
89 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \67 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
90 nvm install v15.5.0 && \68 nvm install v16.16.0 && \
91 nvm use v15.5.069 nvm use v16.16.0
9270
93RUN git clone https://github.com/paritytech/polkadot-launch71RUN git clone https://github.com/uniquenetwork/polkadot-launch -b feature/parachain-forking
9472
95RUN export NVM_DIR="$HOME/.nvm" && \73RUN export NVM_DIR="$HOME/.nvm" && \
96 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \74 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
97 cd /polkadot-launch && \75 cd /polkadot-launch && \
98 npm install --global yarn && \76 npm install --global yarn && \
99 yarn77 yarn install
10078
101COPY --from=builder /unique_parachain/target/$PROFILE/unique-collator /unique-chain/target/$PROFILE/79COPY --from=builder /unique_parachain/target/$PROFILE/unique-collator /unique-chain/target/$PROFILE/
102COPY --from=builder-polkadot /unique_parachain/polkadot/target/$PROFILE/polkadot /polkadot/target/$PROFILE/80COPY --from=builder-polkadot /unique_parachain/polkadot/target/$PROFILE/polkadot /polkadot/target/$PROFILE/
103
104EXPOSE 9844
105EXPOSE 9944
106EXPOSE 9933
107EXPOSE 9833
108EXPOSE 40333
109EXPOSE 30333
11081
111CMD export NVM_DIR="$HOME/.nvm" && \82CMD export NVM_DIR="$HOME/.nvm" && \
112 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \83 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
deleted.docker/Dockerfile-parachain-v2diffbeforeafterboth

no changes

modified.docker/docker-compose-dev.yamldiffbeforeafterboth
1version: "3.5"1version: "3.5"
22
3services:3services:
4 node-o:4 node-dev:
5 build:5 build:
6 context: .6 context: .
7 dockerfile: Dockerfile-chain-dev7 dockerfile: Dockerfile-chain-dev
8 image: node-o8 image: node-dev
9 container_name: node-o9 container_name: node-dev
10 expose:10 expose:
11 - 994411 - 9944
12 - 993312 - 9933
deleted.docker/docker-compose-tests-parachain.ymldiffbeforeafterboth

no changes

modified.docker/docker-compose.tmp.j2diffbeforeafterboth
1version: "3.5"1version: "3.5"
22
3services:3services:
4 node-o:4 node-dev:
5 build:5 build:
6 args:6 args:
7 - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"7 - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN:?err }}"
8 - "BRANCH={{ BRANCH }}"8 - "BRANCH={{ BRANCH:?err }}"
9 - "REPO_URL={{ REPO_URL }}"9 - "REPO_URL={{ REPO_URL:?err }}"
10 - "FEATURE={{ FEATURE }}"10 - "FEATURE={{ FEATURE:?err }}"
11 - "POLKA_VERSION={{ POLKA_VERSION:?err }}"
1112
12 command: cargo run --release $FEATURE -- --dev -linfo --unsafe-ws-external --rpc-cors=all --unsafe-rpc-external13 command: cargo run --release $FEATURE -- --dev -linfo --unsafe-ws-external --rpc-cors=all --unsafe-rpc-external
13
1414
modified.dockerignorediffbeforeafterboth
1.git/1.git/
2.github/2.github/
3.docker/
3doc/4doc/
4target/5target/
5tests/6tests/
modified.github/workflows/codestyle.ymldiffbeforeafterboth
6 - develop6 - develop
7 types:7 types:
8 - opened8 - opened
9 - edited9 - reopened
10 - synchronize
1011
11jobs:12jobs:
12 rustfmt:13 rustfmt:
29 runs-on: self-hosted-ci30 runs-on: self-hosted-ci
3031
31 steps:32 steps:
32 - uses: actions/checkout@v133 - uses: actions/checkout@v3
33 - name: Install substrate dependencies34 - name: Install substrate dependencies
34 run: sudo apt-get install libssl-dev pkg-config libclang-dev clang35 run: sudo apt-get install libssl-dev pkg-config libclang-dev clang
35 - name: Install latest nightly36 - name: Install latest nightly
modified.github/workflows/node_build_test.ymldiffbeforeafterboth
1name: Build & test1name: Develop - Build & test
22
3# Controls when the action will run.3# Controls when the action will run.
4on:4on:
5 # Triggers the workflow on push or pull request events but only for the master branch5 # Triggers the workflow on push or pull request events but only for the master branch
6 #push:
7 # branches: [ develop ]
8 pull_request:6 pull_request:
9 branches:7 branches:
10 - develop8 - develop
11 types:9 types:
12 - opened10 - opened
13 - edited11 - reopened
14 - reopened12 - synchronize #commit(s) pushed to the pull request
15 # pull_request:13
16 # branches: [ develop ]
17 # Allows you to run this workflow manually from the Actions tab14 # Allows you to run this workflow manually from the Actions tab
18 workflow_dispatch:15 workflow_dispatch:
1916
20#Define Workflow variables17#Define Workflow variables
21env:18env:
22 ubuntu_version: focal
23 chains_release_dir: /opt/runner/chains_release
24 opal_chain_workdir: ./src_opal_chain
25 quartz_chain_workdir: ./src_quartz_chain
26 unique_chain_workdir: ./src_unique_chain
27 RUST_TOOLCHAIN: nightly-2022-05-1119 RUST_TOOLCHAIN: nightly-2022-05-11
28 REPO_URL: ${{ github.server_url }}/${{ github.repository }}20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}
21 POLKA_VERSION: release-v0.9.24
2922
30# A workflow run is made up of one or more jobs that can run sequentially or in parallel23# A workflow run is made up of one or more jobs that can run sequentially or in parallel
31jobs:24jobs:
32 pre-requisites:
33 # The type of runner that the job will run on
34 runs-on: self-hosted-ci
35
36 steps:
37 #runs ssh connection
38 - name: Install dependencies
39 run: |
40 sudo apt-get install git curl libssl-dev llvm pkg-config libclang-dev clang make cmake
41 sudo apt autoremove
42 curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
43 . $HOME/.cargo/env && cargo install --locked --git https://github.com/chevdor/subwasm
44 rustup toolchain install ${{ env.RUST_TOOLCHAIN }}
45 rustup default ${{ env.RUST_TOOLCHAIN }}
46 rustup target add wasm32-unknown-unknown --toolchain ${{ env.RUST_TOOLCHAIN }}
47
48
49 build:25 build:
53 needs: pre-requisites29 needs: pre-requisites
54 name: Build Container, Spin it Up an test30 name: Build Container, Spin it Up an test
5531
56 continue-on-error: true #Do not stop testing of matrix runs failed.32 continue-on-error: false #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
5733
58 strategy:34 strategy:
59 matrix:35 matrix:
60 include:36 include:
61 - network: "Opal"37 - network: "Opal"
62 features: " "38 features: "--features=opal-runtime"
63 - network: "Quartz"39 - network: "Quartz"
64 features: "--features=quartz-runtime"40 features: "--features=quartz-runtime"
65 - network: "Unique"41 - network: "Unique"
68 steps:44 steps:
69 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it45 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
70 - uses: actions/checkout@v346 - uses: actions/checkout@v3
47 with:
48 ref: ${{ github.event.pull_request.head.sha }} #Checking out head commit
7149
72 - name: Generate ENV related extend file for docker-compose50 - name: Generate ENV related extend file for docker-compose
73 uses: cuchi/jinja2-action@v1.2.051 uses: cuchi/jinja2-action@v1.2.0
74 with:52 with:
75 template: .docker/docker-compose.tmp.j253 template: .docker/docker-compose.tmp.j2
76 output_file: .docker/docker-compose.${{ matrix.network }}.yml54 output_file: .docker/docker-compose.${{ matrix.network }}.yml
77 variables: |55 variables: |
78 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git56 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
79 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}57 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
80 FEATURE=${{ matrix.features }}58 POLKA_VERSION=${{ env.POLKA_VERSION }}
59 FEATURE=${{ matrix.features }}
81 BRANCH=${{ github.head_ref }}60 BRANCH=${{ github.head_ref }}
8261
83 - name: Show temporary file62 - name: Show build configuration
84 run: cat .docker/docker-compose.${{ matrix.network }}.yml63 run: cat .docker/docker-compose.${{ matrix.network }}.yml
8564
86 - name: Build the stack65 - name: Build the stack
87 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build66 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build
88
89# - name: "Build the Docker image with Feature: ${{ env.features }}"
90# run: docker build -t build-${{ github.head_ref }} --file .docker/Dockerfile-chain-dev --build-arg REPO_URL=${{ github.server_url }}/${{ github.repository }}.git --build-arg RUST_TOOLCHAIN=${{ env.actual_toolchain }} --build-arg FEATURE="${{ env.features }}" --build-arg BRANCH=${{ github.head_ref }} --no-cache .
9167
92 - name: Wait68 - name: Wait
93 run: sleep 420s69 run: sleep 420s
9470
95 - name: Install node71 - name: Install node
96 uses: actions/setup-node@v172 uses: actions/setup-node@v1
97 with:73 with:
98 node-version: 14.x74 node-version: 16.x
9975
100 - name: Install dependencies76 - name: Install dependencies
101 run: |77 run: |
deleted.github/workflows/notify.ymldiffbeforeafterboth

no changes

modified.github/workflows/tests_codestyle.ymldiffbeforeafterboth
6 - develop6 - develop
7 types:7 types:
8 - opened8 - opened
9 - edited9 - reopened
10 - synchronize
10jobs:11jobs:
11 build:12 build:
12 runs-on: self-hosted-ci13 runs-on: self-hosted-ci
1314
14 steps:15 steps:
15 - uses: actions/checkout@v216 - uses: actions/checkout@v3
16 - name: Install modules17 - name: Install modules
17 run: cd tests && yarn18 run: cd tests && yarn
18 - name: Run ESLint19 - name: Run ESLint
deletedDockerfile-parachaindiffbeforeafterboth

no changes

deleteddocker-compose-tests-parachain.ymldiffbeforeafterboth

no changes