Commit 5598ed9b authored by Pierre Krieger's avatar Pierre Krieger Committed by Gavin Wood
Browse files

Add WASM CI checks and make availability-store compile for WASM (#626)

* Make availability-store compile for WASM

* Use --manifest-path instead
parent 6eb9c71f
...@@ -131,6 +131,23 @@ test-linux-stable: &test ...@@ -131,6 +131,23 @@ test-linux-stable: &test
- sccache -s - 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 build-linux-release: &build
......
...@@ -12,5 +12,7 @@ log = "0.4.8" ...@@ -12,5 +12,7 @@ log = "0.4.8"
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] } 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" } substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
kvdb = "0.1.1" kvdb = "0.1.1"
kvdb-rocksdb = "0.2"
kvdb-memorydb = "0.1.2" kvdb-memorydb = "0.1.2"
[target.'cfg(not(target_os = "unknown"))'.dependencies]
kvdb-rocksdb = "0.2"
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
use codec::{Encode, Decode}; use codec::{Encode, Decode};
use kvdb::{KeyValueDB, DBTransaction}; use kvdb::{KeyValueDB, DBTransaction};
use kvdb_rocksdb::{Database, DatabaseConfig};
use polkadot_primitives::Hash; use polkadot_primitives::Hash;
use polkadot_primitives::parachain::{Id as ParaId, BlockData, Message}; use polkadot_primitives::parachain::{Id as ParaId, BlockData, Message};
use log::warn; use log::warn;
...@@ -74,7 +73,9 @@ pub struct Store { ...@@ -74,7 +73,9 @@ pub struct Store {
impl Store { impl Store {
/// Create a new `Store` with given config on disk. /// Create a new `Store` with given config on disk.
#[cfg(not(target_os = "unknown"))]
pub fn new(config: Config) -> io::Result<Self> { pub fn new(config: Config) -> io::Result<Self> {
use kvdb_rocksdb::{Database, DatabaseConfig};
let mut db_config = DatabaseConfig::with_columns(Some(columns::NUM_COLUMNS)); let mut db_config = DatabaseConfig::with_columns(Some(columns::NUM_COLUMNS));
if let Some(cache_size) = config.cache_size { if let Some(cache_size) = config.cache_size {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment