Skip to content
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

Upgrade to Rust 1.70 and use latest subwasm #64

Merged
merged 2 commits into from
Jun 23, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/manual-acala.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Manual Build - Acala

env:
SUBWASM_VERSION: 0.19.1
SUBWASM_VERSION: 0.20.0

on:
workflow_dispatch:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.69.0
default: 1.70.0
required: false
ref:
description: The ref to be used for the repo
Expand All @@ -34,7 +34,7 @@ jobs:

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.6.0
uses: chevdor/srtool-actions@v0.7.0
with:
chain: ${{ matrix.chain }}
tag: ${{ github.event.inputs.srtool_tag }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-cumulus.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Manual Build - Cumulus

env:
SUBWASM_VERSION: 0.19.1
SUBWASM_VERSION: 0.20.0

on:
workflow_dispatch:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.69.0
default: 1.70.0
required: false
ref:
description: The ref to be used for the repo
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.6.0
uses: chevdor/srtool-actions@v0.7.0
with:
chain: ${{ matrix.runtime }}
tag: ${{ github.event.inputs.srtool_tag }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-moonbeam.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Manual Build - Moonbeam

env:
SUBWASM_VERSION: 0.19.1
SUBWASM_VERSION: 0.20.0

on:
workflow_dispatch:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.69.0
default: 1.70.0
required: false
ref:
description: The ref to be used for the repo
Expand All @@ -33,7 +33,7 @@ jobs:

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.6.0
uses: chevdor/srtool-actions@v0.7.0
with:
chain: ${{ matrix.chain }}
tag: ${{ github.event.inputs.srtool_tag }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-polkadot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Manual Build - Polkadot

env:
SUBWASM_VERSION: 0.19.1
SUBWASM_VERSION: 0.20.0

on:
workflow_dispatch:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.69.0
default: 1.70.0
required: false
ref:
description: The ref to be used for the repo
Expand All @@ -34,7 +34,7 @@ jobs:

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.6.0
uses: chevdor/srtool-actions@v0.7.0
with:
chain: ${{ matrix.chain }}
tag: ${{ github.event.inputs.srtool_tag }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-shiden.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Manual Build - Shiden

env:
SUBWASM_VERSION: 0.19.1
SUBWASM_VERSION: 0.20.0

on:
workflow_dispatch:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.69.0
default: 1.70.0
required: false
ref:
description: The ref to be used for the repo
Expand All @@ -34,7 +34,7 @@ jobs:

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.6.0
uses: chevdor/srtool-actions@v0.7.0
with:
chain: ${{ matrix.chain }}
tag: ${{ github.event.inputs.srtool_tag }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Manual Build

env:
SUBWASM_VERSION: 0.19.1
SUBWASM_VERSION: 0.20.0

on:
workflow_dispatch:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.69.0
default: 1.70.0
required: false
srtool_image:
description: The SRTOOL image to use
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.6.0
uses: chevdor/srtool-actions@v0.7.0
with:
chain: ${{ github.event.inputs.chain }}
package: ${{ github.event.inputs.package }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker.io/library/ubuntu:22.04
LABEL maintainer "chevdor@gmail.com"
LABEL description="This image contains tools for Substrate blockchains runtimes."

ARG RUSTC_VERSION="1.69.0"
ARG RUSTC_VERSION="1.70.0"
ENV RUSTC_VERSION=$RUSTC_VERSION
ENV DOCKER_IMAGE="paritytech/srtool"
ENV PROFILE=release
Expand All @@ -24,7 +24,7 @@ WORKDIR /tmp
ENV DEBIAN_FRONTEND=noninteractive

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

Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Substrate Runtime Toolbox: srtool v0.10.0
# Substrate Runtime Toolbox: srtool v0.11.0

<figure>
<img src="resources/srtool-docker_128px.png" alt="srtool docker 128px" />
Expand All @@ -18,13 +18,13 @@ The Docker images are tagged with both the rustc version used internally as well

You may find for instance the following:

- `paritytech/srtool:1.69.0-0.9.19`
- `paritytech/srtool:1.70.0-0.9.19`

- `paritytech/srtool:1.69.0-0.10.0`
- `paritytech/srtool:1.70.0-0.11.0`

- `paritytech/srtool:1.69.0`
- `paritytech/srtool:1.70.0`

The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.69.0` is the same image than `paritytech/srtool:1.69.0-0.10.0`.
The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.70.0` is the same image than `paritytech/srtool:1.70.0-0.11.0`.

## Related tools

Expand All @@ -51,7 +51,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.69.0. It is tagged as v0.10.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.70.0. It is tagged as v0.11.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 All @@ -67,7 +67,7 @@ This method is legacy and deprecated. It is recommended to use the `srtool-cli`

Creating an alias helps hiding the docker complexity behind one simple command. We will see more powerful options but this one is simple enough.

export RUSTC_VERSION=1.69.0; export PACKAGE=kusama-runtime; alias srtool='docker run --rm -it -e PACKAGE=$PACKAGE -v $PWD:/build -v $TMPDIR/cargo:/cargo-home paritytech/srtool:$RUSTC_VERSION'
export RUSTC_VERSION=1.70.0; export PACKAGE=kusama-runtime; alias srtool='docker run --rm -it -e PACKAGE=$PACKAGE -v $PWD:/build -v $TMPDIR/cargo:/cargo-home paritytech/srtool:$RUSTC_VERSION'

Note that defining the alias as done above will hardcode the runtime. Using `kusama-runtime` as shown above means you will **always** check the Kusama runtime. If you need more, check the next chapter.

Expand Down Expand Up @@ -95,9 +95,9 @@ Invoking `srtool build` with

will output something that looks like this:

🧰 Substrate Runtime Toolbox - srtool v0.10.0 🧰
🧰 Substrate Runtime Toolbox - srtool v0.11.0 🧰
- by Chevdor -
🏗 Building polkadot-runtime as release using rustc 1.69.0
🏗 Building polkadot-runtime as release using rustc 1.70.0
⏳ That can take a little while, be patient... subsequent builds will be faster.
Since you have to wait a little, you may want to learn more about Substrate runtimes:
https://docs.substrate.io/v3/getting-started/architecture/
Expand All @@ -108,7 +108,7 @@ and finally …​

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

{
"gen": "srtool v0.10.0",
"gen": "srtool v0.11.0",
"src": "git",
"version": "1.0.0",
"commit": "85cad2ef48f123d7475385b00d113bc900324ad6",
"tag": "statemine-v1.0.0",
"branch": "wk-gh-actions",
"rustc": "rustc 1.69.0 (...)",
"rustc": "rustc 1.70.0 (...)",
"pkg": "statemine-runtime",
"tmsp": "2021-06-22T18:08:50Z",
"size": "1538747",
Expand All @@ -155,7 +155,7 @@ The output will look something like:
"info": {
"generator": {
"name": "srtool",
"version": "0.10.0"
"version": "0.11.0"
},
"src": "git",
"version": "1.0.0",
Expand All @@ -164,7 +164,7 @@ The output will look something like:
"tag": "statemine-v1.0.0",
"branch": "wk-gh-actions"
},
"rustc": "rustc 1.69.0 (...)",
"rustc": "rustc 1.70.0 (...)",
"pkg": "statemine-runtime",
"profile": "release"
},
Expand Down Expand Up @@ -317,9 +317,9 @@ First you may want to double check what rustc versions are available as you will

rustup check

So say you want to build a builder for rustc 1.69.0:
So say you want to build a builder for rustc 1.70.0:

RUSTC_VERSION=1.69.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION .
RUSTC_VERSION=1.70.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION .

## User Scripts

Expand All @@ -333,7 +333,7 @@ You can see the list of available scripts in the `/scripts` folder:

- `build`: Run the actual build.

The `info` and `version` scripts pass any arguments you pass to the script to `jq`. So you can play with `c` (compact), `-M` (monochrome), `-C` color output. For instance `docker run --rm -it -v $PWD:/build chevdor/srtool:1.69.0 info -cM` shows a monochrome output on a single line.
The `info` and `version` scripts pass any arguments you pass to the script to `jq`. So you can play with `c` (compact), `-M` (monochrome), `-C` color output. For instance `docker run --rm -it -v $PWD:/build chevdor/srtool:1.70.0 info -cM` shows a monochrome output on a single line.

## Build your custom chain / parachain

Expand Down
4 changes: 2 additions & 2 deletions README_src.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:name: paritytech/srtool
:rsversion: 1.69.0
:version: 0.10.0
:rsversion: 1.70.0
:version: 0.11.0
// :rsversion: pass:m[include:RUSTC_VERSION[]] // TODO: not working...
:toc: right
:sectnums:
Expand Down
2 changes: 1 addition & 1 deletion RUSTC_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.69.0
1.70.0
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.11.0