diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-12-17 09:04:37 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-12-17 09:05:15 +0100 |
commit | 6f2ca726ce2ec4e027d4ba48872cd7a19e438b7f (patch) | |
tree | 3d7bba030df38c657038275a1636716730b04725 /ci | |
parent | 1811e488d53b82825e3523f6f0cdb97f635f03a7 (diff) | |
parent | 4045a6722c884be779e86016313061ac6ff80808 (diff) |
Merge #20658: ci: Move linter task to cirrus
4045a6722c884be779e86016313061ac6ff80808 ci: Use cpu=1 for linter (Dhruv Mehta)
739d39022d2959c1114c14a0065daebf4fe812c1 ci: Move linter task to cirrus (Dhruv Mehta)
Pull request description:
Solves #20467: Move linter to Cirrus-CI as Travis-CI.org is shutting down
ACKs for top commit:
MarcoFalke:
ACK 4045a6722c884be779e86016313061ac6ff80808
Tree-SHA512: 9aa7487ac86c91fc68bb584d29134e304dbd46702514a5d47d1ef0de6b877d96d42b7589870fc67ad9a31f5d3a789728446da4418688f336111a9ba0f8de5feb
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/lint/04_install.sh | 14 | ||||
-rwxr-xr-x | ci/lint/05_before_script.sh | 2 | ||||
-rwxr-xr-x | ci/lint/06_script.sh | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh index fae424051d..43d33b3f3b 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/04_install.sh @@ -6,14 +6,14 @@ export LC_ALL=C -travis_retry sudo apt update && sudo apt install -y clang-format-9 -sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100 -sudo update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100 +${CI_RETRY_EXE} apt update && apt install -y clang-format-9 python3-pip curl git +update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100 +update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100 -travis_retry pip3 install codespell==1.17.1 -travis_retry pip3 install flake8==3.8.3 -travis_retry pip3 install yq -travis_retry pip3 install mypy==0.781 +${CI_RETRY_EXE} pip3 install codespell==1.17.1 +${CI_RETRY_EXE} pip3 install flake8==3.8.3 +${CI_RETRY_EXE} pip3 install yq +${CI_RETRY_EXE} pip3 install mypy==0.781 SHELLCHECK_VERSION=v0.7.1 curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ diff --git a/ci/lint/05_before_script.sh b/ci/lint/05_before_script.sh index 2987812c8e..8e5a177b01 100755 --- a/ci/lint/05_before_script.sh +++ b/ci/lint/05_before_script.sh @@ -6,4 +6,4 @@ export LC_ALL=C -git fetch --unshallow +git fetch diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index 6f81ecb22e..ba582e7bf6 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -6,11 +6,11 @@ export LC_ALL=C -if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then - # TRAVIS_BRANCH will be present in a Travis environment. For builds triggered +if [ -n "$CIRRUS_PR" ]; then + # CIRRUS_PR will be present in a Cirrus environment. For builds triggered # by a pull request this is the name of the branch targeted by the pull request. - # https://docs.travis-ci.com/user/environment-variables/ - COMMIT_RANGE="$TRAVIS_BRANCH..HEAD" + # https://cirrus-ci.org/guide/writing-tasks/#environment-variables + COMMIT_RANGE="$CIRRUS_BRANCH..HEAD" test/lint/commit-script-check.sh $COMMIT_RANGE fi @@ -25,8 +25,8 @@ test/lint/check-doc.py test/lint/check-rpc-mappings.py . test/lint/lint-all.sh -if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" ] && [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then +if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ -n "$CIRRUS_CRON" ]; then git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit - travis_retry gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $(<contrib/verify-commits/trusted-keys) && + ${CI_RETRY_EXE} gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $(<contrib/verify-commits/trusted-keys) && ./contrib/verify-commits/verify-commits.py --clean-merge=2; fi |