Skip to content

Build wasm

Build wasm #29

Workflow file for this run

name: Build wasm
on:
workflow_dispatch:
inputs:
chain:
type: choice
description: The chain whose runtime-wasm is built
options:
- litmus
- litentry
- rococo
ref:
description: The commit SHA or tag for checking out code
default: ''
required: false
env:
CARGO_TERM_COLOR: always
jobs:
build-wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout codes on ${{ github.event.inputs.ref || github.ref }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.ref }}
fetch-depth: 0
- name: Build ${{ github.event.inputs.chain }} wasm with srtool
id: srtool_build
uses: chevdor/srtool-actions@v0.7.0
env:
# optional: will override the parachain pallet ID and authorize_upgrade call ID,
# which will result in a different parachain_authorize_upgrade_hash
PARACHAIN_PALLET_ID: "0x1e"
AUTHORIZE_UPGRADE_PREFIX: "0x02"
with:
chain: ${{ github.event.inputs.chain }}-parachain
runtime_dir: runtime/${{ github.event.inputs.chain }}
tag: "1.66.0"
- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ github.event.inputs.chain }}-parachain-srtool-digest.json
echo "==============================================="
cat ${{ github.event.inputs.chain }}-parachain-srtool-digest.json
cp ${{ steps.srtool_build.outputs.wasm }} ${{ github.event.inputs.chain }}-parachain-runtime.compact.wasm
cp ${{ steps.srtool_build.outputs.wasm_compressed }} ${{ github.event.inputs.chain }}-parachain-runtime.compact.compressed.wasm
- name: Upload wasm artefacts
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.inputs.chain }}-parachain-runtime
path: |
${{ github.event.inputs.chain }}-parachain-srtool-digest.json
${{ github.event.inputs.chain }}-parachain-runtime.compact.wasm
${{ github.event.inputs.chain }}-parachain-runtime.compact.compressed.wasm