Skip to content

Commit 0427938

Browse files
Update subwasm and manual GH flow (#89)
* Bump subwasm version * Bumps subwasm version add profile and build ops * replace hardcoded profile in the path * fix tests
1 parent ea7371b commit 0427938

File tree

11 files changed

+37
-27
lines changed

11 files changed

+37
-27
lines changed

.github/workflows/manual-acala.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Manual Build - Acala
22

33
env:
4-
SUBWASM_VERSION: 0.20.0
4+
SUBWASM_VERSION: 0.21.0
55

66
on:
77
workflow_dispatch:

.github/workflows/manual-fellow-runtimes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Manual Build - Fellowship
22

33
env:
4-
SUBWASM_VERSION: 0.20.0
4+
SUBWASM_VERSION: 0.21.0
55
TOML_CLI_VERSION: 0.2.4
66

77
on:

.github/workflows/manual-moonbeam.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Manual Build - Moonbeam
22

33
env:
4-
SUBWASM_VERSION: 0.20.0
4+
SUBWASM_VERSION: 0.21.0
55

66
on:
77
workflow_dispatch:

.github/workflows/manual-polkadot-sdk.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Manual Build - Polkadot SDK
22

33
env:
4-
SUBWASM_VERSION: 0.20.0
4+
SUBWASM_VERSION: 0.21.0
55
TOML_CLI_VERSION: 0.2.4
66

77
on:
@@ -23,6 +23,13 @@ on:
2323
cache:
2424
description: By default, caching will be used but you can turn it off here if you provide 'false'
2525
default: true
26+
build_opts:
27+
description: The build options to be used to build runtime (can be left empty)
28+
required: false
29+
profile:
30+
description: The profile to be used for the runtime build
31+
default: release
32+
required: false
2633
schedule:
2734
- cron: "00 03 * * 1" # 3AM weekly on mondays
2835

@@ -126,26 +133,29 @@ jobs:
126133
with:
127134
key: ${{ matrix.chain }}-${{ needs.find-runtimes.outputs.commit_hash }}
128135
path: |
129-
sdk/${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime
136+
sdk/${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime
130137
131138
- name: Srtool build
132139
id: srtool_build
133140
if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }}
134141
uses: chevdor/[email protected]
142+
env:
143+
BUILD_OPTS: ${{ inputs.build_opts }}
135144
with:
136145
workdir: sdk
137146
chain: ${{ matrix.chain }}
138147
runtime_dir: ${{ matrix.runtime_dir }}
139148
image: ${{ github.event.inputs.image }}
140149
tag: ${{ github.event.inputs.srtool_tag }}
150+
profile: ${{ github.event.inputs.profile }}
141151

142152
# This is done to allow caching
143153
- name: Store build artifacts to disk
144154
id: cache_digest
145155
if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }}
146156
working-directory: sdk
147157
run: |
148-
cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/
158+
cached_output=${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime/
149159
digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json
150160
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${digest_file}
151161
cat ${digest_file}
@@ -157,9 +167,9 @@ jobs:
157167
runtime_package=${{ matrix.chain }}-runtime
158168
runtime_filename=${runtime_package//-/_}
159169
160-
wasm="${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${runtime_package}/${runtime_filename}.compact.wasm"
170+
wasm="${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${runtime_package}/${runtime_filename}.compact.wasm"
161171
162-
wasm_compressed="${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${runtime_package}/${runtime_filename}.compact.compressed.wasm"
172+
wasm_compressed="${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${runtime_package}/${runtime_filename}.compact.compressed.wasm"
163173
164174
# we need wasm and wasm_compressed
165175
echo "wasm=$wasm" >> "$GITHUB_OUTPUT"
@@ -168,7 +178,7 @@ jobs:
168178
- name: Summary
169179
working-directory: sdk
170180
run: |
171-
cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/
181+
cached_output=${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime/
172182
digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json
173183
ls -al ${digest_file}
174184
cat ${digest_file}

.github/workflows/manual-shiden.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Manual Build - Shiden
22

33
env:
4-
SUBWASM_VERSION: 0.20.0
4+
SUBWASM_VERSION: 0.21.0
55

66
on:
77
workflow_dispatch:

.github/workflows/manual.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Manual Build
22

33
env:
4-
SUBWASM_VERSION: 0.20.0
4+
SUBWASM_VERSION: 0.21.0
55

66
on:
77
workflow_dispatch:

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,12 @@ jobs:
404404
fail-fast: false
405405
matrix:
406406
include:
407-
- category: contracts
408-
chain: contracts-rococo
407+
- category: collectives
408+
chain: collectives-westend
409409
- category: assets
410410
chain: asset-hub-westend
411-
- category: starters
412-
chain: shell
411+
- category: bridge-hubs
412+
chain: bridge-hub-westend
413413
steps:
414414
- name: Cache the image
415415
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ WORKDIR /tmp
2424
ENV DEBIAN_FRONTEND=noninteractive
2525

2626
# Tooling
27-
ARG SUBWASM_VERSION=0.20.0
27+
ARG SUBWASM_VERSION=0.21.0
2828
ARG TERA_CLI_VERSION=0.2.4
2929
ARG TOML_CLI_VERSION=0.2.4
3030

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Substrate Runtime Toolbox: srtool v0.16.0
1+
# Substrate Runtime Toolbox: srtool v0.17.0
22

33
![srtool docker 128px](resources/srtool-docker_128px.png)
44

@@ -18,11 +18,11 @@ The Docker images are tagged with both the rustc version used internally as well
1818

1919
You may find for instance the following:
2020

21-
- `paritytech/srtool:1.81.0-0.16.0`
21+
- `paritytech/srtool:1.81.0-0.17.0`
2222

2323
- `paritytech/srtool:1.81.0`
2424

25-
The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.81.0` is the same image than `paritytech/srtool:1.81.0-0.16.0`.
25+
The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.81.0` is the same image than `paritytech/srtool:1.81.0-0.17.0`.
2626

2727
## Related tools
2828

@@ -47,7 +47,7 @@ You may also want to have a look at [subwasm](https://github.com/chevdor/subwasm
4747
The project was initially developed by <https://gitlab.com/chevdor>.
4848
It has now moved to Github under the [Parity Technologies](https://www.github.com/paritytech) organisation to simplify the developement and the integration with other Parity products such as Polkadot and Kusama.
4949

50-
The last version hosted on Gitlab has been built using Rust Stable 1.81.0. It is tagged as v0.16.0 and there is no plan on updating the Gitlab repository further. New versions will be available from [this repository](https://www.github.com/paritytech/srtool) only. The functionalities remain the same so you can (and should!) simply swap `chevdor/srtool` for `paritytech/srtool` in your workflows. The [srtool-actions](https://github.com/chevdor/srtool-actions) will remain available as `chevdor/srtool-actions@<version>` and will be updated to point at the paritytech image.
50+
The last version hosted on Gitlab has been built using Rust Stable 1.81.0. It is tagged as v0.17.0 and there is no plan on updating the Gitlab repository further. New versions will be available from [this repository](https://www.github.com/paritytech/srtool) only. The functionalities remain the same so you can (and should!) simply swap `chevdor/srtool` for `paritytech/srtool` in your workflows. The [srtool-actions](https://github.com/chevdor/srtool-actions) will remain available as `chevdor/srtool-actions@<version>` and will be updated to point at the paritytech image.
5151

5252
## Install
5353

@@ -91,7 +91,7 @@ Invoking `srtool build` with
9191

9292
will output something that looks like this:
9393

94-
🧰 Substrate Runtime Toolbox - srtool v0.16.0 🧰
94+
🧰 Substrate Runtime Toolbox - srtool v0.17.0 🧰
9595
- by Chevdor -
9696
🏗 Building polkadot-runtime as release using rustc 1.81.0
9797
⏳ That can take a little while, be patient... subsequent builds will be faster.
@@ -104,7 +104,7 @@ and finally …​
104104

105105
✨ Your Substrate WASM Runtime is ready! ✨
106106
Summary:
107-
Generator : srtool v0.16.0
107+
Generator : srtool v0.17.0
108108
Version : null
109109
GIT commit : 56b9e95a9b634695f59a7c699bc68a5cfb695f03
110110
GIT tag : moonriver-genesis
@@ -134,7 +134,7 @@ If you prefer a json output, srtool has you covered:
134134
The output will look something like:
135135

136136
{
137-
"gen": "srtool v0.16.0",
137+
"gen": "srtool v0.17.0",
138138
"src": "git",
139139
"version": "1.0.0",
140140
"commit": "85cad2ef48f123d7475385b00d113bc900324ad6",
@@ -151,7 +151,7 @@ The output will look something like:
151151
"info": {
152152
"generator": {
153153
"name": "srtool",
154-
"version": "0.16.0"
154+
"version": "0.17.0"
155155
},
156156
"src": "git",
157157
"version": "1.0.0",
@@ -332,7 +332,7 @@ If you mount this docker volume, you will find the wasm on your local filesystem
332332
# REPO=fellowship-runtimes
333333
podman run --rm -it \
334334
-v $REPO:/build \
335-
`paritytech/srtool:1.81.0-0.16.0` scan
335+
`paritytech/srtool:1.81.0-0.17.0` scan
336336

337337
## ZSH/ Zinit users
338338

README_src.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:name: paritytech/srtool
22
:rsversion: 1.81.0
3-
:version: 0.16.0
3+
:version: 0.17.0
44
// :rsversion: pass:m[include:RUSTC_VERSION[]] // TODO: not working...
55
:toc: right
66
:sectnums:

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.16.0
1+
0.17.0

0 commit comments

Comments
 (0)