Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Use diener for Polkadot companion prs (#7102)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
bkchr and andresilva committed Sep 18, 2020
1 parent 72ea91f commit f5e0c63
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .maintain/gitlab/check_polkadot_companion_build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/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
#
# to override one that was just mentioned mark companion pr in the body of the
# to override one that was just mentioned mark companion pr in the body of the
# polkadot pr like
#
# polkadot companion: paritytech/polkadot#567
Expand All @@ -12,7 +12,7 @@

github_api_substrate_pull_url="https://api.github.com/repos/paritytech/substrate/pulls"
# use github api v3 in order to access the data without authentication
github_header="Authorization: token ${GITHUB_PR_TOKEN}"
github_header="Authorization: token ${GITHUB_PR_TOKEN}"

boldprint () { printf "|\n| \033[1m${@}\033[0m\n|\n" ; }
boldcat () { printf "|\n"; while read l; do printf "| \033[1m${l}\033[0m\n"; done; printf "|\n" ; }
Expand Down Expand Up @@ -40,7 +40,7 @@ EOT
git config --global user.name 'CI system'
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
# any commits that are required by Polkadot.
Expand Down Expand Up @@ -85,14 +85,9 @@ else
boldprint "this is not a pull request - building polkadot:master"
fi

# Make sure we override the crates in native and wasm build
# patching the git path as described in the link below did not test correctly
# https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html
mkdir .cargo
echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config

mkdir -p target/debug/wbuild/.cargo
cp .cargo/config target/debug/wbuild/.cargo/config
cd ..
$CARGO_HOME/bin/diener --substrate --branch $CI_COMMIT_REF_NAME --git https://gitlab.parity.io/parity/substrate.git --path polkadot
cd polkadot

# Test Polkadot pr or master branch with this Substrate commit.
time cargo test --all --release --verbose

0 comments on commit f5e0c63

Please sign in to comment.