Build wasm #40
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: 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/[email protected] | |
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.73.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@v4 | |
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 |