From c030f500f97f49a85c1296a2fd80b0e37bee3b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sun, 10 Nov 2019 15:59:53 +0100 Subject: [PATCH 1/2] Fix a check for polkadot to work on forked repos. --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index baf875fd0fb79..36bbe029e5c3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -345,10 +345,11 @@ check_polkadot: dependencies: - test-linux-stable script: - - git clone --depth 1 https://github.com/paritytech/polkadot.git - COMMIT_HASH=$(git rev-parse HEAD) + - SUBSTRATE_PATH=$(pwd) + - git clone --depth 1 https://gitlab.parity.io/parity/polkadot.git - cd polkadot - - git grep -l "polkadot-master" | grep toml | xargs sed -i "s/branch.*=.*\"polkadot-master\"/rev = \"$COMMIT_HASH\"/" + - 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~" - cargo update -p sr-io --precise $COMMIT_HASH - time cargo check - cd .. From f007559d676b3b7b05bbbdb4504475b57d7585f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sun, 10 Nov 2019 18:00:34 +0100 Subject: [PATCH 2/2] More future proof and less redundant. --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36bbe029e5c3b..d08397acc2a1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -289,7 +289,7 @@ build-linux-subkey: script: - cd ./subkey - BUILD_DUMMY_WASM_BINARY=1 time cargo build --release --verbose - - cd .. + - cd - - sccache -s - mkdir -p ./artifacts/subkey - mv ./target/release/subkey ./artifacts/subkey/. @@ -350,9 +350,9 @@ check_polkadot: - git clone --depth 1 https://gitlab.parity.io/parity/polkadot.git - cd polkadot - 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~" - - cargo update -p sr-io --precise $COMMIT_HASH + - cargo update -p sr-io - time cargo check - - cd .. + - cd - - sccache -s #### stage: publish