diff --git a/substrate/.gitlab-ci.yml b/substrate/.gitlab-ci.yml index ede9f2fd7d..dee459cea7 100644 --- a/substrate/.gitlab-ci.yml +++ b/substrate/.gitlab-ci.yml @@ -357,20 +357,15 @@ check_polkadot: <<: *docker-env allow_failure: true script: - - COMMIT_HASH=$(git rev-parse HEAD) - SUBSTRATE_PATH=$(pwd) # Clone the current Polkadot master branch into ./polkadot. - git clone --depth 1 https://gitlab.parity.io/parity/polkadot.git - cd polkadot - # Within Polkadot 'master' alter each Cargo.toml that references the - # Substrate 'polkadot-master' branch: - # 1. Replace the 'branch = "polkadot-master"' statements with the rev of our - # commit. - # 2. Replace 'git = "https://.*"' with 'git = "file://.*"' (the local - # checked out Substrate repository one folder above). - # 3. Remove any trailing commas. - - git grep -l "polkadot-master" | grep toml | xargs sed -i "s/branch.*=.*\"polkadot-master\"/rev = \"$COMMIT_HASH\"/; s~https://github.com/paritytech/substrate~file://$SUBSTRATE_PATH~; s/,\s*}/ }/" - # Make sure 'Cargo.lock' matches 'Cargo.toml'. It's enough to update one + # Make sure we override the crates in native and wasm build + - mkdir .cargo + - echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config + - mkdir -p target/debug/wbuild/.cargo + - echo "paths = [ \"$SUBSTRATE_PATH\" ]" > target/debug/wbuild/.cargo/config # package, others are updated along the way. - cargo update -p sp-io # Check whether Polkadot 'master' branch builds with this Substrate commit. diff --git a/substrate/utils/wasm-builder/src/wasm_project.rs b/substrate/utils/wasm-builder/src/wasm_project.rs index 701a50fe1c..bb32d62218 100644 --- a/substrate/utils/wasm-builder/src/wasm_project.rs +++ b/substrate/utils/wasm-builder/src/wasm_project.rs @@ -181,6 +181,7 @@ fn create_wasm_workspace_project(wasm_workspace: &Path, cargo_manifest: &Path) { .map(|d| d.into_path()) .filter(|p| p.is_dir() && !p.ends_with("target")) .filter_map(|p| p.file_name().map(|f| f.to_owned()).and_then(|s| s.into_string().ok())) + .filter(|f| !f.starts_with(".")) .collect::>(); let crate_metadata = MetadataCommand::new()