@@ -11,9 +11,6 @@ env: # Global defaults
11
11
cirrus_ephemeral_worker_template_env : &CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
12
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
13
13
14
- persistent_worker_template_env : &PERSISTENT_WORKER_TEMPLATE_ENV
15
- RESTART_CI_DOCKER_BEFORE_RUN : " 1"
16
-
17
14
# https://cirrus-ci.org/guide/persistent-workers/
18
15
#
19
16
# It is possible to select a specific persistent worker by label. Refer to the
@@ -24,15 +21,33 @@ persistent_worker_template_env: &PERSISTENT_WORKER_TEMPLATE_ENV
24
21
# - apt-get is required due to PACKAGE_MANAGER_INSTALL
25
22
# - podman-docker-4.1+ is required due to the use of `podman` when
26
23
# RESTART_CI_DOCKER_BEFORE_RUN is set and 4.1+ due to the bugfix in 4.1
27
- # (https://github.com/bitcoin/bitcoin/pull/21652)
28
- # - The ./ci/ depedencies should be installed:
29
- # apt update && apt install screen python3 bash podman-docker curl -y
24
+ # (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200)
25
+ # - The ./ci/ depedencies (with cirrus-cli) should be installed:
26
+ #
27
+ # ```
28
+ # apt update && apt install screen python3 bash podman-docker curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus
29
+ # ```
30
+ #
31
+ # - There are no strict requirements on the hardware, because having less CPUs
32
+ # runs the same CI script (maybe slower). To avoid rare and intermittent OOM
33
+ # due to short memory usage spikes, it is recommended to add (and persist)
34
+ # swap:
35
+ #
36
+ # ```
37
+ # fallocate -l 16G /swapfile_ci && chmod 600 /swapfile_ci && mkswap /swapfile_ci && swapon /swapfile_ci && ( echo '/swapfile_ci none swap sw 0 0' | sudo tee -a /etc/fstab )
38
+ # ```
39
+ #
40
+ # - To register the persistent worker, open a `screen` session and run:
41
+ #
42
+ # ```
43
+ # RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token
44
+ # ```
30
45
#
31
46
# The following specific types should exist, with the following requirements:
47
+ # - small: For an x86_64 machine, recommended to have 2 CPUs and 8 GB of memory.
48
+ # - medium: For an x86_64 machine, recommended to have 4 CPUs and 16 GB of memory.
32
49
# - lunar: For a machine running the Linux kernel shipped with Ubuntu Lunar 23.04. The machine is recommended to have 4 CPUs and 16 GB of memory.
33
50
# - arm64: For an aarch64 machine, recommended to have 2 CPUs and 8 GB of memory.
34
- persistent_worker_template : &PERSISTENT_WORKER_TEMPLATE
35
- persistent_worker : {} # Only use this if the task does not care about the type at all
36
51
37
52
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
38
53
filter_template : &FILTER_TEMPLATE
@@ -99,14 +114,11 @@ task:
99
114
task :
100
115
name : ' tidy [lunar]'
101
116
<< : *GLOBAL_TASK_TEMPLATE
102
- container :
103
- cpu : 4
104
- memory : 5G
105
- docker_arguments :
106
- CI_IMAGE_NAME_TAG : ubuntu:lunar
107
- FILE_ENV : " ./ci/test/00_setup_env_native_tidy.sh"
117
+ persistent_worker :
118
+ labels :
119
+ type : medium
108
120
env :
109
- << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
121
+ FILE_ENV : " ./ci/test/00_setup_env_native_tidy.sh "
110
122
111
123
task :
112
124
name : " Win64 native [vs2022]"
@@ -242,9 +254,10 @@ task:
242
254
previous_releases_cache :
243
255
folder : " releases"
244
256
<< : *GLOBAL_TASK_TEMPLATE
245
- << : *PERSISTENT_WORKER_TEMPLATE
257
+ persistent_worker :
258
+ labels :
259
+ type : small
246
260
env :
247
- << : *PERSISTENT_WORKER_TEMPLATE_ENV
248
261
FILE_ENV : " ./ci/test/00_setup_env_native_qt5.sh"
249
262
250
263
task :
@@ -281,7 +294,6 @@ task:
281
294
labels :
282
295
type : lunar # Must use the lunar-specific worker (needed for USDT functional tests)
283
296
env :
284
- << : *PERSISTENT_WORKER_TEMPLATE_ENV
285
297
FILE_ENV : " ./ci/test/00_setup_env_native_asan.sh"
286
298
287
299
task :
0 commit comments