Files
pezkuwi-subxt/.github/workflows/release-21_extrinsic-ordering-check-from-two.yml
T
Chevdor 220bc559f0 GHA updates and pin (#1768)
* Pin checkout to v3.1.0 and update srtool-actions to v0.6.0

* Pin GHA ruby/setup-ruby to 1.118.0

* Update and pin GHA deps

* Pin all external GHA deps
2022-10-17 14:19:09 +00:00

121 lines
4.1 KiB
YAML

# This workflow performs the Extrinsic Ordering Check on demand using two reference binaries
name: Release - Extrinsic API Check with reference bins
on:
workflow_dispatch:
inputs:
reference_binary_url:
description: A url to a Linux binary for the node containing the reference runtime to test against
default: https://releases.parity.io/cumulus/v0.9.230/polkadot-parachain
required: true
binary_url:
description: A url to a Linux binary for the node containing the runtime to test
default: https://releases.parity.io/cumulus/v0.9.270-rc7/polkadot-parachain
required: true
jobs:
check:
name: Run check
runs-on: ubuntu-latest
timeout-minutes: 10
env:
REF_URL: ${{github.event.inputs.reference_binary_url}}
BIN_REF: polkadot-parachain-ref
BIN_URL: ${{github.event.inputs.binary_url}}
BIN_BASE: polkadot-parachain
TMP: ./tmp
strategy:
fail-fast: false
matrix:
include:
- runtime: statemine
local: statemine-local
relay: polkadot-local
- runtime: statemint
local: statemint-local
relay: polkadot-local
- runtime: westmint
local: westmint-local
relay: polkadot-local
- runtime: contracts-rococo
local: contracts-rococo-local
relay: polkadot-local
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Create tmp dir
run: |
mkdir -p $TMP
pwd
- name: Fetch reference binary for ${{ matrix.runtime }}
run: |
echo Fetching $REF_URL
curl $REF_URL -o $TMP/$BIN_REF
chmod a+x $TMP/$BIN_REF
$TMP/$BIN_REF --version
- name: Fetch test binary for ${{ matrix.runtime }}
run: |
echo Fetching $BIN_URL
curl $BIN_URL -o $TMP/$BIN_BASE
chmod a+x $TMP/$BIN_BASE
$TMP/$BIN_BASE --version
- name: Start local reference node for ${{ matrix.runtime }}
run: |
echo Running reference on ${{ matrix.local }}
$TMP/$BIN_REF --chain=${{ matrix.local }} --ws-port=9954 --tmp -- --chain ${{ matrix.relay }} &
sleep 15
- name: Start local test node for ${{ matrix.runtime }}
run: |
echo Running test on ${{ matrix.local }}
$TMP/$BIN_BASE --chain=${{ matrix.local }} --ws-port=9944 --tmp -- --chain ${{ matrix.relay }} &
sleep 15
- name: Prepare output
run: |
REF_VERSION=$($TMP/$BIN_REF --version)
BIN_VERSION=$($TMP/$BIN_BASE --version)
echo "Metadata comparison:" >> output.txt
echo "Date: $(date)" >> output.txt
echo "Ref. binary: $REF_URL" >> output.txt
echo "Test binary: $BIN_URL" >> output.txt
echo "Ref. version: $REF_VERSION" >> output.txt
echo "Test version: $BIN_VERSION" >> output.txt
echo "Chain: ${{ matrix.local }}" >> output.txt
echo "Relay: ${{ matrix.relay }}" >> output.txt
echo "----------------------------------------------------------------------" >> output.txt
- name: Pull polkadot-js-tools image
run: docker pull jacogr/polkadot-js-tools
- name: Compare the metadata
run: |
CMD="docker run --pull always --network host jacogr/polkadot-js-tools metadata ws://localhost:9954 ws://localhost:9944"
echo -e "Running:\n$CMD"
$CMD >> output.txt
sed -z -i 's/\n\n/\n/g' output.txt
cat output.txt | egrep -n -i ''
SUMMARY=$(./scripts/ci/github/extrinsic-ordering-filter.sh output.txt)
echo -e $SUMMARY
echo -e $SUMMARY >> output.txt
- name: Show result
run: |
cat output.txt
- name: Save output as artifact
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: ${{ matrix.runtime }}
path: |
output.txt
- name: Stop our local nodes
run: |
pkill $BIN_REF || true
pkill $BIN_BASE || true