forked from moonbeam-foundation/moonbeam
-
Notifications
You must be signed in to change notification settings - Fork 0
136 lines (130 loc) · 4.43 KB
/
subxt-diff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Subxt Diff
on:
workflow_dispatch:
inputs:
last_spec_version:
description: The runtime spec of the last release, with which to compare local to (ex. 1500)
required: true
spec_version:
description: runtime spec version (ex. 1601)
required: true
jobs:
build:
runs-on:
labels: bare-metal
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "runtime-${{ github.event.inputs.spec_version }}"
- name: Local build new Node
uses: ./.github/workflow-templates/cargo-build
- name: Upload Node
uses: actions/upload-artifact@v4
with:
name: moonbeam
path: build
local-diff:
needs: build
runs-on: bare-metal
strategy:
matrix:
runtime: [moonbeam, moonbase, moonriver]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Node
uses: actions/download-artifact@v4
with:
name: moonbeam
path: build
- name: Install Subxt-cli
run: |
rustup override unset
rustup show
cargo install subxt-cli --locked
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Run last_release node via Docker
run: |
docker pull moonbeamfoundation/moonbeam:runtime-${{ github.event.inputs.last_spec_version }}
docker run -d --name moonbeam_container -p 9911:9911 moonbeamfoundation/moonbeam:runtime-${{ github.event.inputs.last_spec_version }} \
--chain=${{ matrix.runtime }}-dev \
--no-hardware-benchmarks \
--no-telemetry \
--reserved-only \
--rpc-cors=all \
--no-grandpa \
--sealing=manual \
--force-authoring \
--no-prometheus \
--unsafe-rpc-external \
--alice \
--unsafe-force-node-key-generation \
--rpc-port=9911 \
--tmp
sleep 2
- name: Run Local Node
run: |
chmod +x build/moonbeam
nohup sh -c './build/moonbeam \
--chain=${{ matrix.runtime }}-dev \
--no-hardware-benchmarks \
--no-telemetry \
--reserved-only \
--rpc-cors=all \
--no-grandpa \
--sealing=manual \
--force-authoring \
--no-prometheus \
--unsafe-rpc-external \
--alice \
--rpc-port=9977 \
--unsafe-force-node-key-generation \
--tmp & sleep 2' &
- name: Run Diffs
run: |
mkdir -p runtime-diffs/${{ matrix.runtime }}
subxt diff -a ws://127.0.0.1:9911 ws://127.0.0.1:9977 | sed 's/\x1b\[[0-9;]*m//g' > runtime-diffs/${{ matrix.runtime }}/${{ github.event.inputs.spec_version }}.txt
- name: Stop Node Services
if: always()
run: |
docker stop moonbeam_container
docker rm moonbeam_container
pkill moonbeam
- name: Upload diff artifacts
uses: actions/upload-artifact@v4
with:
name: runtime-diff-${{ matrix.runtime }}-${{ github.event.inputs.spec_version }}
path: runtime-diffs/${{ matrix.runtime }}
create_pr:
needs: local-diff
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Download artifacts from the local-diff job
- name: Download diff artifacts
uses: actions/download-artifact@v4
with:
name: runtime-diff-moonbase-${{ github.event.inputs.spec_version }}
path: runtime-diffs/moonbase
- name: Download diff artifacts
uses: actions/download-artifact@v4
with:
name: runtime-diff-moonbeam-${{ github.event.inputs.spec_version }}
path: runtime-diffs/moonbeam
- name: Download diff artifacts
uses: actions/download-artifact@v4
with:
name: runtime-diff-moonriver-${{ github.event.inputs.spec_version }}
path: runtime-diffs/moonriver
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
base: master
branch: "runtime-diff-${{ github.event.inputs.spec_version }}"
commit-message: "runtime diff: v0.${{ github.event.inputs.spec_version }}.0"
draft: true
title: "Notorize runtime upgrade differences: runtime-${{ github.event.inputs.spec_version }}"
reviewers: "librelois,noandrea"
labels: "B0-silent,D2-notlive"