23
23
env :
24
24
GITHUB_CACHE_VERSION : 0
25
25
26
- RUST_TOOLCHAIN : nightly
27
26
RUST_BACKTRACE : full
28
27
RUSTC_WRAPPER : sccache
29
28
30
29
SCCACHE_LINK : https://github.com/mozilla/sccache/releases/download
31
30
SCCACHE_VERSION : v0.3.0
32
31
SCCACHE_DIR : /home/runner/.cache/sccache
33
32
34
- SUBALFRED_LINK : https://github.com/hack-ink/subalfred/releases/latest/download/subalfred-x86_64-unknown-linux-gnu.zst
35
-
36
33
jobs :
37
34
basic-checks :
38
35
name : Task ${{ matrix.action }} darwinia
41
38
strategy :
42
39
matrix :
43
40
action : [build, test]
44
-
45
41
steps :
46
42
- name : Setup build environment
47
43
run : sudo apt install -y protobuf-compiler
48
- - name : Install Rust ${{ env.RUST_TOOLCHAIN }} toolchain
49
- uses : actions-rs/toolchain@v1
50
- with :
51
- toolchain : ${{ env.RUST_TOOLCHAIN }}
52
- default : true
53
44
- name : Install Sccache
54
45
run : |
55
46
export SCCACHE_FILE=sccache-${{ env.SCCACHE_VERSION }}-x86_64-unknown-linux-musl
@@ -78,17 +69,15 @@ jobs:
78
69
with :
79
70
command : ${{ matrix.action }}
80
71
args : --release --locked --features all-native
81
- - name : Compress
72
+ - name : Change path
82
73
if : matrix.action != 'test'
83
- run : |
84
- mv target/release/darwinia .
85
- tar cf darwinia.tar.zst darwinia -I pzstd
74
+ run : mv target/release/darwinia .
86
75
- name : Upload
87
76
if : matrix.action != 'test'
88
77
uses : actions/upload-artifact@v2
89
78
with :
90
79
name : darwinia
91
- path : darwinia.tar.zst
80
+ path : darwinia
92
81
- name : Shrink cache
93
82
run : .github/shrink-cache.sh
94
83
@@ -106,75 +95,25 @@ jobs:
106
95
path : ${{ matrix.runtime }}
107
96
108
97
runtime-checks :
109
- name : Task check runtime
98
+ name : Task check runtimes
110
99
if : github.event_name == 'push' || !github.event.pull_request.draft
100
+ strategy :
101
+ matrix :
102
+ target :
103
+ [
104
+ { chain: darwinia-dev, compare-with: "https://rpc.polkadot.io" },
105
+ { chain: crab-dev, compare-with: "https://rpc.polkadot.io" },
106
+ { chain: pangolin-dev, compare-with: "https://rpc.polkadot.io" },
107
+ ]
111
108
needs : [basic-checks]
112
109
runs-on : ubuntu-latest
113
110
steps :
114
- - name : Install Subalfred
115
- run : |
116
- curl -L ${{ env.SUBALFRED_LINK }} | zstd -o subalfred -d
117
- chmod u+x subalfred
118
- sudo mv subalfred /usr/bin
119
- sudo chmod u+x /usr/bin/subalfred
120
- - name : Download darwinia
121
- uses : actions/download-artifact@v2
111
+ - name : Check ${{ matrix.target.chain }}
112
+
122
113
with :
123
- name : darwinia
124
- - name : Install darwinia
125
- run : |
126
- tar xf darwinia.tar.zst -I pzstd
127
- sudo mv darwinia /usr/bin
128
- - id : check-crab-runtime-version
129
- name : Check Crab runtime version
130
- run : |
131
- OUTPUT=$(subalfred check runtime --executable darwinia --chain crab-dev --live https://rpc.polkadot.io --property version)
132
- OUTPUT="${OUTPUT//'%'/'%25'}"
133
- OUTPUT="${OUTPUT//$'\n'/'%0A'}"
134
- OUTPUT="${OUTPUT//$'\r'/'%0D'}"
135
- echo "::set-output name=check-crab-runtime-version::$OUTPUT"
136
- - id : check-crab-runtime-storage
137
- name : Check Crab runtime storage
138
- run : |
139
- OUTPUT=$(subalfred check runtime --executable darwinia --chain crab-dev --live https://rpc.polkadot.io --property storage)
140
- OUTPUT="${OUTPUT//'%'/'%25'}"
141
- OUTPUT="${OUTPUT//$'\n'/'%0A'}"
142
- OUTPUT="${OUTPUT//$'\r'/'%0D'}"
143
- echo "::set-output name=check-crab-runtime-storage::$OUTPUT"
144
- - id : check-darwinia-runtime-version
145
- name : Check Darwinia runtime version
146
- run : |
147
- OUTPUT=$(subalfred check runtime --executable darwinia --chain darwinia-dev --live https://rpc.polkadot.io --property version)
148
- OUTPUT="${OUTPUT//'%'/'%25'}"
149
- OUTPUT="${OUTPUT//$'\n'/'%0A'}"
150
- OUTPUT="${OUTPUT//$'\r'/'%0D'}"
151
- echo "::set-output name=check-darwinia-runtime-version::$OUTPUT"
152
- - id : check-darwinia-runtime-storage
153
- name : Check Darwinia runtime storage
154
- run : |
155
- OUTPUT=$(subalfred check runtime --executable darwinia --chain darwinia-dev --live https://rpc.polkadot.io --property storage)
156
- OUTPUT="${OUTPUT//'%'/'%25'}"
157
- OUTPUT="${OUTPUT//$'\n'/'%0A'}"
158
- OUTPUT="${OUTPUT//$'\r'/'%0D'}"
159
- echo "::set-output name=check-darwinia-runtime-storage::$OUTPUT"
160
- - if : github.ref != 'refs/heads/master'
161
- uses : marocchino/sticky-pull-request-comment@v2
162
- with :
163
- append : true
164
- message : |
165
- <details>
166
- <summary>Commit ${{ github.event.pull_request.head.sha }}</summary>
167
-
168
- **Darwinia**
169
- > Check Runtime Version
170
- ```diff
171
- ${{ steps.check-darwinia-runtime-version.outputs.check-darwinia-runtime-version }}
172
- ```
173
- > Check Storage Prefix
174
- ```diff
175
- ${{ steps.check-darwinia-runtime-storage.outputs.check-darwinia-runtime-storage }}
176
- ```
177
- </details>
114
+ uploaded-artifact : darwinia
115
+ chain : ${{ matrix.target.chain }}
116
+ compare-with : ${{ matrix.target.compare-with }}
178
117
179
118
checks-cleaning :
180
119
name : Task checks cleaning
0 commit comments