mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Add WASM CI checks and make availability-store compile for WASM (#626)
* Make availability-store compile for WASM * Use --manifest-path instead
This commit is contained in:
committed by
Gavin Wood
parent
33eb0b7ba6
commit
ed7ee57290
+19
-2
@@ -40,7 +40,7 @@ variables:
|
||||
.docker-env: &docker-env
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
when:
|
||||
- runner_system_failure
|
||||
- unknown_failure
|
||||
- api_failure
|
||||
@@ -131,6 +131,23 @@ test-linux-stable: &test
|
||||
- sccache -s
|
||||
|
||||
|
||||
check-web-wasm: &test
|
||||
stage: test
|
||||
<<: *test-refs
|
||||
<<: *docker-env
|
||||
<<: *compiler_info
|
||||
script:
|
||||
# WASM support is in progress. As more and more crates support WASM, we
|
||||
# should add entries here. See https://github.com/paritytech/polkadot/issues/625
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path availability-store/Cargo.toml
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path executor/Cargo.toml
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path erasure-coding/Cargo.toml
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path parachain/Cargo.toml
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path primitives/Cargo.toml
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path rpc/Cargo.toml
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path runtime/Cargo.toml
|
||||
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path statement-table/Cargo.toml
|
||||
- sccache -s
|
||||
|
||||
|
||||
build-linux-release: &build
|
||||
@@ -209,7 +226,7 @@ publish-docker-release:
|
||||
- docker build
|
||||
--build-arg VCS_REF="${CI_COMMIT_SHA}"
|
||||
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
|
||||
--tag $CONTAINER_IMAGE:$VERSION
|
||||
--tag $CONTAINER_IMAGE:$VERSION
|
||||
--tag $CONTAINER_IMAGE:$EXTRATAG .
|
||||
- docker push $CONTAINER_IMAGE:$VERSION
|
||||
- docker push $CONTAINER_IMAGE:$EXTRATAG
|
||||
|
||||
@@ -12,5 +12,7 @@ log = "0.4.8"
|
||||
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
|
||||
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
|
||||
kvdb = "0.1.1"
|
||||
kvdb-rocksdb = "0.2"
|
||||
kvdb-memorydb = "0.1.2"
|
||||
|
||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
kvdb-rocksdb = "0.2"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
use codec::{Encode, Decode};
|
||||
use kvdb::{KeyValueDB, DBTransaction};
|
||||
use kvdb_rocksdb::{Database, DatabaseConfig};
|
||||
use polkadot_primitives::Hash;
|
||||
use polkadot_primitives::parachain::{Id as ParaId, BlockData, Message};
|
||||
use log::warn;
|
||||
@@ -74,7 +73,9 @@ pub struct Store {
|
||||
|
||||
impl Store {
|
||||
/// Create a new `Store` with given config on disk.
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
pub fn new(config: Config) -> io::Result<Self> {
|
||||
use kvdb_rocksdb::{Database, DatabaseConfig};
|
||||
let mut db_config = DatabaseConfig::with_columns(Some(columns::NUM_COLUMNS));
|
||||
|
||||
if let Some(cache_size) = config.cache_size {
|
||||
|
||||
Reference in New Issue
Block a user