Skip to content

Commit

Permalink
upgrade rust to 1.77 and bump docker image version (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorPopelyaev authored Apr 19, 2024
1 parent 514560b commit cd32945
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manual-acala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.75.0
default: 1.77.0
required: false
ref:
description: The ref to be used for the repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-fellow-runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
default: paritytech/srtool
srtool_tag:
description: The SRTOOL tag to use
default: 1.75.0
default: 1.77.0
required: false
repo:
description: The repo to be used to build runtimes from
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-moonbeam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.75.0
default: 1.77.0
required: false
ref:
description: The ref to be used for the repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-polkadot-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
default: paritytech/srtool
srtool_tag:
description: The SRTOOL tag to use
default: 1.75.0
default: 1.77.0
repo:
description: The repo to be used to build runtimes from
default: paritytech/polkadot-sdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-shiden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.75.0
default: 1.77.0
required: false
ref:
description: The ref to be used for the repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
inputs:
srtool_tag:
description: The SRTOOL tag to use
default: 1.75.0
default: 1.77.0
required: false
srtool_image:
description: The SRTOOL image to use
Expand Down
2 changes: 1 addition & 1 deletion 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 "[email protected]"
LABEL description="This image contains tools for Substrate blockchains runtimes."

ARG RUSTC_VERSION="1.75.0"
ARG RUSTC_VERSION="1.77.0"
ENV RUSTC_VERSION=$RUSTC_VERSION
ENV DOCKER_IMAGE="paritytech/srtool"
ENV PROFILE=release
Expand Down
42 changes: 19 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Substrate Runtime Toolbox: srtool v0.14.0
# Substrate Runtime Toolbox: srtool v0.15.0

<figure>
<img src="resources/srtool-docker_128px.png" alt="srtool docker 128px" />
</figure>
![srtool docker 128px](resources/srtool-docker_128px.png)

## Intro

Expand All @@ -20,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.75.0-0.14.0`
- `paritytech/srtool:1.77.0-0.15.0`

- `paritytech/srtool:1.75.0`
- `paritytech/srtool:1.77.0`

The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.75.0` is the same image than `paritytech/srtool:1.75.0-0.14.0`.
The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.77.0` is the same image than `paritytech/srtool:1.77.0-0.15.0`.

## Related tools

Expand All @@ -38,9 +36,7 @@ There are a few other helpers you may want to check out when using `srtool`:

- …​ and more to come

<figure>
<img src="resources/Frame%201_256.png" alt="Frame 1 256" />
</figure>
![Frame 1 256](resources/Frame%201_256.png)

`srtool` is a tool for chain builders, it is widely used in CI such as Github Actions, it can also be used by anyone who wants to independently check and audit the runtime of a chain or a parachain.

Expand All @@ -51,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.75.0. It is tagged as v0.14.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.77.0. It is tagged as v0.15.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 +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.75.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.77.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 +91,9 @@ Invoking `srtool build` with

will output something that looks like this:

🧰 Substrate Runtime Toolbox - srtool v0.14.0 🧰
🧰 Substrate Runtime Toolbox - srtool v0.15.0 🧰
- by Chevdor -
🏗 Building polkadot-runtime as release using rustc 1.75.0
🏗 Building polkadot-runtime as release using rustc 1.77.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/learn/architecture/
Expand All @@ -108,7 +104,7 @@ and finally …​

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

{
"gen": "srtool v0.14.0",
"gen": "srtool v0.15.0",
"src": "git",
"version": "1.0.0",
"commit": "85cad2ef48f123d7475385b00d113bc900324ad6",
"tag": "statemine-v1.0.0",
"branch": "wk-gh-actions",
"rustc": "rustc 1.75.0 (...)",
"rustc": "rustc 1.77.0 (...)",
"pkg": "statemine-runtime",
"tmsp": "2021-06-22T18:08:50Z",
"size": "1538747",
Expand All @@ -155,7 +151,7 @@ The output will look something like:
"info": {
"generator": {
"name": "srtool",
"version": "0.14.0"
"version": "0.15.0"
},
"src": "git",
"version": "1.0.0",
Expand All @@ -164,7 +160,7 @@ The output will look something like:
"tag": "statemine-v1.0.0",
"branch": "wk-gh-actions"
},
"rustc": "rustc 1.75.0 (...)",
"rustc": "rustc 1.77.0 (...)",
"pkg": "statemine-runtime",
"profile": "release"
},
Expand Down Expand Up @@ -305,7 +301,7 @@ You can see the list of available scripts in the `/scripts` folder:

- `scan`: Scan a repo for runtimes

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.75.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.77.0 info -cM` shows a monochrome output on a single line.

## Build your custom chain / parachain

Expand Down Expand Up @@ -336,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.75.0-0.14.0` scan
`paritytech/srtool:1.77.0-0.15.0` scan

## ZSH/ Zinit users

Expand Down Expand Up @@ -364,6 +360,6 @@ 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.75.0:
So say you want to build a builder for rustc 1.77.0:

RUSTC_VERSION=1.75.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION .
RUSTC_VERSION=1.77.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION .
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.75.0
:version: 0.14.0
:rsversion: 1.77.0
:version: 0.15.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.75.0
1.77.0
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.0
0.15.0

0 comments on commit cd32945

Please sign in to comment.