diff --git a/.github/workflows/manual-acala.yml b/.github/workflows/manual-acala.yml index d735134..dfea163 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.70.0 + default: 1.73.0 required: false ref: description: The ref to be used for the repo diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index ad46947..b6f8aed 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -12,7 +12,7 @@ on: default: paritytech/srtool srtool_tag: description: The SRTOOL tag to use - default: 1.70.0 + default: 1.73.0 required: false repo: description: The repo to be used to build runtimes from diff --git a/.github/workflows/manual-moonbeam.yml b/.github/workflows/manual-moonbeam.yml index d87b582..5b2c063 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.70.0 + default: 1.73.0 required: false ref: description: The ref to be used for the repo diff --git a/.github/workflows/manual-polkadot-sdk.yml b/.github/workflows/manual-polkadot-sdk.yml index 7da149b..801b82a 100644 --- a/.github/workflows/manual-polkadot-sdk.yml +++ b/.github/workflows/manual-polkadot-sdk.yml @@ -12,7 +12,7 @@ on: default: paritytech/srtool srtool_tag: description: The SRTOOL tag to use - default: 1.70.0 + default: 1.73.0 repo: description: The repo to be used to build runtimes from default: paritytech/polkadot-sdk diff --git a/.github/workflows/manual-shiden.yml b/.github/workflows/manual-shiden.yml index 066a24f..7996954 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.70.0 + default: 1.73.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 aec1c04..54bc336 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.70.0 + default: 1.73.0 required: false srtool_image: description: The SRTOOL image to use diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 08d65eb..7a83389 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -509,113 +509,3 @@ jobs: cumulus/${{ steps.srtool_build.outputs.wasm }} cumulus/${{ steps.srtool_build.outputs.wasm_compressed }} cumulus/${{ matrix.chain }}-srtool-digest.json - - bridges: - runs-on: ubuntu-latest - needs: build - continue-on-error: true - strategy: - fail-fast: false - matrix: - chain: ["millau", "rialto"] - steps: - - name: Cache the image - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11 - with: - key: srtool-docker-image-${{ github.sha }} - path: | - srtool.tar.gz - - - name: Load Docker image - run: | - docker load -i srtool.tar.gz - docker images --digests - - - name: Check out the Bridges repo - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - repository: paritytech/parity-bridges-common - ref: ${{ github.event.inputs.ref }} - fetch-depth: 0 - path: bridges - - - name: Run srtool info - env: - PACKAGE: ${{ matrix.chain }}-runtime - RUNTIME_DIR: bin/${{ matrix.chain }}/runtime - working-directory: bridges - run: | - INFO=$(docker run --rm -i \ - -e PACKAGE=$PACKAGE \ - -e RUNTIME_DIR=$RUNTIME_DIR \ - -v "${PWD}":/build \ - srtool info -cM) - - if [ $( echo $INFO | jq .src -r ) != "git" ] ; then - echo Invalid info output, got $( echo $INFO | jq .src -r ) - exit 1 - else - echo $INFO - fi - - - name: Run srtool build for ${{ matrix.chain }} - id: srtool_build - env: - PACKAGE: ${{ matrix.chain }}-runtime - RUNTIME_DIR: bin/${{ matrix.chain }}/runtime - working-directory: bridges - run: | - CMD="docker run --rm -i \ - -e PACKAGE=$PACKAGE \ - -e RUNTIME_DIR=$RUNTIME_DIR \ - -v ${PWD}:/build \ - srtool build --app --json" - echo ::debug::build::docker_run $CMD - - echo "::group::SRTOOL Build Output" - stdbuf -oL $CMD | { - while IFS= read -r line - do - echo ║ $line - JSON="$line" - done - - echo "json=$JSON" >> $GITHUB_OUTPUT - echo "JSON=$JSON" >> $GITHUB_ENV - - echo $JSON | jq . - - WASM=`echo $JSON | jq -r .runtimes.compact.wasm` - echo "wasm=$WASM" >> $GITHUB_OUTPUT - - Z_WASM=`echo $JSON | jq -r .runtimes.compressed.wasm` - echo "wasm_compressed=$Z_WASM" >> $GITHUB_OUTPUT - } - echo "::endgroup::" - - - name: Summary for ${{ matrix.chain }} - working-directory: bridges - run: | - echo "::group::JSON digest" - echo $JSON | jq . | tee ${{ matrix.chain }}-srtool-digest.json - echo "::endgroup::" - - echo "::group::Runtimes paths" - echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}" - echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}" - echo "::endgroup::" - - echo "::group::Debugging" - pwd; ls -al - ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} - ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} - echo "::endgroup::" - - - name: Archive Artifacts for ${{ matrix.chain }} - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 - with: - name: ${{ matrix.chain }}-runtime - path: | - bridges/${{ steps.srtool_build.outputs.wasm }} - bridges/${{ steps.srtool_build.outputs.wasm_compressed }} - bridges/${{ matrix.chain }}-srtool-digest.json diff --git a/Dockerfile b/Dockerfile index 0f19504..313280f 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.70.0" +ARG RUSTC_VERSION="1.73.0" ENV RUSTC_VERSION=$RUSTC_VERSION ENV DOCKER_IMAGE="paritytech/srtool" ENV PROFILE=release diff --git a/README.md b/README.md index a8829c8..1982a05 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Substrate Runtime Toolbox: srtool v0.11.1 +# Substrate Runtime Toolbox: srtool v0.12.0
srtool docker 128px @@ -6,11 +6,13 @@ ## Intro -`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. +`srtool` is a collection of containerized tools helping with building WASM Runtimes for the +[Polkadot Network](https://polkadot.network). `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. -`srtool` can run on various Operating Systems supporting Docker. That includes Linux, MacOS and Windows. +`srtool` can run on various Operating Systems supporting Podman or Docker. That includes Linux, MacOS and Windows. -`srtool` especially helps with building and verifying WASM Runtimes. The Docker image is named `paritytech/srtool`. You can find the project’s repository at . +`srtool` helps building and verifying WASM Runtimes. The Docker image is named `paritytech/srtool`. You can find the project’s repository at . ## Docker image naming scheme @@ -18,13 +20,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.70.0-0.9.19` +- `paritytech/srtool:1.73.0-0.12.0` -- `paritytech/srtool:1.70.0-0.11.1` +- `paritytech/srtool:1.73.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.70.0` is the same image than `paritytech/srtool:1.70.0-0.11.1`. +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`. ## Related tools @@ -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 . 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.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@` and will be updated to point at the paritytech image. +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@` and will be updated to point at the paritytech image. ## Install @@ -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.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' + 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' 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. @@ -95,9 +95,9 @@ Invoking `srtool build` with will output something that looks like this: - 🧰 Substrate Runtime Toolbox - srtool v0.11.1 🧰 + 🧰 Substrate Runtime Toolbox - srtool v0.12.0 🧰 - by Chevdor - - 🏗 Building polkadot-runtime as release using rustc 1.70.0 + 🏗 Building polkadot-runtime as release using rustc 1.73.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/ @@ -108,7 +108,7 @@ and finally …​ ✨ Your Substrate WASM Runtime is ready! ✨ Summary: - Generator : srtool v0.11.1 + Generator : srtool v0.12.0 Version : null GIT commit : 56b9e95a9b634695f59a7c699bc68a5cfb695f03 GIT tag : moonriver-genesis @@ -138,13 +138,13 @@ If you prefer a json output, srtool has you covered: The output will look something like: { - "gen": "srtool v0.11.1", + "gen": "srtool v0.12.0", "src": "git", "version": "1.0.0", "commit": "85cad2ef48f123d7475385b00d113bc900324ad6", "tag": "statemine-v1.0.0", "branch": "wk-gh-actions", - "rustc": "rustc 1.70.0 (...)", + "rustc": "rustc 1.73.0 (...)", "pkg": "statemine-runtime", "tmsp": "2021-06-22T18:08:50Z", "size": "1538747", @@ -155,7 +155,7 @@ The output will look something like: "info": { "generator": { "name": "srtool", - "version": "0.11.1" + "version": "0.12.0" }, "src": "git", "version": "1.0.0", @@ -164,7 +164,7 @@ The output will look something like: "tag": "statemine-v1.0.0", "branch": "wk-gh-actions" }, - "rustc": "rustc 1.70.0 (...)", + "rustc": "rustc 1.73.0 (...)", "pkg": "statemine-runtime", "profile": "release" }, @@ -305,7 +305,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.70.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.73.0 info -cM` shows a monochrome output on a single line. ## Build your custom chain / parachain @@ -336,7 +336,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.70.0-0.11.1` scan + `paritytech/srtool:1.73.0-0.12.0` scan ## ZSH/ Zinit users @@ -364,6 +364,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.70.0: +So say you want to build a builder for rustc 1.73.0: - RUSTC_VERSION=1.70.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION . + RUSTC_VERSION=1.73.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION . diff --git a/README_src.adoc b/README_src.adoc index 4078f93..0b12b52 100644 --- a/README_src.adoc +++ b/README_src.adoc @@ -1,6 +1,6 @@ :name: paritytech/srtool -:rsversion: 1.70.0 -:version: 0.11.1 +:rsversion: 1.73.0 +:version: 0.12.0 // :rsversion: pass:m[include:RUSTC_VERSION[]] // TODO: not working... :toc: right :sectnums: @@ -11,11 +11,13 @@ image::resources/srtool-docker_128px.png[align=center, width=128px] == Intro -`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. +`srtool` is a collection of containerized tools helping with building WASM Runtimes for the +https://polkadot.network[Polkadot Network]. `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. -`srtool` can run on various Operating Systems supporting Docker. That includes Linux, MacOS and Windows. +`srtool` can run on various Operating Systems supporting Podman or Docker. That includes Linux, MacOS and Windows. -`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}. +`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}. == Docker image naming scheme @@ -23,7 +25,6 @@ The Docker images are tagged with both the rustc version used internally as well You may find for instance the following: -- `{name}:{rsversion}-0.9.19` - `{name}:{rsversion}-{version}` - `{name}:{rsversion}` diff --git a/RUSTC_VERSION b/RUSTC_VERSION index 832e9af..5e3a425 100644 --- a/RUSTC_VERSION +++ b/RUSTC_VERSION @@ -1 +1 @@ -1.70.0 +1.73.0 diff --git a/VERSION b/VERSION index af88ba8..ac454c6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.11.1 +0.12.0 diff --git a/justfile b/justfile index 4eda437..44b1a24 100644 --- a/justfile +++ b/justfile @@ -17,18 +17,18 @@ build: @echo Building $REPO:$RUSTC_VERSION @echo If you encounter issues, try running `just cleanup` and try building again. @echo Any arg you pass is forward to 'podman build'... You can pass'`--no-cache' for instance - podman build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION \ + $ENGINE build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION \ -t $REGISTRY/chevdor/srtool:$RUSTC_VERSION-$TAG-$COMMIT \ -t $REGISTRY/$REPO:$RUSTC_VERSION-$TAG \ -t $REGISTRY/$REPO \ -t $REGISTRY/${REPO#*/} \ . - podman images | grep srtool + $ENGINE images | grep srtool # Build and Publish the container image publish: build @echo Pushing podman image $REPO:$RUSTC_VERSION - podman push $REGISTRY/$REPO:$RUSTC_VERSION + $ENGINE push $REGISTRY/$REPO:$RUSTC_VERSION # Set a git tag tag: