Skip to content

Update subwasm and manual GH flow #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/manual-acala.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Manual Build - Acala

env:
SUBWASM_VERSION: 0.20.0
SUBWASM_VERSION: 0.21.0

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-fellow-runtimes.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Manual Build - Fellowship

env:
SUBWASM_VERSION: 0.20.0
SUBWASM_VERSION: 0.21.0
TOML_CLI_VERSION: 0.2.4

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-moonbeam.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Manual Build - Moonbeam

env:
SUBWASM_VERSION: 0.20.0
SUBWASM_VERSION: 0.21.0

on:
workflow_dispatch:
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/manual-polkadot-sdk.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Manual Build - Polkadot SDK

env:
SUBWASM_VERSION: 0.20.0
SUBWASM_VERSION: 0.21.0
TOML_CLI_VERSION: 0.2.4

on:
Expand All @@ -23,6 +23,13 @@ on:
cache:
description: By default, caching will be used but you can turn it off here if you provide 'false'
default: true
build_opts:
description: The build options to be used to build runtime (can be left empty)
required: false
profile:
description: The profile to be used for the runtime build
default: release
required: false
schedule:
- cron: "00 03 * * 1" # 3AM weekly on mondays

Expand Down Expand Up @@ -126,26 +133,29 @@ jobs:
with:
key: ${{ matrix.chain }}-${{ needs.find-runtimes.outputs.commit_hash }}
path: |
sdk/${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime
sdk/${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime

- name: Srtool build
id: srtool_build
if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }}
uses: chevdor/[email protected]
env:
BUILD_OPTS: ${{ inputs.build_opts }}
with:
workdir: sdk
chain: ${{ matrix.chain }}
runtime_dir: ${{ matrix.runtime_dir }}
image: ${{ github.event.inputs.image }}
tag: ${{ github.event.inputs.srtool_tag }}
profile: ${{ github.event.inputs.profile }}

# This is done to allow caching
- name: Store build artifacts to disk
id: cache_digest
if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }}
working-directory: sdk
run: |
cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/
cached_output=${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime/
digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${digest_file}
cat ${digest_file}
Expand All @@ -157,9 +167,9 @@ jobs:
runtime_package=${{ matrix.chain }}-runtime
runtime_filename=${runtime_package//-/_}

wasm="${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${runtime_package}/${runtime_filename}.compact.wasm"
wasm="${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${runtime_package}/${runtime_filename}.compact.wasm"

wasm_compressed="${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${runtime_package}/${runtime_filename}.compact.compressed.wasm"
wasm_compressed="${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${runtime_package}/${runtime_filename}.compact.compressed.wasm"

# we need wasm and wasm_compressed
echo "wasm=$wasm" >> "$GITHUB_OUTPUT"
Expand All @@ -168,7 +178,7 @@ jobs:
- name: Summary
working-directory: sdk
run: |
cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/
cached_output=${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime/
digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json
ls -al ${digest_file}
cat ${digest_file}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-shiden.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Manual Build - Shiden

env:
SUBWASM_VERSION: 0.20.0
SUBWASM_VERSION: 0.21.0

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Manual Build

env:
SUBWASM_VERSION: 0.20.0
SUBWASM_VERSION: 0.21.0

on:
workflow_dispatch:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ jobs:
fail-fast: false
matrix:
include:
- category: contracts
chain: contracts-rococo
- category: collectives
chain: collectives-westend
- category: assets
chain: asset-hub-westend
- category: starters
chain: shell
- category: bridge-hubs
chain: bridge-hub-westend
steps:
- name: Cache the image
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ WORKDIR /tmp
ENV DEBIAN_FRONTEND=noninteractive

# Tooling
ARG SUBWASM_VERSION=0.20.0
ARG SUBWASM_VERSION=0.21.0
ARG TERA_CLI_VERSION=0.2.4
ARG TOML_CLI_VERSION=0.2.4

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Substrate Runtime Toolbox: srtool v0.16.0
# Substrate Runtime Toolbox: srtool v0.17.0

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

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

You may find for instance the following:

- `paritytech/srtool:1.81.0-0.16.0`
- `paritytech/srtool:1.81.0-0.17.0`

- `paritytech/srtool:1.81.0`

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`.
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`.

## Related tools

Expand All @@ -47,7 +47,7 @@ You may also want to have a look at [subwasm](https://github.com/chevdor/subwasm
The project was initially developed by <https://gitlab.com/chevdor>.
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.

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.
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.

## Install

Expand Down Expand Up @@ -91,7 +91,7 @@ Invoking `srtool build` with

will output something that looks like this:

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

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

{
"gen": "srtool v0.16.0",
"gen": "srtool v0.17.0",
"src": "git",
"version": "1.0.0",
"commit": "85cad2ef48f123d7475385b00d113bc900324ad6",
Expand All @@ -151,7 +151,7 @@ The output will look something like:
"info": {
"generator": {
"name": "srtool",
"version": "0.16.0"
"version": "0.17.0"
},
"src": "git",
"version": "1.0.0",
Expand Down Expand Up @@ -332,7 +332,7 @@ If you mount this docker volume, you will find the wasm on your local filesystem
# REPO=fellowship-runtimes
podman run --rm -it \
-v $REPO:/build \
`paritytech/srtool:1.81.0-0.16.0` scan
`paritytech/srtool:1.81.0-0.17.0` scan

## ZSH/ Zinit users

Expand Down
2 changes: 1 addition & 1 deletion README_src.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:name: paritytech/srtool
:rsversion: 1.81.0
:version: 0.16.0
:version: 0.17.0
// :rsversion: pass:m[include:RUSTC_VERSION[]] // TODO: not working...
:toc: right
:sectnums:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.16.0
0.17.0
Loading