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 15dff1ad0a
commit 41ea3148ec
5 changed files with 49 additions and 3 deletions
+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