ci: add wasm32v1-none target and SKIP_WASM_BUILD to fix serde_core duplicate alloc error

The paritytech CI container lacks the wasm32v1-none target, causing
wasm-builder to fall back to wasm32-unknown-unknown with -Z build-std.
Combined with our serde_core fork, this creates a duplicate lang item
error for alloc crate.

Fix: Add rustup target add wasm32v1-none to all WASM-building jobs.
For check-only jobs (bench checks, docs, each-crate), add SKIP_WASM_BUILD=1.

Also fixes test-deterministic-wasm wasm blob path to work with either target.
This commit is contained in:
2026-02-23 02:52:20 +03:00
parent c5ce61616e
commit 7a4baa3ac8
5 changed files with 49 additions and 3 deletions
@@ -48,6 +48,8 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Configure git safe.directory
run: git config --global --add safe.directory '*'
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
id: required
run: |
@@ -101,6 +103,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
id: required
run: |
@@ -135,6 +139,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
id: required
run: |
@@ -171,6 +177,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
id: required
run: |
@@ -208,6 +216,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
id: required
run: |
@@ -246,6 +256,8 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Configure git safe.directory
run: git config --global --add safe.directory '*'
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
id: required
run: |
@@ -287,6 +299,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
id: required
run: |
@@ -328,6 +342,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
run: |
cargo build --locked --profile testnet -p pezkuwi-test-malus --bin malus --bin pezkuwi-prepare-worker --bin pezkuwi-execute-worker
@@ -358,6 +374,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
run: |
cargo nextest --manifest-path pezkuwi/zombienet-sdk-tests/Cargo.toml archive --locked --features zombie-metadata,zombie-ci --archive-file pezkuwi-zombienet-tests.tar.zst
@@ -388,6 +406,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
run: |
cargo nextest --manifest-path pezcumulus/zombienet/zombienet-sdk/Cargo.toml archive --locked --features zombie-ci --archive-file pezcumulus-zombienet-tests.tar.zst
@@ -415,6 +435,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: build
run: |
cargo nextest --manifest-path templates/zombienet/Cargo.toml archive --locked --features zombienet --archive-file teyrchain-templates-zombienet-tests.tar.zst
@@ -34,6 +34,9 @@ jobs:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: Clean cargo cache to free disk space
run: |
cargo clean 2>/dev/null || true
@@ -86,6 +89,9 @@ jobs:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: script (benchmark ${{ matrix.bench_cmd }})
id: required
shell: bash
+2
View File
@@ -28,6 +28,7 @@ jobs:
volumes:
- /cache/cargo-target/pezkuwi-sdk-docs:/cache/target
env:
SKIP_WASM_BUILD: 1
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
CARGO_INCREMENTAL: 0
CARGO_TARGET_DIR: /cache/target
@@ -67,6 +68,7 @@ jobs:
volumes:
- /cache/cargo-target/pezkuwi-sdk-docs:/cache/target
env:
SKIP_WASM_BUILD: 1
CARGO_INCREMENTAL: 0
CARGO_TARGET_DIR: /cache/target
RUSTDOCFLAGS: "-Dwarnings --default-theme=ayu --html-in-header ./docs/sdk/assets/header.html --extend-css ./docs/sdk/assets/theme.css --html-after-content ./docs/sdk/assets/after-content.html"
+12 -2
View File
@@ -113,6 +113,9 @@ jobs:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: Clean cargo cache to free disk space
run: |
cargo clean 2>/dev/null || true
@@ -123,8 +126,8 @@ jobs:
run: |
# build runtime
cargo build -q --locked --release -p zagros-runtime -p pezkuwichain-runtime
# make checksum
sha256sum target/release/wbuild/*-runtime/target/wasm32-unknown-unknown/release/*.wasm > checksum.sha256
# make checksum — find wasm blobs regardless of target triple
find target/release/wbuild/ -name '*.wasm' -path '*/release/*' | sort | xargs sha256sum > checksum.sha256
cargo clean
# build again
cargo build -q --locked --release -p zagros-runtime -p pezkuwichain-runtime
@@ -250,6 +253,9 @@ jobs:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: Clean cargo cache to free disk space
run: |
cargo clean 2>/dev/null || true
@@ -305,6 +311,9 @@ jobs:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: script
run: |
cargo build --locked -p zagros-runtime --features metadata-hash
@@ -361,6 +370,7 @@ jobs:
RUSTFLAGS: "-D warnings"
CI_JOB_NAME: cargo-check-each-crate
CARGO_INCREMENTAL: 0
SKIP_WASM_BUILD: 1
strategy:
matrix:
index: [1, 2, 3, 4] # Reduced from 7 to 4 parallel jobs to lower system load
+7 -1
View File
@@ -36,6 +36,9 @@ jobs:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: Rust Cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
with:
@@ -57,6 +60,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install wasm32v1-none target
run: rustup target add wasm32v1-none
- name: script
id: test
run: |
@@ -77,6 +82,7 @@ jobs:
container:
image: ${{ needs.preflight.outputs.IMAGE }}
env:
SKIP_WASM_BUILD: 1
CARGO_INCREMENTAL: 0
steps:
- name: Checkout
@@ -90,4 +96,4 @@ jobs:
- name: script
run: |
cargo check --workspace --benches --features runtime-benchmarks --quiet
cargo check --workspace --locked --benches --features runtime-benchmarks --quiet