Skip to content

Commit

Permalink
Merge pull request #804 from UniqueNetwork/build/merge-040-into-master
Browse files Browse the repository at this point in the history
Merge 040 into master
  • Loading branch information
uandysmith authored Dec 26, 2022
2 parents cde31d3 + f7a3f88 commit 2f34937
Show file tree
Hide file tree
Showing 360 changed files with 34,356 additions and 16,879 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile-try-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ RUN echo "Requested features: ${NETWORK}-runtime\n" && \
echo "Fork from: $REPLICA_FROM\n" && \
cargo build --features=try-runtime,${NETWORK}-runtime --release

CMD cargo run --features=try-runtime,${NETWORK}-runtime --release -- try-runtime -ltry-runtime::cli=debug --no-spec-check-panic on-runtime-upgrade live --uri $REPLICA_FROM
CMD cargo run --release --features ${NETWORK}-runtime,try-runtime -- try-runtime --runtime target/release/wbuild/${NETWORK}-runtime/${NETWORK}_runtime.compact.compressed.wasm -lruntime=debug -ltry-runtime::cli=debug on-runtime-upgrade --checks live --uri $REPLICA_FROM
18 changes: 9 additions & 9 deletions .docker/additional/xcm-rococo/.env
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
RUST_TOOLCHAIN=nightly-2022-07-24
RUST_TOOLCHAIN=nightly-2022-10-09
UNIQUE_BRANCH="develop"

POLKADOT_BUILD_BRANCH=release-v0.9.30
POLKADOT_BUILD_BRANCH=release-v0.9.34

KARURA_BUILD_BRANCH=2.9.1
ACALA_BUILD_BRANCH=2.9.2
KARURA_BUILD_BRANCH=release-karura-2.9.5
ACALA_BUILD_BRANCH=2.9.6

MOONRIVER_BUILD_BRANCH=runtime-1701
MOONBEAM_BUILD_BRANCH=runtime-1701
MOONRIVER_BUILD_BRANCH=v0.26.1
MOONBEAM_BUILD_BRANCH=v0.26.1

STATEMINE_BUILD_BRANCH=parachains-v9270
STATEMINT_BUILD_BRANCH=release-parachains-v9230
WESTMINT_BUILD_BRANCH=parachains-v9270
STATEMINE_BUILD_BRANCH=parachains-v9271
STATEMINT_BUILD_BRANCH=parachains-v9271
WESTMINT_BUILD_BRANCH=parachains-v9290

POLKADOT_LAUNCH_BRANCH="unique-network"
1,972 changes: 0 additions & 1,972 deletions .docker/patch/disable-ic.patch

This file was deleted.

