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

Use diener for Polkadot companion prs #7102

Merged
merged 5 commits into from
Sep 14, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 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,6 +40,8 @@ EOT
git config --global user.name 'CI system'
git config --global user.email '<>'

cargo install -f --version 0.2.0 diener

SUBSTRATE_PATH=$(pwd)
bkchr marked this conversation as resolved.
Show resolved Hide resolved

# Merge master into our branch before building Polkadot to make sure we don't miss
Expand Down Expand Up @@ -85,14 +87,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/bin/diener --substrate --branch $(git branch --show-current) --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