Files
pezkuwi-subxt/.github/workflows/srtool.yml
T
Branislav Kontur 445f9277ab Added new empty shell runtime for BridgeHubPolkadot (without bridging stuff) for onboarding parachain on Polkadot (#2137)
* Added new empty shell runtime for `BridgeHubPolkadot` (without bridging stuff) for onboarding parachain on Polkadot

* Fix benchmarks/try-runtime

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs frame_system

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_balances

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_multisig

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_xcm

* Fixes

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_session

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_utility

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_timestamp

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_collator_selection

* ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs cumulus_pallet_xcmp_queue

* PR fixes

* Rebase fix

* Fix new runtime api

* ".git/.scripts/commands/bench/bench.sh" xcm bridge-hub-polkadot bridge-hubs pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench/bench.sh" xcm bridge-hub-polkadot bridge-hubs pallet_xcm_benchmarks::generic

* Updated aura/bootNodes in `create_bridge_hub_polkadot_spec.sh`

---------

Co-authored-by: command-bot <>
2023-02-02 10:35:11 +00:00

123 lines
4.2 KiB
YAML

name: Srtool build
env:
SUBWASM_VERSION: 0.17.0
on:
push:
tags:
- "*"
# paths-ignore:
# - "docker"
# - "docs"
# - "scripts"
# - "test"
# - "client"
paths:
- parachains/runtimes/**/*
branches:
- "release*"
schedule:
- cron: "00 02 * * 1" # 2AM weekly on monday
workflow_dispatch:
jobs:
srtool:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- category: assets
runtime: statemine
- category: assets
runtime: statemint
- category: assets
runtime: westmint
- category: bridge-hubs
runtime: bridge-hub-polkadot
- category: bridge-hubs
runtime: bridge-hub-kusama
- category: bridge-hubs
runtime: bridge-hub-rococo
- category: collectives
runtime: collectives-polkadot
- category: contracts
runtime: contracts-rococo
- category: starters
runtime: seedling
- category: starters
runtime: shell
- category: testing
runtime: rococo-parachain
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
fetch-depth: 0
- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.6.0
with:
chain: ${{ matrix.runtime }}
runtime_dir: parachains/runtimes/${{ matrix.category }}/${{ matrix.runtime }}
- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime }}-srtool-digest.json
cat ${{ matrix.runtime }}-srtool-digest.json
echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}"
echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}"
# it takes a while to build the runtime, so let's save the artifact as soon as we have it
- name: Archive Artifacts for ${{ matrix.runtime }}
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: ${{ matrix.runtime }}-runtime
path: |
${{ steps.srtool_build.outputs.wasm }}
${{ steps.srtool_build.outputs.wasm_compressed }}
${{ matrix.runtime }}-srtool-digest.json
# We now get extra information thanks to subwasm
- name: Install subwasm
run: |
wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
subwasm --version
- name: Show Runtime information
shell: bash
run: |
subwasm info ${{ steps.srtool_build.outputs.wasm }}
subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }}
subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime }}-info.json
subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.runtime }}-compressed-info.json
- name: Extract the metadata
shell: bash
run: |
subwasm meta ${{ steps.srtool_build.outputs.wasm }}
subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime }}-metadata.json
- name: Check the metadata diff
shell: bash
# the following subwasm call will error for chains that are not known and/or live, that includes shell for instance
run: |
subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.runtime }} || \
echo "Subwasm call failed, check the logs. This is likely because ${{ matrix.runtime }} is not known by subwasm" | \
tee ${{ matrix.runtime }}-diff.txt
- name: Archive Subwasm results
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: ${{ matrix.runtime }}-runtime
path: |
${{ matrix.runtime }}-info.json
${{ matrix.runtime }}-compressed-info.json
${{ matrix.runtime }}-metadata.json
${{ matrix.runtime }}-diff.txt