Use diener for Polkadot companion prs (#7102)

* Use diener for Polkadot companion prs

* Fix script

* Use gitlab env variable

* Update .maintain/gitlab/check_polkadot_companion_build.sh

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2020-09-15 00:10:02 +02:00
committed by GitHub
parent eadf5b09f9
commit 5c1ae5f405
@@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env sh
# #
# check if a pr is compatible with polkadot companion pr or master if not # check if a pr is compatible with polkadot companion pr or master if not
# available # available
@@ -40,7 +40,7 @@ EOT
git config --global user.name 'CI system' git config --global user.name 'CI system'
git config --global user.email '<>' git config --global user.email '<>'
SUBSTRATE_PATH=$(pwd) cargo install -f --version 0.2.0 diener
# Merge master into our branch before building Polkadot to make sure we don't miss # Merge master into our branch before building Polkadot to make sure we don't miss
# any commits that are required by Polkadot. # any commits that are required by Polkadot.
@@ -85,14 +85,9 @@ else
boldprint "this is not a pull request - building polkadot:master" boldprint "this is not a pull request - building polkadot:master"
fi fi
# Make sure we override the crates in native and wasm build cd ..
# patching the git path as described in the link below did not test correctly $CARGO_HOME/bin/diener --substrate --branch $CI_COMMIT_REF_NAME --git https://gitlab.parity.io/parity/substrate.git --path polkadot
# https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html cd polkadot
mkdir .cargo
echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config
mkdir -p target/debug/wbuild/.cargo
cp .cargo/config target/debug/wbuild/.cargo/config
# Test Polkadot pr or master branch with this Substrate commit. # Test Polkadot pr or master branch with this Substrate commit.
time cargo test --all --release --verbose time cargo test --all --release --verbose