aboutsummaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorDhruv Mehta <856960+dhruv@users.noreply.github.com>2020-12-14 15:55:30 -0800
committerDhruv Mehta <856960+dhruv@users.noreply.github.com>2020-12-15 10:13:55 -0800
commit739d39022d2959c1114c14a0065daebf4fe812c1 (patch)
treeac0c2982e95940bf298dfc6d782be4dd4d685b60 /.cirrus.yml
parent94a9cd25fd17e10b5720b5f72908b08c0f1ed16d (diff)
downloadbitcoin-739d39022d2959c1114c14a0065daebf4fe812c1.tar.xz
ci: Move linter task to cirrus
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml41
1 files changed, 31 insertions, 10 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 8fa2e52dde..58c1f6870f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -15,11 +15,21 @@ env:
CCACHE_SIZE: "200M"
CCACHE_DIR: "/tmp/ccache_dir"
-### Global task template
-
+### Base template
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
+base_template: &BASE_TEMPLATE
+ skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
+ merge_base_script:
+ - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
+ - bash -c "$PACKAGE_MANAGER_INSTALL git"
+ - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
+ - git config --global user.email "ci@ci.ci"
+ - git config --global user.name "ci"
+ - git merge FETCH_HEAD # Merge base to detect silent merge conflicts
+
+### Global task template
global_task_template: &GLOBAL_TASK_TEMPLATE
- skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
+ << : *BASE_TEMPLATE
ccache_cache:
folder: "/tmp/ccache_dir"
depends_built_cache:
@@ -28,13 +38,6 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
depends_releases_cache:
folder: "/tmp/cirrus-ci-build/releases"
- merge_base_script:
- - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
- - bash -c "$PACKAGE_MANAGER_INSTALL git"
- - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
- - git config --global user.email "ci@ci.ci"
- - git config --global user.name "ci"
- - git merge FETCH_HEAD # Merge base to detect silent merge conflicts
ci_script:
- ./ci/test_run_all.sh
@@ -55,6 +58,24 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
# - choco install python --version=3.7.7 -y
task:
+ name: 'lint'
+ << : *BASE_TEMPLATE
+ container:
+ image: ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md
+ # For faster CI feedback, immediately schedule the linters. https://cirrus-ci.org/pricing/#compute-credits
+ use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin'
+ setup_script:
+ - set -o errexit; source ./ci/test/00_setup_env.sh
+ before_install_script:
+ - set -o errexit; source ./ci/test/03_before_install.sh
+ install_script:
+ - set -o errexit; source ./ci/lint/04_install.sh
+ before_script:
+ - set -o errexit; source ./ci/lint/05_before_script.sh
+ lint_script:
+ - set -o errexit; source ./ci/lint/06_script.sh
+
+task:
name: 'ARM [unit tests, no functional tests] [buster]'
<< : *GLOBAL_TASK_TEMPLATE
container: