diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7179cedf..3f0f4023d 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,10 @@ 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 + # 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 diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bd8920155..6081d95e1 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"]