mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
Make sure frame examples compile for wasm (#5332)
* Make sure frame examples compile for wasm This makes sure that `frame-example` and `frame-example-offchain-worker` compile for wasm. This also fixes compilation for these crates. The offchain worker example doesn't use serde-json anymore as that is too heavy and breaks `no_std` compilation. * Apply suggestions from code review Co-Authored-By: Nikolay Volf <nikvolf@gmail.com> Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
@@ -214,6 +214,24 @@ test-frame-staking:
|
||||
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features std
|
||||
- sccache -s
|
||||
|
||||
test-frame-examples-compile-to-wasm:
|
||||
stage: test
|
||||
<<: *docker-env
|
||||
variables:
|
||||
# Enable debug assertions since we are running optimized builds for testing
|
||||
# but still want to have debug assertions.
|
||||
RUSTFLAGS: -Cdebug-assertions=y
|
||||
RUST_BACKTRACE: 1
|
||||
except:
|
||||
variables:
|
||||
- $DEPLOY_TAG
|
||||
script:
|
||||
- cd frame/example-offchain-worker/
|
||||
- cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
|
||||
- cd ../example
|
||||
- cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
|
||||
- sccache -s
|
||||
|
||||
test-wasmtime:
|
||||
stage: test
|
||||
<<: *docker-env
|
||||
|
||||
Reference in New Issue
Block a user