From b2f0fdfb00235360dc51fd6f0a45258a2d151972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 31 Oct 2019 13:17:23 +0100 Subject: [PATCH 1/3] Check polkadot compilation. --- .gitlab-ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index baca78fd3a4ce..48492a9de5187 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,7 +51,7 @@ variables: - /^[0-9]+$/ # PRs retry: max: 2 - when: + when: - runner_system_failure - unknown_failure - api_failure @@ -319,6 +319,20 @@ check_warnings: fi allow_failure: true +check_polkadot: + stage: build + <<: *docker-env + allow_failure: true + dependencies: + - test-linux-stable + script: + - git clone --depth 1 https://github.com/paritytech/polkadot.git + - cd polkadot + - git grep "polkadot-master" -l | xargs sed -i "s/polkadot-master/$CI_COMMIT_REF_NAME/" + - time cargo check + - cd .. + - sccache -s + #### stage: publish .publish-docker-release: &publish-docker-release From c81169419872a6ee15bdcc1558734bc67933a5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 31 Oct 2019 14:17:28 +0100 Subject: [PATCH 2/3] Fix git grep. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48492a9de5187..4dc0089608fae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -328,7 +328,7 @@ check_polkadot: script: - git clone --depth 1 https://github.com/paritytech/polkadot.git - cd polkadot - - git grep "polkadot-master" -l | xargs sed -i "s/polkadot-master/$CI_COMMIT_REF_NAME/" + - git grep -l "polkadot-master" | xargs sed -i "s/polkadot-master/$CI_COMMIT_REF_NAME/" - time cargo check - cd .. - sccache -s From d192e9a79bec449835a5c00d16828042453bae50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 31 Oct 2019 15:14:55 +0100 Subject: [PATCH 3/3] Make sure to update properly. Use commit hash instead. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4dc0089608fae..b1b7e22951d91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -327,8 +327,10 @@ check_polkadot: - test-linux-stable script: - git clone --depth 1 https://github.com/paritytech/polkadot.git + - COMMIT_HASH=$(git rev-parse HEAD) - cd polkadot - - git grep -l "polkadot-master" | xargs sed -i "s/polkadot-master/$CI_COMMIT_REF_NAME/" + - git grep -l "polkadot-master" | grep toml | xargs sed -i "s/branch.*=.*\"polkadot-master\"/rev = \"$COMMIT_HASH\"/" + - cargo update -p sr-io --precise $COMMIT_HASH - time cargo check - cd .. - sccache -s