From 0ee1bc18a94be7fa73258c8b3d674ad428ab9302 Mon Sep 17 00:00:00 2001 From: gabriel Date: Mon, 23 Dec 2019 13:16:46 +0900 Subject: [PATCH 1/3] ci: increase git cloning depth to 100 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 643ac7afd17ba..90e0c2b007a4b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ stages: variables: GIT_STRATEGY: fetch - GIT_DEPTH: "3" + GIT_DEPTH: 100 CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}" SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache" CARGO_INCREMENTAL: 0 From ae629c02ca7952a97dcc6777cfc1d53a14f84563 Mon Sep 17 00:00:00 2001 From: gabriel Date: Tue, 24 Dec 2019 01:12:19 +0900 Subject: [PATCH 2/3] check_runtime: verify shallow git clones to contain origin/master --- .maintain/gitlab/check_runtime.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.maintain/gitlab/check_runtime.sh b/.maintain/gitlab/check_runtime.sh index 157878d2392e9..d6ae8d86d252e 100755 --- a/.maintain/gitlab/check_runtime.sh +++ b/.maintain/gitlab/check_runtime.sh @@ -27,6 +27,13 @@ github_label () { +# check if master is part of this checkout +if ! git log -n 1 origin/master +then + echo "unable to check for runtime changes: checkout does not contain origin/master branch" + exit 3 +fi + # check if the wasm sources changed if ! git diff --name-only origin/master...${CI_COMMIT_SHA} \ | grep -q -e '^bin/node/src/runtime' -e '^frame/' -e '^primitives/sr-' | grep -v -e '^primitives/sr-arithmetic/fuzzer' From 41c3c7878e1854a8725f82a809e04005e5ba3c2b Mon Sep 17 00:00:00 2001 From: gabriel Date: Tue, 24 Dec 2019 01:22:44 +0900 Subject: [PATCH 3/3] check_runtime: fetch master branch --- .maintain/gitlab/check_runtime.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.maintain/gitlab/check_runtime.sh b/.maintain/gitlab/check_runtime.sh index d6ae8d86d252e..f989904cb5cde 100755 --- a/.maintain/gitlab/check_runtime.sh +++ b/.maintain/gitlab/check_runtime.sh @@ -27,6 +27,8 @@ github_label () { +git fetch --depth=${GIT_DEPTH:-100} origin master + # check if master is part of this checkout if ! git log -n 1 origin/master then