Skip to content

Commit

Permalink
Add moonbeam/moonriver for testing (#19)
Browse files Browse the repository at this point in the history
* Add moonbeam/moonriver for testing

* Prevent CI to start twice when pushing to a PR branch

* Fix checkout path

* Fix checkout path
  • Loading branch information
chevdor committed Aug 23, 2023
1 parent 17555c2 commit 462c61a
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cumulus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ env:

on:
pull_request:
branches:
- master
types: [opened, reopened, synchronize]

push:
branches:
- "*"
tags:
- "v*"
branches:
- master

workflow_dispatch:
inputs:
Expand Down
66 changes: 64 additions & 2 deletions .github/workflows/moonbeam.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# placeholder to be able to trigger the new workflow
name: Manual Build - Moonbeam

env:
Expand Down Expand Up @@ -26,8 +25,71 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
path: action

- uses: actions/checkout@v3
with:
repository: PureStake/moonbeam
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
path: repo
ref: ${{ github.event.inputs.ref }}

# 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: Srtool build
id: srtool_build
uses: ./action
with:
tag: ${{ github.event.inputs.srtool_tag }}
chain: ${{ matrix.chain }}
workdir: "${{ github.workspace }}/repo"

- 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@v3
with:
name: ${{ matrix.chain }}-runtime
path: |
${{ steps.srtool_build.outputs.wasm }}
${{ steps.srtool_build.outputs.wasm_compressed }}
${{ matrix.chain }}-srtool-digest.json
- 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
8 changes: 4 additions & 4 deletions .github/workflows/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ env:

on:
pull_request:
branches:
- master
types: [opened, reopened, synchronize]

push:
branches:
- "*"
tags:
- "v*"
branches:
- master

workflow_dispatch:
inputs:
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ inputs:
workdir:
description: >
Path of the project, this is where your main Cargo.toml is located. This is relative to $GITHUB_WORKSPACE.
required: true
default: "."
required: false

runtime_dir:
description: >
Expand Down

0 comments on commit 462c61a

Please sign in to comment.