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 diff --git a/.maintain/gitlab/check_runtime.sh b/.maintain/gitlab/check_runtime.sh index 157878d2392e9..f989904cb5cde 100755 --- a/.maintain/gitlab/check_runtime.sh +++ b/.maintain/gitlab/check_runtime.sh @@ -27,6 +27,15 @@ 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 + 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'