difftreelog
Merge branch 'develop' into CI-43-try-runtime
in: master
10 files changed
.docker/Dockerfile-try-runtimediffbeforeafterboth--- a/.docker/Dockerfile-try-runtime
+++ b/.docker/Dockerfile-try-runtime
@@ -34,17 +34,12 @@
ARG PROFILE=release
ARG FEATURE=
-ARG REPO_URL=
-ARG BRANCH=
ARG FORK_FROM=
+COPY . /unique_parachain
WORKDIR /unique_parachain
RUN echo "Requested features: $FEATURE\n" && \
echo "Fork from: $FORK_FROM\n" && \
- echo "Repositry URL: $REPO_URL\n" && \
- echo "Branch: $BRANCH\n" && \
- git clone $REPO_URL -b $BRANCH . && \
cargo run --features=$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM
-
\ No newline at end of file
.docker/docker-compose.try-runtime.j2diffbeforeafterboth--- a/.docker/docker-compose.try-runtime.j2
+++ b/.docker/docker-compose.try-runtime.j2
@@ -5,8 +5,6 @@
build:
args:
- "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
- - "BRANCH={{ BRANCH }}"
- - "REPO_URL={{ REPO_URL }}"
- "FEATURE={{ FEATURE }}"
- "FORK_FROM={{ FORK_FROM }}"
.github/workflows/build-test-master.ymldiffbeforeafterboth--- a/.github/workflows/build-test-master.yml
+++ b/.github/workflows/build-test-master.yml
@@ -1,4 +1,4 @@
-name: MASTER - Build & Test
+name: Yarn test para
# Controls when the action will run.
on:
@@ -19,15 +19,19 @@
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
master-build-and-test:
# The type of runner that the job will run on
- runs-on: self-hosted-ci
+ runs-on: [self-hosted-ci,large]
+ timeout-minutes: 1380
-
- name: ${{ matrix.network }} - Build and Test
+ name: ${{ matrix.network }}
continue-on-error: true #Do not stop testing of matrix runs failed.
.github/workflows/codestyle.ymldiffbeforeafterboth--- a/.github/workflows/codestyle.yml
+++ b/.github/workflows/codestyle.yml
@@ -10,6 +10,10 @@
- synchronize
- ready_for_review
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
rustfmt:
runs-on: self-hosted-ci
@@ -47,7 +51,7 @@
clippy:
if: ${{ false }}
runs-on: self-hosted-ci
-
+
steps:
- name: Skip if pull request is in Draft
# `if: github.event.pull_request.draft == true` should be kept here, at
.github/workflows/fork-update-withdata.ymldiffbeforeafterboth--- a/.github/workflows/fork-update-withdata.yml
+++ b/.github/workflows/fork-update-withdata.yml
@@ -1,4 +1,4 @@
-name: Fork Parachain update with data
+name: Upgrade replica
# Controls when the action will run.
on:
@@ -19,14 +19,19 @@
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
fork-update-withdata:
# The type of runner that the job will run on
- runs-on: self-hosted-ci
+ runs-on: [self-hosted-ci,large]
+ timeout-minutes: 1380
- name: ${{ matrix.network }} Fork Parachain with data
+ name: ${{ matrix.network }}
continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-nodata.yml
+++ b/.github/workflows/forkless-update-nodata.yml
@@ -1,4 +1,4 @@
-name: Forkless Parachain update with no data
+name: Upgrade nodata
# Controls when the action will run.
on:
@@ -19,6 +19,10 @@
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -29,6 +33,7 @@
runs-on: self-hosted-ci
outputs:
matrix: ${{ steps.create_matrix.outputs.matrix }}
+
steps:
- name: Clean Workspace
@@ -56,9 +61,13 @@
forkless-update-nodata:
needs: prepare-execution-marix
# The type of runner that the job will run on
- runs-on: self-hosted-ci
+ runs-on: [self-hosted-ci,medium]
+
+
- name: ${{ matrix.network }} - Forkless Parachain Upgrade NO data
+ timeout-minutes: 1380
+
+ name: ${{ matrix.network }}
continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
.github/workflows/node_build_test.ymldiffbeforeafterboth1name: Develop - Build & test23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6 pull_request:7 branches:8 - develop9 types:10 - opened11 - reopened12 - synchronize #commit(s) pushed to the pull request13 - ready_for_review1415 # Allows you to run this workflow manually from the Actions tab16 workflow_dispatch:1718#Define Workflow variables19env:20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122# A workflow run is made up of one or more jobs that can run sequentially or in parallel23jobs:24 dev_build_test:25 # The type of runner that the job will run on26 runs-on: self-hosted-ci2728 name: Build Container, Spin it Up an test2930 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.3132 strategy:33 matrix:34 include:35 - network: "Opal"36 features: "opal-runtime"37 - network: "Quartz"38 features: "quartz-runtime"39 - network: "Unique"40 features: "unique-runtime"4142 steps:43 - name: Skip if pull request is in Draft44 # `if: github.event.pull_request.draft == true` should be kept here, at45 # the step level, rather than at the job level. The latter is not46 # recommended because when the PR is moved from "Draft" to "Ready to47 # review" the workflow will immediately be passing (since it was skipped),48 # even though it hasn't actually ran, since it takes a few seconds for49 # the workflow to start. This is also disclosed in:50 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1751 # That scenario would open an opportunity for the check to be bypassed:52 # 1. Get your PR approved53 # 2. Move it to Draft54 # 3. Push whatever commits you want55 # 4. Move it to "Ready for review"; now the workflow is passing (it was56 # skipped) and "Check reviews" is also passing (it won't be updated57 # until the workflow is finished)58 if: github.event.pull_request.draft == true59 run: exit 16061 - name: Clean Workspace62 uses: AutoModality/action-clean@v1.1.06364 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it65 - uses: actions/checkout@v366 with:67 ref: ${{ github.head_ref }} #Checking out head commit6869 - name: Read .env file70 uses: xom9ikk/dotenv@v1.0.27172 - name: Generate ENV related extend file for docker-compose73 uses: cuchi/jinja2-action@v1.2.074 with:75 template: .docker/docker-compose.tmp.j276 output_file: .docker/docker-compose.${{ matrix.network }}.yml77 variables: |78 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git79 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}80 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}81 FEATURE=${{ matrix.features }}82 BRANCH=${{ github.head_ref }}8384 - name: Show build configuration85 run: cat .docker/docker-compose.${{ matrix.network }}.yml8687 - name: Build the stack88 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build8990 - uses: actions/setup-node@v391 with:92 node-version: 169394 - name: Run tests95 run: |96 cd tests97 yarn install98 yarn add mochawesome99 echo "Ready to start tests"100 node scripts/readyness.js101 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}102 env:103 RPC_URL: http://127.0.0.1:9933/104105 - name: Test Report106 uses: phoenix-actions/test-reporting@v8107 id: test-report108 if: success() || failure() # run this step even if previous step failed109 with:110 name: Tests ${{ matrix.network }} # Name of the check run which will be created111 path: tests/mochawesome-report/test-*.json # Path to test results112 reporter: mochawesome-json113 fail-on-error: 'false'114115 - name: Read output variables116 run: |117 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"118119 - name: Stop running containers120 if: always() # run this step always121 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down1name: Yarn test dev23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6 pull_request:7 branches:8 - develop9 types:10 - opened11 - reopened12 - synchronize #commit(s) pushed to the pull request13 - ready_for_review1415 # Allows you to run this workflow manually from the Actions tab16 workflow_dispatch:1718#Define Workflow variables19env:20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency: 23 group: ${{ github.workflow }}-${{ github.ref }}24 cancel-in-progress: true2526# A workflow run is made up of one or more jobs that can run sequentially or in parallel27jobs:28 dev_build_test:29 # The type of runner that the job will run on30 runs-on: [self-hosted-ci,medium]31 timeout-minutes: 13803233 name: ${{ matrix.network }}3435 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.3637 strategy:38 matrix:39 include:40 - network: "Opal"41 features: "opal-runtime"42 - network: "Quartz"43 features: "quartz-runtime"44 - network: "Unique"45 features: "unique-runtime"4647 steps:48 - name: Skip if pull request is in Draft49 # `if: github.event.pull_request.draft == true` should be kept here, at50 # the step level, rather than at the job level. The latter is not51 # recommended because when the PR is moved from "Draft" to "Ready to52 # review" the workflow will immediately be passing (since it was skipped),53 # even though it hasn't actually ran, since it takes a few seconds for54 # the workflow to start. This is also disclosed in:55 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1756 # That scenario would open an opportunity for the check to be bypassed:57 # 1. Get your PR approved58 # 2. Move it to Draft59 # 3. Push whatever commits you want60 # 4. Move it to "Ready for review"; now the workflow is passing (it was61 # skipped) and "Check reviews" is also passing (it won't be updated62 # until the workflow is finished)63 if: github.event.pull_request.draft == true64 run: exit 16566 - name: Clean Workspace67 uses: AutoModality/action-clean@v1.1.06869 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it70 - uses: actions/checkout@v371 with:72 ref: ${{ github.head_ref }} #Checking out head commit7374 - name: Read .env file75 uses: xom9ikk/dotenv@v1.0.27677 - name: Generate ENV related extend file for docker-compose78 uses: cuchi/jinja2-action@v1.2.079 with:80 template: .docker/docker-compose.tmp.j281 output_file: .docker/docker-compose.${{ matrix.network }}.yml82 variables: |83 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git84 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}85 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}86 FEATURE=${{ matrix.features }}87 BRANCH=${{ github.head_ref }}8889 - name: Show build configuration90 run: cat .docker/docker-compose.${{ matrix.network }}.yml9192 - name: Build the stack93 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build9495 - uses: actions/setup-node@v396 with:97 node-version: 169899 - name: Run tests100 run: |101 cd tests102 yarn install103 yarn add mochawesome104 echo "Ready to start tests"105 node scripts/readyness.js106 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}107 env:108 RPC_URL: http://127.0.0.1:9933/109110 - name: Test Report111 uses: phoenix-actions/test-reporting@v8112 id: test-report113 if: success() || failure() # run this step even if previous step failed114 with:115 name: Tests ${{ matrix.network }} # Name of the check run which will be created116 path: tests/mochawesome-report/test-*.json # Path to test results117 reporter: mochawesome-json118 fail-on-error: 'false'119120 - name: Read output variables121 run: |122 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"123124 - name: Stop running containers125 if: always() # run this step always126 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down.github/workflows/tests_codestyle.ymldiffbeforeafterboth--- a/.github/workflows/tests_codestyle.yml
+++ b/.github/workflows/tests_codestyle.yml
@@ -10,6 +10,10 @@
- synchronize
- ready_for_review
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
code_style:
runs-on: self-hosted-ci
.github/workflows/try-runtime.ymldiffbeforeafterboth--- a/.github/workflows/try-runtime.yml
+++ b/.github/workflows/try-runtime.yml
@@ -1,4 +1,4 @@
-name: Try Runtime
+name: try-runtime
# Controls when the action will run.
on:
@@ -19,26 +19,30 @@
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
try-runtime:
# The type of runner that the job will run on
runs-on: self-hosted-ci
-
- name: ${{ matrix.network }} - Try-runtime
+
+ name: ${{ matrix.network }}
continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
strategy:
matrix:
include:
- - network: Opal
+ - network: opal
features: try-runtime,opal-runtime
fork_from_address: wss://eu-ws-opal.unique.network:443
- - network: Quartz
+ - network: quartz
features: try-runtime,quartz-runtime
fork_from_address: wss://eu-ws-quartz.unique.network:443
- - network: Unique
+ - network: unique
features: try-runtime,unique-runtime
fork_from_address: wss://eu-ws.unique.network:443
@@ -79,37 +83,15 @@
template: .docker/docker-compose.try-runtime.j2
output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml
variables: |
- REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
FEATURE=${{ matrix.features }}
- BRANCH=${{ github.head_ref }}
FORK_FROM=${{ matrix.fork_from_address }}
- name: Show build configuration
run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml
-
- name: Build the stack
- run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --build --force-recreate --timeout 300
-
-
- - name: Collect Docker Logs
- if: success() || failure()
- uses: jwalton/gh-docker-logs@v2.2.0
- with:
- dest: './try-runtime-logs.${{ matrix.features }}'
- images: 'try-runtime'
-
- - name: Tar logs
- if: success() || failure()
- run: tar cvzf ./try-runtime-logs.${{ matrix.features }}.tgz ./try-runtime-logs.${{ matrix.features }}
-
- - name: Upload logs to GitHub
- if: success() || failure()
- uses: actions/upload-artifact@master
- with:
- name: try-runtime-logs.${{ matrix.features }}.tgz
- path: ./try-runtime-logs.${{ matrix.features }}.tgz
+ run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --build --force-recreate --timeout 300 --remove-orphans
- name: Stop running containers
if: always() # run this step always
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -266,6 +266,7 @@
[dependencies.opal-runtime]
path = '../../runtime/opal'
+optional = true
[dependencies.up-data-structs]
path = "../../primitives/data-structs"
@@ -320,11 +321,15 @@
rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
[features]
-default = []
+default = ["opal-runtime"]
runtime-benchmarks = [
'unique-runtime?/runtime-benchmarks',
'quartz-runtime?/runtime-benchmarks',
'opal-runtime/runtime-benchmarks',
'polkadot-service/runtime-benchmarks',
]
-try-runtime = []
+try-runtime = [
+ 'unique-runtime?/try-runtime',
+ 'quartz-runtime?/try-runtime',
+ 'opal-runtime?/try-runtime',
+]