Files
pezkuwi-sdk/.github/workflows/release-check-runtimes.yml
T
pezkuwichain ee389beb8c feat: Add rebrand CI/CD workflows to main branch
- Add 72 rebrand workflow files (polkadot→pezkuwi, substrate→bizinikiwi, cumulus→pezcumulus)
- Add GitHub actions, issue templates, and configs
- Removed unnecessary workflows (fork-sync, gitspiegel, upstream-tracker, sync-templates, backport)
- Renamed zombienet test files to match new naming convention
2025-12-19 22:51:57 +03:00

95 lines
2.8 KiB
YAML

name: Check Runtimes Specs
# This GH Workflow fetches the runtimes available in a release.
# It then compares their metadata with reference specs located under
# .github/runtime_specs.
on:
workflow_dispatch:
inputs:
release_id:
description: |
Release ID.
You can find it using the command:
curl -s \
-H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/pezkuwichain/pezkuwi-sdk/releases | \
jq '.[] | { name: .name, id: .id }'
required: true
type: string
# This trigger unfortunately does not work as expected.
# https://github.com/orgs/community/discussions/47794
# release:
# types: [edited]
env:
RUNTIME_SPECS_DIR: .github/runtime_specs
DATA_DIR: runtimes
RELEASE_ID: ${{ inputs.release_id }}
REPO: ${{ github.repository }}
jobs:
find-specs:
name: Fetch runtime specs
outputs:
specs: ${{ steps.get-list.outputs.specs }}
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7
- name: Get list
id: get-list
run: |
lst=$(ls $RUNTIME_SPECS_DIR/*.json | xargs -I{} basename "{}" .json | jq -R .| jq -sc .)
echo "Found: $lst"
echo "specs=$lst" >> $GITHUB_OUTPUT
check-runtimes:
name: Check runtime specs
runs-on: ubuntu-latest
needs:
- find-specs
strategy:
matrix:
specs: ${{ fromJSON(needs.find-specs.outputs.specs) }}
steps:
- name: Checkout the repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7
- name: Fetch release artifacts based on release id
env:
OUTPUT_DIR: ${{ env.DATA_DIR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
. ./.github/scripts/common/lib.sh
fetch_release_artifacts
- name: Install tooling
env:
SUBWASM_VERSION: v0.20.0
DL_BASE_URL: https://github.com/chevdor/subwasm/releases/download
run: |
wget $DL_BASE_URL/$SUBWASM_VERSION/subwasm_linux_amd64_$SUBWASM_VERSION.deb \
-O subwasm.deb
sudo dpkg -i subwasm.deb
subwasm --version
- name: Extract metadata JSON for ${{ matrix.specs }}
env:
RUNTIME: ${{ matrix.specs }}
run: |
WASM=$(ls ${DATA_DIR}/${RUNTIME}*.wasm)
echo "WASM=$WASM"
subwasm show --json "$WASM" > "${DATA_DIR}/${RUNTIME}.json"
- name: Check specs for ${{ matrix.specs }}
id: build
env:
RUNTIME: ${{ matrix.specs }}
LOGLEVEL: info
run: |
python --version
.github/scripts/check-runtime.py "${DATA_DIR}/${RUNTIME}.json" "${RUNTIME_SPECS_DIR}/${RUNTIME}.json"