From 1ac41a8269f280bcccc6eb432bc7eb0564a3aada Mon Sep 17 00:00:00 2001 From: Wilfried Kopp Date: Tue, 4 Oct 2022 13:28:21 +0200 Subject: [PATCH 1/3] Switch to Rust 1.64 and bump version to 0.9.22 --- .github/workflows/manual-acala.yml | 2 +- .github/workflows/manual-cumulus.yml | 2 +- .github/workflows/manual-moonbeam.yml | 2 +- .github/workflows/manual-polkadot.yml | 2 +- .github/workflows/manual-shiden.yml | 2 +- .github/workflows/manual.yml | 2 +- Dockerfile | 2 +- README.md | 34 +++++++++++++-------------- README_src.adoc | 6 ++--- RUSTC_VERSION | 2 +- VERSION | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/manual-acala.yml b/.github/workflows/manual-acala.yml index 4a5ecc9..f372615 100644 --- a/.github/workflows/manual-acala.yml +++ b/.github/workflows/manual-acala.yml @@ -8,7 +8,7 @@ on: inputs: srtool_tag: description: The SRTOOL tag to use - default: 1.62.0 + default: 1.64.0 required: false ref: description: The ref to be used for the repo diff --git a/.github/workflows/manual-cumulus.yml b/.github/workflows/manual-cumulus.yml index 281787e..616861f 100644 --- a/.github/workflows/manual-cumulus.yml +++ b/.github/workflows/manual-cumulus.yml @@ -8,7 +8,7 @@ on: inputs: srtool_tag: description: The SRTOOL tag to use - default: 1.62.0 + default: 1.64.0 required: false ref: description: The ref to be used for the repo diff --git a/.github/workflows/manual-moonbeam.yml b/.github/workflows/manual-moonbeam.yml index bddbb6a..8c322c2 100644 --- a/.github/workflows/manual-moonbeam.yml +++ b/.github/workflows/manual-moonbeam.yml @@ -8,7 +8,7 @@ on: inputs: srtool_tag: description: The SRTOOL tag to use - default: 1.62.0 + default: 1.64.0 required: false ref: description: The ref to be used for the repo diff --git a/.github/workflows/manual-polkadot.yml b/.github/workflows/manual-polkadot.yml index af981ae..9cbbead 100644 --- a/.github/workflows/manual-polkadot.yml +++ b/.github/workflows/manual-polkadot.yml @@ -8,7 +8,7 @@ on: inputs: srtool_tag: description: The SRTOOL tag to use - default: 1.62.0 + default: 1.64.0 required: false ref: description: The ref to be used for the repo diff --git a/.github/workflows/manual-shiden.yml b/.github/workflows/manual-shiden.yml index 35bfef5..973a0e1 100644 --- a/.github/workflows/manual-shiden.yml +++ b/.github/workflows/manual-shiden.yml @@ -8,7 +8,7 @@ on: inputs: srtool_tag: description: The SRTOOL tag to use - default: 1.62.0 + default: 1.64.0 required: false ref: description: The ref to be used for the repo diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index e81a393..2b5ee64 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -8,7 +8,7 @@ on: inputs: srtool_tag: description: The SRTOOL tag to use - default: 1.62.0 + default: 1.64.0 required: false srtool_image: description: The SRTOOL image to use diff --git a/Dockerfile b/Dockerfile index b743912..1c14a3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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.62.0" +ARG RUSTC_VERSION="1.64.0" ENV RUSTC_VERSION=$RUSTC_VERSION ENV DOCKER_IMAGE="paritytech/srtool" ENV PROFILE=release diff --git a/README.md b/README.md index 61861ee..4169e81 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Substrate Runtime Toolbox: srtool +# Substrate Runtime Toolbox: srtool v0.9.22 ![srtool docker 128px](resources/srtool-docker_128px.png) @@ -16,13 +16,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.62.0-0.9.19` +- `paritytech/srtool:1.64.0-0.9.19` -- `paritytech/srtool:1.62.0-0.9.21` +- `paritytech/srtool:1.64.0-0.9.22` -- `paritytech/srtool:1.62.0` +- `paritytech/srtool:1.64.0` -The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.62.0` is the same image than `paritytech/srtool:1.62.0-0.9.21`. +The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.64.0` is the same image than `paritytech/srtool:1.64.0-0.9.22`. ## Related tools @@ -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 . 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.62.0. It is tagged as v0.9.21 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@` and will be updated to point at the paritytech image. +The last version hosted on Gitlab has been built using Rust Stable 1.64.0. It is tagged as v0.9.22 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@` and will be updated to point at the paritytech image. ## Install @@ -63,7 +63,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.62.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.64.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. @@ -91,9 +91,9 @@ Invoking `srtool build` with will output something that looks like this: - 🧰 Substrate Runtime Toolbox - srtool v0.9.21 🧰 + 🧰 Substrate Runtime Toolbox - srtool v0.9.22 🧰 - by Chevdor - - 🏗 Building polkadot-runtime as release using rustc 1.62.0 + 🏗 Building polkadot-runtime as release using rustc 1.64.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/ @@ -104,7 +104,7 @@ and finally …​ ✨ Your Substrate WASM Runtime is ready! ✨ Summary: - Generator : srtool v0.9.21 + Generator : srtool v0.9.22 Version : null GIT commit : 56b9e95a9b634695f59a7c699bc68a5cfb695f03 GIT tag : moonriver-genesis @@ -134,13 +134,13 @@ If you prefer a json output, srtool has you covered: The output will look something like: { - "gen": "srtool v0.9.21", + "gen": "srtool v0.9.22", "src": "git", "version": "1.0.0", "commit": "85cad2ef48f123d7475385b00d113bc900324ad6", "tag": "statemine-v1.0.0", "branch": "wk-gh-actions", - "rustc": "rustc 1.62.0 (...)", + "rustc": "rustc 1.64.0 (...)", "pkg": "statemine-runtime", "tmsp": "2021-06-22T18:08:50Z", "size": "1538747", @@ -151,7 +151,7 @@ The output will look something like: "info": { "generator": { "name": "srtool", - "version": "0.9.21" + "version": "0.9.22" }, "src": "git", "version": "1.0.0", @@ -160,7 +160,7 @@ The output will look something like: "tag": "statemine-v1.0.0", "branch": "wk-gh-actions" }, - "rustc": "rustc 1.62.0 (...)", + "rustc": "rustc 1.64.0 (...)", "pkg": "statemine-runtime", "profile": "release" }, @@ -313,9 +313,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.62.0: +So say you want to build a builder for rustc 1.64.0: - RUSTC_VERSION=1.62.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION . + RUSTC_VERSION=1.64.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION . ## User Scripts @@ -329,7 +329,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.62.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.64.0 info -cM` shows a monochrome output on a single line. ## Build your custom chain / parachain diff --git a/README_src.adoc b/README_src.adoc index 51ec0f9..3a295eb 100644 --- a/README_src.adoc +++ b/README_src.adoc @@ -1,11 +1,11 @@ :name: paritytech/srtool -:rsversion: 1.62.0 -:version: 0.9.21 +:rsversion: 1.64.0 +:version: 0.9.22 // :rsversion: pass:m[include:RUSTC_VERSION[]] // TODO: not working... :toc: right :sectnums: -= Substrate Runtime Toolbox: srtool += Substrate Runtime Toolbox: srtool v{version} image::resources/srtool-docker_128px.png[align=center, width=128px] diff --git a/RUSTC_VERSION b/RUSTC_VERSION index 76d0536..9405730 100644 --- a/RUSTC_VERSION +++ b/RUSTC_VERSION @@ -1 +1 @@ -1.62.0 +1.64.0 diff --git a/VERSION b/VERSION index b216023..ea3f0d7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.21 +0.9.22 From 651898609128a784b3b9672bcbcd47c4f3ff313b Mon Sep 17 00:00:00 2001 From: Wilfried Kopp Date: Tue, 4 Oct 2022 13:30:11 +0200 Subject: [PATCH 2/3] Bump tools (tera & toml) to their latest versions --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c14a3b..1b4bc11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,8 @@ ENV DEBIAN_FRONTEND=noninteractive # Tooling ARG SUBWASM_VERSION=0.18.0 -ARG TERA_CLI_VERSION=0.2.1 -ARG TOML_CLI_VERSION=0.2.1 +ARG TERA_CLI_VERSION=0.2.2 +ARG TOML_CLI_VERSION=0.2.2 COPY ./templates ${SRTOOL_TEMPLATES}/ RUN apt update && \ From b114dd06c73b243d3d1af97a315e23e97c3d27d4 Mon Sep 17 00:00:00 2001 From: Wilfried Kopp Date: Tue, 4 Oct 2022 15:13:40 +0200 Subject: [PATCH 3/3] Add protobuf compiler --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b4bc11..dec1d7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ COPY ./templates ${SRTOOL_TEMPLATES}/ RUN apt update && \ apt upgrade -y && \ apt install --no-install-recommends -y \ - cmake pkg-config libssl-dev make \ + cmake pkg-config libssl-dev make protobuf-compiler \ git clang bsdmainutils ca-certificates curl && \ curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 --output /usr/bin/jq && chmod a+x /usr/bin/jq && \ rm -rf /var/lib/apt/lists/* /tmp/* && apt clean