Skip to content

Commit f5cc56b

Browse files
authored
Prepare for next rustc version (#70)
* Upgrade to Rust 1.72.0 * Bump srtool version * Upgrade to Rust 1.73.0 * Use ENGINE variable for the container engine * Remove old repos * Remove polkadot and cumulus manual workflows * Remove bridges from test
1 parent 0a72a28 commit f5cc56b

13 files changed

+41
-150
lines changed

.github/workflows/manual-acala.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
inputs:
99
srtool_tag:
1010
description: The SRTOOL tag to use
11-
default: 1.70.0
11+
default: 1.73.0
1212
required: false
1313
ref:
1414
description: The ref to be used for the repo

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
default: paritytech/srtool
1313
srtool_tag:
1414
description: The SRTOOL tag to use
15-
default: 1.70.0
15+
default: 1.73.0
1616
required: false
1717
repo:
1818
description: The repo to be used to build runtimes from

.github/workflows/manual-moonbeam.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
inputs:
99
srtool_tag:
1010
description: The SRTOOL tag to use
11-
default: 1.70.0
11+
default: 1.73.0
1212
required: false
1313
ref:
1414
description: The ref to be used for the repo

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
default: paritytech/srtool
1313
srtool_tag:
1414
description: The SRTOOL tag to use
15-
default: 1.70.0
15+
default: 1.73.0
1616
repo:
1717
description: The repo to be used to build runtimes from
1818
default: paritytech/polkadot-sdk

.github/workflows/manual-shiden.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
inputs:
99
srtool_tag:
1010
description: The SRTOOL tag to use
11-
default: 1.70.0
11+
default: 1.73.0
1212
required: false
1313
ref:
1414
description: The ref to be used for the repo

.github/workflows/manual.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
inputs:
99
srtool_tag:
1010
description: The SRTOOL tag to use
11-
default: 1.70.0
11+
default: 1.73.0
1212
required: false
1313
srtool_image:
1414
description: The SRTOOL image to use

.github/workflows/tests.yml

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -509,113 +509,3 @@ jobs:
509509
cumulus/${{ steps.srtool_build.outputs.wasm }}
510510
cumulus/${{ steps.srtool_build.outputs.wasm_compressed }}
511511
cumulus/${{ matrix.chain }}-srtool-digest.json
512-
513-
bridges:
514-
runs-on: ubuntu-latest
515-
needs: build
516-
continue-on-error: true
517-
strategy:
518-
fail-fast: false
519-
matrix:
520-
chain: ["millau", "rialto"]
521-
steps:
522-
- name: Cache the image
523-
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
524-
with:
525-
key: srtool-docker-image-${{ github.sha }}
526-
path: |
527-
srtool.tar.gz
528-
529-
- name: Load Docker image
530-
run: |
531-
docker load -i srtool.tar.gz
532-
docker images --digests
533-
534-
- name: Check out the Bridges repo
535-
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
536-
with:
537-
repository: paritytech/parity-bridges-common
538-
ref: ${{ github.event.inputs.ref }}
539-
fetch-depth: 0
540-
path: bridges
541-
542-
- name: Run srtool info
543-
env:
544-
PACKAGE: ${{ matrix.chain }}-runtime
545-
RUNTIME_DIR: bin/${{ matrix.chain }}/runtime
546-
working-directory: bridges
547-
run: |
548-
INFO=$(docker run --rm -i \
549-
-e PACKAGE=$PACKAGE \
550-
-e RUNTIME_DIR=$RUNTIME_DIR \
551-
-v "${PWD}":/build \
552-
srtool info -cM)
553-
554-
if [ $( echo $INFO | jq .src -r ) != "git" ] ; then
555-
echo Invalid info output, got $( echo $INFO | jq .src -r )
556-
exit 1
557-
else
558-
echo $INFO
559-
fi
560-
561-
- name: Run srtool build for ${{ matrix.chain }}
562-
id: srtool_build
563-
env:
564-
PACKAGE: ${{ matrix.chain }}-runtime
565-
RUNTIME_DIR: bin/${{ matrix.chain }}/runtime
566-
working-directory: bridges
567-
run: |
568-
CMD="docker run --rm -i \
569-
-e PACKAGE=$PACKAGE \
570-
-e RUNTIME_DIR=$RUNTIME_DIR \
571-
-v ${PWD}:/build \
572-
srtool build --app --json"
573-
echo ::debug::build::docker_run $CMD
574-
575-
echo "::group::SRTOOL Build Output"
576-
stdbuf -oL $CMD | {
577-
while IFS= read -r line
578-
do
579-
echo ║ $line
580-
JSON="$line"
581-
done
582-
583-
echo "json=$JSON" >> $GITHUB_OUTPUT
584-
echo "JSON=$JSON" >> $GITHUB_ENV
585-
586-
echo $JSON | jq .
587-
588-
WASM=`echo $JSON | jq -r .runtimes.compact.wasm`
589-
echo "wasm=$WASM" >> $GITHUB_OUTPUT
590-
591-
Z_WASM=`echo $JSON | jq -r .runtimes.compressed.wasm`
592-
echo "wasm_compressed=$Z_WASM" >> $GITHUB_OUTPUT
593-
}
594-
echo "::endgroup::"
595-
596-
- name: Summary for ${{ matrix.chain }}
597-
working-directory: bridges
598-
run: |
599-
echo "::group::JSON digest"
600-
echo $JSON | jq . | tee ${{ matrix.chain }}-srtool-digest.json
601-
echo "::endgroup::"
602-
603-
echo "::group::Runtimes paths"
604-
echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}"
605-
echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}"
606-
echo "::endgroup::"
607-
608-
echo "::group::Debugging"
609-
pwd; ls -al
610-
ls -al ${{ steps.srtool_build.outputs.wasm_compressed }}
611-
ls -al ${{ steps.srtool_build.outputs.wasm_compressed }}
612-
echo "::endgroup::"
613-
614-
- name: Archive Artifacts for ${{ matrix.chain }}
615-
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
616-
with:
617-
name: ${{ matrix.chain }}-runtime
618-
path: |
619-
bridges/${{ steps.srtool_build.outputs.wasm }}
620-
bridges/${{ steps.srtool_build.outputs.wasm_compressed }}
621-
bridges/${{ matrix.chain }}-srtool-digest.json

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM docker.io/library/ubuntu:22.04
33
LABEL maintainer "[email protected]"
44
LABEL description="This image contains tools for Substrate blockchains runtimes."
55

