Files
pezkuwi-subxt/cumulus/.github/workflows/srtool.yml
T
Chevdor 5f96d5eea8 Refactor paths and runtime names (#507)
chore: refactor for consistant naming of the crates and paths of the runtimes

* tests: ignore folder created by the tests
* chore: refactoring
* Update polkadot-parachains/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-06-28 14:24:03 +02:00

73 lines
2.3 KiB
YAML

name: Srtool build
on:
push:
tags:
- "*"
paths-ignore:
- "docker"
- "docs"
- "scripts"
- "test"
schedule:
- cron: "00 02 * * 1" # 2AM weekly on monday
jobs:
srtool:
runs-on: ubuntu-latest
strategy:
matrix:
chain: ["statemine", "westmint"]
steps:
- name: Get Timestamp
run: echo "TMSP=$(date '+%Y%m%d_%H%M%S')" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.1.0
with:
chain: ${{ matrix.chain }}
runtime_dir: polkadot-parachains/${{ matrix.chain }}
- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json
cat ${{ matrix.chain }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
- name: Archive Runtime
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.chain }}-runtime-${{ env.TMSP }}-${{ github.sha }}
path: |
${{ steps.srtool_build.outputs.wasm }}
${{ matrix.chain }}-srtool-digest.json
- name: Install subwasm
uses: actions-rs/cargo@v1
with:
command: install
args: "--git https://gitlab.com/chevdor/subwasm"
- name: Show Runtime information
shell: bash
run: |
subwasm info ${{ steps.srtool_build.outputs.wasm }}
subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-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.chain }}-metadata.json
- name: Check the metadata diff
shell: bash
run: |
subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} > ${{ matrix.chain }}-diff.txt
cat ${{ matrix.chain }}-diff.txt
- name: Archive Subwasm results
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.chain }}-runtime-${{ env.TMSP }}-${{ github.sha }}
path: |
${{ matrix.chain }}-info.json
${{ matrix.chain }}-metadata.json
${{ matrix.chain }}-diff.txt