5 changes: 5 additions & 0 deletions .docker/xcm-config/launch-config-xcm-quartz-rococo.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
"id": "2000",
"chain": "karura-dev",
"balance": "1000000000000000000000",
"chainInitializer": [
"chainql",
"-e",
"(import '${spec}') {id+: '-local'}"
],
"nodes": [
{
"wsPort": 9946,
Expand Down
8 changes: 4 additions & 4 deletions .docker/xcm-config/launch-config-xcm-quartz.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@
"chain": "karura-dev",
"balance": "1000000000000000000000",
"chainInitializer": [
"chainql",
"-e",
"(import '${spec}') {id+: '-local'}"
],
"chainql",
"-e",
"(import '${spec}') {id+: '-local'}"
],
"nodes": [
{
"wsPort": 9946,
Expand Down
20 changes: 10 additions & 10 deletions .env
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
RUST_TOOLCHAIN=nightly-2022-07-24
POLKADOT_BUILD_BRANCH=release-v0.9.30
RUST_TOOLCHAIN=nightly-2022-10-09
POLKADOT_BUILD_BRANCH=release-v0.9.34

POLKADOT_MAINNET_BRANCH=release-v0.9.30
STATEMINT_BUILD_BRANCH=release-parachains-v9320
ACALA_BUILD_BRANCH=2.10.1
ACALA_BUILD_BRANCH=2.11.0
MOONBEAM_BUILD_BRANCH=runtime-1901
UNIQUE_MAINNET_BRANCH=v930033-node-only-fix
UNIQUE_MAINNET_BRANCH=release-v930033-fix-gas-price
UNIQUE_REPLICA_FROM=wss://eu-ws.unique.network:443

KUSAMA_MAINNET_BRANCH=release-v0.9.34
STATEMINE_BUILD_BRANCH=release-parachains-v9320
KARURA_BUILD_BRANCH=release-karura-2.10.0
MOONRIVER_BUILD_BRANCH=runtime-1901
QUARTZ_MAINNET_BRANCH=v930033-node-only-fix
KUSAMA_MAINNET_BRANCH=release-v0.9.35
STATEMINE_BUILD_BRANCH=release-parachains-v9330
KARURA_BUILD_BRANCH=release-karura-2.11.0
MOONRIVER_BUILD_BRANCH=runtime-2000
QUARTZ_MAINNET_BRANCH=release-v930034-fix-gas-price
QUARTZ_REPLICA_FROM=wss://eu-ws-quartz.unique.network:443

UNQWND_MAINNET_BRANCH=release-v0.9.30
WESTMINT_BUILD_BRANCH=parachains-v9330
OPAL_MAINNET_BRANCH=v930032-node-only-fix
OPAL_MAINNET_BRANCH=release-v930034-fix-gas-price
OPAL_REPLICA_FROM=wss://eu-ws-opal.unique.network:443

POLKADOT_LAUNCH_BRANCH=unique-network
3 changes: 3 additions & 0 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ jobs:

codestyle:
uses: ./.github/workflows/codestyle.yml

polkadot-types:
uses: ./.github/workflows/polkadot-types.yml
96 changes: 96 additions & 0 deletions .github/workflows/polkadot-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Integration test in --dev mode
# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests
name: Polkadot types

# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# on:
# pull_request:
# branches: [ 'develop' ]
# types: [ opened, reopened, synchronize, ready_for_review, converted_to_draft ]


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

polkadot_generate_types:
# The type of runner that the job will run on
runs-on: [self-hosted-ci,medium]
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.

strategy:
matrix:
include:
- network: "sapphire"
usage: ""
- network: "opal"
usage: ""
- network: "quartz"
usage: ""
- network: "unique"
usage: ""

steps:

- name: Clean Workspace
uses: AutoModality/[email protected]

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} #Checking out head commit

- name: Read .env file
uses: xom9ikk/dotenv@v2

- name: Generate ENV related extend file for docker-compose
uses: cuchi/[email protected]
with:
template: .docker/docker-compose.tmp-dev.j2
output_file: .docker/docker-compose.${{ matrix.network }}.yml
variables: |
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
NETWORK=${{ matrix.network }}
- name: Show build configuration
run: cat .docker/docker-compose.${{ matrix.network }}.yml

- name: Build the stack
run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans

- uses: actions/setup-node@v3
with:
node-version: 16

# - name: Install jq
# run: sudo apt install jq -y

- name: Run generate_types_package script
working-directory: tests
run: |
yarn install
/bin/bash ./scripts/wait_for_first_block.sh
git config --global user.name "Unique"
git config --global user.email [email protected]
/bin/bash ./scripts/generate_types_package.sh --release ${{ matrix.usage }} --push
env:
RPC_URL: http://127.0.0.1:9933/

- name: Stop running containers
if: always() # run this step always
run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down

- name: Remove builder cache
if: always() # run this step always
run: |
docker builder prune -f -a
docker system prune -f
docker image prune -f -a
4 changes: 2 additions & 2 deletions .github/workflows/schedule-trigger-for-develop-build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: schedule-trigger-for-develop-build
on:
# update the branch ci/develop-scheduler every night
schedule:
- cron: '0 1 * * *'
# schedule:
# - cron: '0 1 * * *'
# or update the branch manually
workflow_dispatch:
# pull_request:
Expand Down
1 change: 1 addition & 0 deletions .maintain/scripts/compile_stub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dir=$PWD
tmp=$(mktemp -d)
cd $tmp
cp $dir/$INPUT input.sol
echo "Tmp file: $tmp/input.sol"
solcjs --optimize --bin input.sol -o $PWD

mv input_sol_$(basename $OUTPUT .raw).bin out.bin
Expand Down
1 change: 1 addition & 0 deletions .maintain/scripts/generate_abi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -eu
dir=$PWD

tmp=$(mktemp -d)
echo "Tmp file: $tmp/input.sol"
cd $tmp
cp $dir/$INPUT input.sol
solcjs --abi -p input.sol
Expand Down
2 changes: 1 addition & 1 deletion .maintain/scripts/generate_sol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu
PRETTIER_CONFIG="$(pwd)""/.prettierrc"

tmp=$(mktemp)
cargo test --package $PACKAGE -- $NAME --exact --nocapture --ignored | tee $tmp
cargo test --package=$PACKAGE --features=stubgen -- $NAME --exact --nocapture --ignored | tee $tmp
raw=$(mktemp --suffix .sol)
sed -n '/=== SNIP START ===/, /=== SNIP END ===/{ /=== SNIP START ===/! { /=== SNIP END ===/! p } }' $tmp > $raw

Expand Down
Loading

0 comments on commit 2f34937

Please sign in to comment.