Manual Build - Shiden #180
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Manual Build - Shiden | |
env: | |
SUBWASM_VERSION: 0.20.0 | |
on: | |
workflow_dispatch: | |
inputs: | |
srtool_tag: | |
description: The SRTOOL tag to use | |
default: 1.81.0 | |
required: false | |
ref: | |
description: The ref to be used for the repo | |
default: master | |
required: false | |
schedule: | |
- cron: "00 03 * * 1" # 3AM weekly on mondays | |
jobs: | |
build: | |
name: Build ${{ matrix.chain }} ${{ github.event.inputs.ref }} | |
strategy: | |
matrix: | |
chain: ["shiden"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
with: | |
repository: AstarNetwork/Astar | |
ref: ${{ github.event.inputs.ref }} | |
fetch-depth: 0 | |
submodules: true | |
- name: Srtool build | |
id: srtool_build | |
uses: chevdor/[email protected] | |
with: | |
chain: ${{ matrix.chain }} | |
tag: ${{ github.event.inputs.srtool_tag }} | |
- 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 }}" | |
# 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@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 | |
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 ${{ env.SUBWASM_VERSION }} | |
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 | |
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 }}-info_compressed.json | |
- name: Extract the metadata | |
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 | |
run: | | |
# subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt | |
echo "No live chain to compare" > ${{ matrix.chain }}-diff.txt | |
- name: Archive Subwasm results | |
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 | |
with: | |
name: ${{ matrix.chain }}-runtime | |
path: | | |
${{ matrix.chain }}-info.json | |
${{ matrix.chain }}-info_compressed.json | |
${{ matrix.chain }}-metadata.json | |
${{ matrix.chain }}-diff.txt |