mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 18:47:56 +00:00
73942e0138
Bumps [chevdor/srtool-actions](https://github.com/chevdor/srtool-actions) from 0.9.1 to 0.9.2. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/chevdor/srtool-actions/commit/48e9baed50ca414936dfac59d34d8b9bbe581abd"><code>48e9bae</code></a> Remove extra quotes</li> <li>See full diff in <a href="https://github.com/chevdor/srtool-actions/compare/v0.9.1...v0.9.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
136 lines
4.7 KiB
YAML
136 lines
4.7 KiB
YAML
name: Srtool build
|
|
|
|
env:
|
|
SUBWASM_VERSION: 0.20.0
|
|
TOML_CLI_VERSION: 0.2.4
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
branches:
|
|
- release-v[0-9]+.[0-9]+.[0-9]+*
|
|
- release-cumulus-v[0-9]+*
|
|
- release-polkadot-v[0-9]+*
|
|
|
|
schedule:
|
|
- cron: "00 02 * * 1" # 2AM weekly on monday
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
find-runtimes:
|
|
name: Scan repo paritytech/polkadot-sdk
|
|
outputs:
|
|
runtime: ${{ steps.get_runtimes_list.outputs.runtime }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install tooling
|
|
run: |
|
|
URL=https://github.com/chevdor/toml-cli/releases/download/v${{ env.TOML_CLI_VERSION }}/toml_linux_amd64_v${{ env.TOML_CLI_VERSION }}.deb
|
|
curl -L $URL --output toml.deb
|
|
sudo dpkg -i toml.deb
|
|
toml --version; jq --version
|
|
|
|
- name: Scan runtimes
|
|
env:
|
|
EXCLUDED_RUNTIMES: "substrate-test"
|
|
run: |
|
|
. ./.github/scripts/common/lib.sh
|
|
|
|
echo "Github workspace: ${{ github.workspace }}"
|
|
echo "Current folder: $(pwd)"; ls -al
|
|
ls -al
|
|
|
|
MATRIX=$(find_runtimes | tee runtimes_list.json)
|
|
echo $MATRIX
|
|
|
|
- name: Get runtimes list
|
|
id: get_runtimes_list
|
|
run: |
|
|
ls -al
|
|
MATRIX=$(cat runtimes_list.json)
|
|
echo $MATRIX
|
|
echo "runtime=$MATRIX" >> $GITHUB_OUTPUT
|
|
|
|
srtool:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- find-runtimes
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{ fromJSON(needs.find-runtimes.outputs.runtime) }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Srtool build
|
|
id: srtool_build
|
|
uses: chevdor/srtool-actions@v0.9.2
|
|
with:
|
|
chain: ${{ matrix.chain }}
|
|
runtime_dir: ${{ matrix.runtime_dir }}
|
|
|
|
- name: Summary
|
|
run: |
|
|
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json
|
|
cat ${{ matrix.chain }}-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.chain }}
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
with:
|
|
name: ${{ matrix.chain }}-runtime
|
|
path: |
|
|
${{ steps.srtool_build.outputs.wasm }}
|
|
${{ steps.srtool_build.outputs.wasm_compressed }}
|
|
${{ matrix.chain }}-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.chain }}-info.json
|
|
subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.chain }}-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.chain }}-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.chain }} || \
|
|
echo "Subwasm call failed, check the logs. This is likely because ${{ matrix.chain }} is not known by subwasm" | \
|
|
tee ${{ matrix.chain }}-diff.txt
|
|
|
|
- name: Archive Subwasm results
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
with:
|
|
name: ${{ matrix.chain }}-runtime
|
|
path: |
|
|
${{ matrix.chain }}-info.json
|
|
${{ matrix.chain }}-compressed-info.json
|
|
${{ matrix.chain }}-metadata.json
|
|
${{ matrix.chain }}-diff.txt
|