From c77336e31fb6b8dd7ab88e57ac79e457f370ea11 Mon Sep 17 00:00:00 2001 From: Antonio Antonino Date: Mon, 2 Dec 2024 09:05:00 +0100 Subject: [PATCH 1/3] Update relevant files --- .gitlab-ci.yml | 5 ++++- rust-toolchain.toml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7179cedf1..e8d3061b43 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,8 @@ stages: build-production-wasm: image: - name: paritytech/srtool:1.75.0 + # Use srtool image that has the right subwasm fix. The first version with the fix is subwasm 0.17.0, available only with rustc 1.81.0. + name: paritytech/srtool:1.81.0-0.17.0 entrypoint: [""] stage: build parallel: @@ -21,6 +22,8 @@ build-production-wasm: - export AUTHORIZE_UPGRADE_PREFIX=0x02 - export AUTHORIZE_UPGRADE_CHECK_VERSION=true - export VERBOSE=true + # Must be in sync with the toolchain file in the project root. + - export RUSTC_VERSION=1.74.0 - cp -r * /build - /srtool/build build - subwasm meta --format=json+scale /out/${RUNTIME}_runtime.compact.wasm > /out/${RUNTIME}-metadata.json diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bd89201550..6081d95e1a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,5 @@ [toolchain] +# When changing this, please update the RUSTC_VERSION variable of the `build-production-wasm` Gitlab pipeline. channel = "1.74.0" components = ["clippy", "rust-src", "rustfmt"] targets = ["wasm32-unknown-unknown"] From 7b5050ab4841a89b6ef8f2494b084f7838ddf888 Mon Sep 17 00:00:00 2001 From: Antonio Antonino Date: Mon, 2 Dec 2024 09:14:50 +0100 Subject: [PATCH 2/3] Install WASM32 target for srtool build --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8d3061b43..a993ee1e48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,6 +25,8 @@ build-production-wasm: # Must be in sync with the toolchain file in the project root. - export RUSTC_VERSION=1.74.0 - cp -r * /build + # Required since we are overriding `RUSTC_VERSION` + - rustup target add wasm32-unknown-unknown - /srtool/build build - subwasm meta --format=json+scale /out/${RUNTIME}_runtime.compact.wasm > /out/${RUNTIME}-metadata.json - subwasm get -o ${RUNTIME}-live.wasm wss://${RUNTIME}.kilt.io From 19d0b1f9d80e3dbe930239b9b1dd164359285d00 Mon Sep 17 00:00:00 2001 From: Antonio Antonino Date: Mon, 2 Dec 2024 09:34:05 +0100 Subject: [PATCH 3/3] Reorder --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a993ee1e48..3f0f4023d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,9 +24,9 @@ build-production-wasm: - export VERBOSE=true # Must be in sync with the toolchain file in the project root. - export RUSTC_VERSION=1.74.0 - - cp -r * /build # Required since we are overriding `RUSTC_VERSION` - rustup target add wasm32-unknown-unknown + - cp -r * /build - /srtool/build build - subwasm meta --format=json+scale /out/${RUNTIME}_runtime.compact.wasm > /out/${RUNTIME}-metadata.json - subwasm get -o ${RUNTIME}-live.wasm wss://${RUNTIME}.kilt.io