mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Fix check_polkadot CI check (#4317)
* Fix `check_polkadot` CI check * Another try * Use path overrides * Last fix * Update .gitlab-ci.yml * Fix wasm builder * Update wasm_project.rs
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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::<Vec<_>>();
|
||||
|
||||
let crate_metadata = MetadataCommand::new()
|
||||
|
||||
Reference in New Issue
Block a user