11# ## Global defaults
22
3- timeout_in : 120m # https://cirrus-ci.org/faq/#instance-timed-out
4- container :
5- # https://cirrus-ci.org/faq/#are-there-any-limits
6- # Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
7- cpu : 2
8- memory : 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
9- kvm : true # Use kvm to avoid spurious CI failures in the default virtualization cluster, see https://github.com/bitcoin/bitcoin/issues/20093
103env :
114 PACKAGE_MANAGER_INSTALL : " apt-get update && apt-get install -y"
125 MAKEJOBS : " -j4"
13- DANGER_RUN_CI_ON_HOST : " 1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system
146 TEST_RUNNER_PORT_MIN : " 14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
157 CCACHE_SIZE : " 200M"
168 CCACHE_DIR : " /tmp/ccache_dir"
9+ CCACHE_NOHASHDIR : " 1" # Debug info might contain a stale path if the build dir changes, but this is fine
10+
11+ cirrus_ephemeral_worker_template_env : &CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
12+ DANGER_RUN_CI_ON_HOST : " 1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system
1713
18- # ## Global task template
14+ persistent_worker_template_env : &PERSISTENT_WORKER_TEMPLATE_ENV
15+ RESTART_CI_DOCKER_BEFORE_RUN : " 1"
16+
17+ persistent_worker_template : &PERSISTENT_WORKER_TEMPLATE
18+ persistent_worker : {} # https://cirrus-ci.org/guide/persistent-workers/
1919
2020# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
21- global_task_template : &GLOBAL_TASK_TEMPLATE
21+ base_template : &BASE_TEMPLATE
2222 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
23- ccache_cache :
24- folder : " /tmp/ccache_dir"
25- depends_built_cache :
26- folder : " /tmp/cirrus-ci-build/depends/built"
27- depends_sdk_cache :
28- folder : " /tmp/cirrus-ci-build/depends/sdk-sources"
29- depends_releases_cache :
30- folder : " /tmp/cirrus-ci-build/releases"
3123 merge_base_script :
3224 - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
3325 - bash -c "$PACKAGE_MANAGER_INSTALL git"
3426 - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
3527 - git config --global user.email "ci@ci.ci"
3628 - git config --global user.name "ci"
3729 - git merge FETCH_HEAD # Merge base to detect silent merge conflicts
30+ stateful : false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
31+
32+ global_task_template : &GLOBAL_TASK_TEMPLATE
33+ << : *BASE_TEMPLATE
34+ timeout_in : 120m # https://cirrus-ci.org/faq/#instance-timed-out
35+ container :
36+ # https://cirrus-ci.org/faq/#are-there-any-limits
37+ # Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
38+ cpu : 2
39+ memory : 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
40+ ccache_cache :
41+ folder : " /tmp/ccache_dir"
42+ depends_built_cache :
43+ folder : " depends/built"
3844 ci_script :
3945 - ./ci/test_run_all.sh
4046
47+ depends_sdk_cache_template : &DEPENDS_SDK_CACHE_TEMPLATE
48+ depends_sdk_cache :
49+ folder : " depends/sdk-sources"
50+
51+ compute_credits_template : &CREDITS_TEMPLATE
52+ # https://cirrus-ci.org/pricing/#compute-credits
53+ # Only use credits for pull requests to the main repo
54+ use_compute_credits : $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
55+
4156# task:
4257# name: "Windows"
4358# windows_container:
@@ -55,92 +70,153 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
5570# - choco install python --version=3.7.7 -y
5671
5772task :
58- name : ' ARM [GOAL: install] [buster] [unit tests, no functional tests]'
73+ name : ' lint [bionic]'
74+ << : *BASE_TEMPLATE
75+ container :
76+ image : ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md
77+ cpu : 1
78+ memory : 1G
79+ # For faster CI feedback, immediately schedule the linters
80+ << : *CREDITS_TEMPLATE
81+ lint_script :
82+ - ./ci/lint_run_all.sh
83+ env :
84+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
85+
86+ task :
87+ name : ' ARM [unit tests, no functional tests] [buster]'
5988 << : *GLOBAL_TASK_TEMPLATE
6089 container :
6190 image : debian:buster
6291 env :
92+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
6393 FILE_ENV : " ./ci/test/00_setup_env_arm.sh"
6494
6595task :
66- name : ' Win64 [GOAL: deploy] [ unit tests, no gui, no boost::process, no functional tests]'
96+ name : ' Win64 [ unit tests, no gui tests , no boost::process, no functional tests] [focal ]'
6797 << : *GLOBAL_TASK_TEMPLATE
6898 container :
69- image : ubuntu:bionic
99+ image : ubuntu:focal
70100 env :
101+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
71102 FILE_ENV : " ./ci/test/00_setup_env_win64.sh"
72103
73104task :
74- name : ' x86_64 Linux [GOAL: install] [bionic] [C++17, previous releases, uses qt5 dev package and some depends packages] [unsigned char ]'
105+ name : ' 32-bit + dash [gui] [CentOS 8 ]'
75106 << : *GLOBAL_TASK_TEMPLATE
76107 container :
77- image : ubuntu:bionic
108+ image : quay.io/centos/centos:stream8
109+ env :
110+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
111+ PACKAGE_MANAGER_INSTALL : " yum install -y"
112+ FILE_ENV : " ./ci/test/00_setup_env_i686_centos.sh"
113+
114+ task :
115+ name : ' [previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic]'
116+ previous_releases_cache :
117+ folder : " releases"
118+ << : *GLOBAL_TASK_TEMPLATE
119+ << : *PERSISTENT_WORKER_TEMPLATE
78120 env :
121+ << : *PERSISTENT_WORKER_TEMPLATE_ENV
79122 FILE_ENV : " ./ci/test/00_setup_env_native_qt5.sh"
80123
81124task :
82- name : ' x86_64 Linux [GOAL: install] [focal] [ depends, sanitizers: thread (TSan), no gui]'
125+ name : ' [ depends, sanitizers: thread (TSan), no gui] [jammy ]'
83126 << : *GLOBAL_TASK_TEMPLATE
84127 container :
85- image : ubuntu:focal
86- cpu : 4 # Double CPU and Memory to avoid timeout
87- memory : 16G
128+ image : ubuntu:jammy
129+ cpu : 6 # Increase CPU and Memory to avoid timeout
130+ memory : 24G
88131 env :
132+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
89133 MAKEJOBS : " -j8"
90134 FILE_ENV : " ./ci/test/00_setup_env_native_tsan.sh"
91135
92136task :
93- name : ' x86_64 Linux [GOAL: install] [focal] [ depends, sanitizers: memory (MSan)]'
137+ name : ' [ depends, sanitizers: memory (MSan)] [focal ]'
94138 << : *GLOBAL_TASK_TEMPLATE
95139 container :
96140 image : ubuntu:focal
97141 env :
142+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
98143 FILE_ENV : " ./ci/test/00_setup_env_native_msan.sh"
99144
100145task :
101- name : ' x86_64 Linux [GOAL: install] [focal] [ no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
146+ name : ' [ no depends, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [jammy ]'
102147 << : *GLOBAL_TASK_TEMPLATE
103148 container :
104- image : ubuntu:focal
149+ image : ubuntu:jammy
105150 env :
151+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
106152 FILE_ENV : " ./ci/test/00_setup_env_native_asan.sh"
107153
108154task :
109- name : ' x86_64 Linux [GOAL: install] [focal] [ no depends, only system libs, sanitizers: fuzzer,address,undefined]'
155+ name : ' [ no depends, sanitizers: fuzzer,address,undefined,integer] [focal ]'
110156 only_if : $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BASE_BRANCH == $CIRRUS_DEFAULT_BRANCH
111157 << : *GLOBAL_TASK_TEMPLATE
112158 container :
113159 image : ubuntu:focal
160+ cpu : 4 # Increase CPU and memory to avoid timeout
161+ memory : 16G
114162 env :
163+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
164+ MAKEJOBS : " -j8"
115165 FILE_ENV : " ./ci/test/00_setup_env_native_fuzz.sh"
116166
117167task :
118- name : ' x86_64 Linux [GOAL: install] [focal] [multiprocess ]'
168+ name : ' [multiprocess, DEBUG] [focal]'
119169 << : *GLOBAL_TASK_TEMPLATE
120170 container :
121171 image : ubuntu:focal
172+ cpu : 4
173+ memory : 16G # The default memory is sometimes just a bit too small, so double everything
122174 env :
175+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
176+ MAKEJOBS : " -j8"
123177 FILE_ENV : " ./ci/test/00_setup_env_native_multiprocess.sh"
124178
125179task :
126- name : ' macOS 10.12 [GOAL: deploy ] [no functional tests ]'
180+ name : ' [no wallet ] [bionic ]'
127181 << : *GLOBAL_TASK_TEMPLATE
128182 container :
129183 image : ubuntu:bionic
130184 env :
185+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
186+ FILE_ENV : " ./ci/test/00_setup_env_native_nowallet.sh"
187+
188+ task :
189+ name : ' macOS 10.14 [gui, no tests] [focal]'
190+ << : *DEPENDS_SDK_CACHE_TEMPLATE
191+ << : *GLOBAL_TASK_TEMPLATE
192+ container :
193+ image : ubuntu:focal
194+ env :
195+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
131196 FILE_ENV : " ./ci/test/00_setup_env_mac.sh"
132197
133198task :
134- name : ' macOS 10.14 native [GOAL: install] [GUI ] [no depends]'
199+ name : ' macOS 11 native [gui ] [no depends]'
135200 brew_install_script :
136- - brew update
137- - brew install boost libevent berkeley-db4 qt@5 miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
201+ - brew install boost libevent berkeley-db4 qt@5 miniupnpc libnatpmp ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
138202 << : *GLOBAL_TASK_TEMPLATE
139203 osx_instance :
140204 # Use latest image, but hardcode version to avoid silent upgrades (and breaks)
141- image : catalina- xcode-12.1 # https://cirrus-ci.org/guide/macOS
205+ image : big-sur- xcode-12.5 # https://cirrus-ci.org/guide/macOS
142206 env :
143- DANGER_RUN_CI_ON_HOST : " true "
207+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
144208 CI_USE_APT_INSTALL : " no"
145209 PACKAGE_MANAGER_INSTALL : " echo" # Nothing to do
146210 FILE_ENV : " ./ci/test/00_setup_env_mac_host.sh"
211+
212+ task :
213+ name : ' ARM64 Android APK [focal]'
214+ << : *DEPENDS_SDK_CACHE_TEMPLATE
215+ depends_sources_cache :
216+ folder : " depends/sources"
217+ << : *GLOBAL_TASK_TEMPLATE
218+ container :
219+ image : ubuntu:focal
220+ env :
221+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
222+ FILE_ENV : " ./ci/test/00_setup_env_android.sh"
0 commit comments