6-
ARG RUSTC_VERSION="1.70.0"
6+
ARG RUSTC_VERSION="1.73.0"
77
ENV RUSTC_VERSION=$RUSTC_VERSION
88
ENV DOCKER_IMAGE="paritytech/srtool"
99
ENV PROFILE=release

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
# Substrate Runtime Toolbox: srtool v0.11.1
1+
# Substrate Runtime Toolbox: srtool v0.12.0
22

33
<figure>
44
<img src="resources/srtool-docker_128px.png" alt="srtool docker 128px" />
55
</figure>
66

77
## Intro
88

9-
`srtool` is a collection of dockerized tools helping with [Substrate](https://substrate.io) & [Polkadot](https://polkadot.network) Runtime development. `srtool` especially allows building WASM runtimes in a deterministic way, allowing CIs and users, with various machines and OS, to produce a strictly identical WASM runtime.
9+
`srtool` is a collection of containerized tools helping with building WASM Runtimes for the
10+
[Polkadot Network](https://polkadot.network). `srtool` especially allows building WASM runtimes in a
11+
**deterministic** way, allowing CIs and users, with various machines and OS, to produce a strictly identical WASM runtime.
1012

11-
`srtool` can run on various Operating Systems supporting Docker. That includes Linux, MacOS and Windows.
13+
`srtool` can run on various Operating Systems supporting Podman or Docker. That includes Linux, MacOS and Windows.
1214

13-
`srtool` especially helps with building and verifying WASM Runtimes. The Docker image is named `paritytech/srtool`. You can find the project’s repository at <https://hub.docker.com/r/paritytech/srtool>.
15+
`srtool` helps building and verifying WASM Runtimes. The Docker image is named `paritytech/srtool`. You can find the project’s repository at <https://hub.docker.com/r/paritytech/srtool>.
1416

1517
## Docker image naming scheme
1618

1719
The Docker images are tagged with both the rustc version used internally as well as the version of the build script.
1820

1921
You may find for instance the following:
2022

21-
- `paritytech/srtool:1.70.0-0.9.19`
23+
- `paritytech/srtool:1.73.0-0.12.0`
2224

23-
- `paritytech/srtool:1.70.0-0.11.1`
25+
- `paritytech/srtool:1.73.0`
2426

25-
- `paritytech/srtool:1.70.0`
26-
27-
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.1`.
27+
The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.73.0` is the same image than `paritytech/srtool:1.73.0-0.12.0`.
2828

2929
## Related tools
3030

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

54-
The last version hosted on Gitlab has been built using Rust Stable 1.70.0. It is tagged as v0.11.1 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.
54+
The last version hosted on Gitlab has been built using Rust Stable 1.73.0. It is tagged as v0.12.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.
5555

5656
## Install
5757

@@ -67,7 +67,7 @@ This method is legacy and deprecated. It is recommended to use the `srtool-cli`
6767

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

70-
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'
70+
export RUSTC_VERSION=1.73.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'
7171

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

@@ -95,9 +95,9 @@ Invoking `srtool build` with
9595

9696
will output something that looks like this:
9797

98-
🧰 Substrate Runtime Toolbox - srtool v0.11.1 🧰
98+
🧰 Substrate Runtime Toolbox - srtool v0.12.0 🧰
9999
- by Chevdor -
100-
🏗 Building polkadot-runtime as release using rustc 1.70.0
100+
🏗 Building polkadot-runtime as release using rustc 1.73.0
101101
⏳ That can take a little while, be patient... subsequent builds will be faster.
102102
Since you have to wait a little, you may want to learn more about Substrate runtimes:
103103
https://docs.substrate.io/learn/architecture/
@@ -108,7 +108,7 @@ and finally …​
108108

109109
✨ Your Substrate WASM Runtime is ready! ✨
110110
Summary:
111-
Generator : srtool v0.11.1
111+
Generator : srtool v0.12.0
112112
Version : null
113113
GIT commit : 56b9e95a9b634695f59a7c699bc68a5cfb695f03
114114
GIT tag : moonriver-genesis
@@ -138,13 +138,13 @@ If you prefer a json output, srtool has you covered:
138138
The output will look something like:
139139

140140
{
141-
"gen": "srtool v0.11.1",
141+
"gen": "srtool v0.12.0",
142142
"src": "git",
143143
"version": "1.0.0",
144144
"commit": "85cad2ef48f123d7475385b00d113bc900324ad6",
145145
"tag": "statemine-v1.0.0",
146146
"branch": "wk-gh-actions",
147-
"rustc": "rustc 1.70.0 (...)",
147+
"rustc": "rustc 1.73.0 (...)",
148148
"pkg": "statemine-runtime",
149149
"tmsp": "2021-06-22T18:08:50Z",
150150
"size": "1538747",
@@ -155,7 +155,7 @@ The output will look something like:
155155
"info": {
156156
"generator": {
157157
"name": "srtool",
158-
"version": "0.11.1"
158+
"version": "0.12.0"
159159
},
160160
"src": "git",
161161
"version": "1.0.0",
@@ -164,7 +164,7 @@ The output will look something like:
164164
"tag": "statemine-v1.0.0",
165165
"branch": "wk-gh-actions"
166166
},
167-
"rustc": "rustc 1.70.0 (...)",
167+
"rustc": "rustc 1.73.0 (...)",
168168
"pkg": "statemine-runtime",
169169
"profile": "release"
170170
},
@@ -305,7 +305,7 @@ You can see the list of available scripts in the `/scripts` folder:
305305

306306
- `scan`: Scan a repo for runtimes
307307

308-
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.
308+
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.73.0 info -cM` shows a monochrome output on a single line.
309309

310310
## Build your custom chain / parachain
311311

@@ -336,7 +336,7 @@ If you mount this docker volume, you will find the wasm on your local filesystem
336336
# REPO=fellowship-runtimes
337337
podman run --rm -it \
338338
-v $REPO:/build \
339-
`paritytech/srtool:1.70.0-0.11.1` scan
339+
`paritytech/srtool:1.73.0-0.12.0` scan
340340

341341
## ZSH/ Zinit users
342342

@@ -364,6 +364,6 @@ First you may want to double check what rustc versions are available as you will
364364

365365
rustup check
366366

367-
So say you want to build a builder for rustc 1.70.0:
367+
So say you want to build a builder for rustc 1.73.0:
368368

369-
RUSTC_VERSION=1.70.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION .
369+
RUSTC_VERSION=1.73.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION .

README_src.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:name: paritytech/srtool
2-
:rsversion: 1.70.0
3-
:version: 0.11.1
2+
:rsversion: 1.73.0
3+
:version: 0.12.0
44
// :rsversion: pass:m[include:RUSTC_VERSION[]] // TODO: not working...
55
:toc: right
66
:sectnums:
@@ -11,19 +11,20 @@ image::resources/srtool-docker_128px.png[align=center, width=128px]
1111

1212
== Intro
1313

14-
`srtool` is a collection of dockerized tools helping with https://substrate.io[Substrate] & https://polkadot.network[Polkadot] Runtime development. `srtool` especially allows building WASM runtimes in a deterministic way, allowing CIs and users, with various machines and OS, to produce a strictly identical WASM runtime.
14+
`srtool` is a collection of containerized tools helping with building WASM Runtimes for the
15+
https://polkadot.network[Polkadot Network]. `srtool` especially allows building WASM runtimes in a
16+
**deterministic** way, allowing CIs and users, with various machines and OS, to produce a strictly identical WASM runtime.
1517

16-
`srtool` can run on various Operating Systems supporting Docker. That includes Linux, MacOS and Windows.
18+
`srtool` can run on various Operating Systems supporting Podman or Docker. That includes Linux, MacOS and Windows.
1719

18-
`srtool` especially helps with building and verifying WASM Runtimes. The Docker image is named `{name}`. You can find the project's repository at https://hub.docker.com/r/{name}.
20+
`srtool` helps building and verifying WASM Runtimes. The Docker image is named `{name}`. You can find the project's repository at https://hub.docker.com/r/{name}.
1921

2022
== Docker image naming scheme
2123

2224
The Docker images are tagged with both the rustc version used internally as well as the version of the build script.
2325

2426
You may find for instance the following:
2527

26-
- `{name}:{rsversion}-0.9.19`
2728
- `{name}:{rsversion}-{version}`
2829
- `{name}:{rsversion}`
2930

RUSTC_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.70.0
1+
1.73.0

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.1
1+
0.12.0

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ build:
1717
@echo Building $REPO:$RUSTC_VERSION
1818
@echo If you encounter issues, try running `just cleanup` and try building again.
1919
@echo Any arg you pass is forward to 'podman build'... You can pass'`--no-cache' for instance
20-
podman build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION \
20+
$ENGINE build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION \
2121
-t $REGISTRY/chevdor/srtool:$RUSTC_VERSION-$TAG-$COMMIT \
2222
-t $REGISTRY/$REPO:$RUSTC_VERSION-$TAG \
2323
-t $REGISTRY/$REPO \
2424
-t $REGISTRY/${REPO#*/} \
2525
.
26-
podman images | grep srtool
26+
$ENGINE images | grep srtool
2727

2828
# Build and Publish the container image
2929
publish: build
3030
@echo Pushing podman image $REPO:$RUSTC_VERSION
31-
podman push $REGISTRY/$REPO:$RUSTC_VERSION
31+
$ENGINE push $REGISTRY/$REPO:$RUSTC_VERSION
3232

3333
# Set a git tag
3434
tag:

0 commit comments

Comments
 (0)