aboutsummaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-08-04 11:45:22 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-08-09 12:50:21 +0200
commitfa1d8955f69d3934f975f42eb04b5a3fc0d8aa35 (patch)
tree771c2cd8d20a21a53ff00814ac9ccd180900eda5 /.cirrus.yml
parent492257019d6d6e0f4051433e510502e8040fd6d2 (diff)
downloadbitcoin-fa1d8955f69d3934f975f42eb04b5a3fc0d8aa35.tar.xz
ci: Move tidy to persistent worker
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml37
1 files changed, 27 insertions, 10 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index eaaa2c471f..36c9befaec 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -24,11 +24,31 @@ persistent_worker_template_env: &PERSISTENT_WORKER_TEMPLATE_ENV
# - apt-get is required due to PACKAGE_MANAGER_INSTALL
# - podman-docker-4.1+ is required due to the use of `podman` when
# RESTART_CI_DOCKER_BEFORE_RUN is set and 4.1+ due to the bugfix in 4.1
-# (https://github.com/bitcoin/bitcoin/pull/21652)
-# - The ./ci/ depedencies should be installed:
-# apt update && apt install screen python3 bash podman-docker curl -y
+# (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200)
+# - The ./ci/ depedencies (with cirrus-cli) should be installed:
+#
+# ```
+# 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
+# ```
+#
+# - There are no strict requirements on the hardware, because having less CPUs
+# runs the same CI script (maybe slower). To avoid rare and intermittent OOM
+# due to short memory usage spikes, it is recommended to add (and persist)
+# swap:
+#
+# ```
+# 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 )
+# ```
+#
+# - To register the persistent worker, open a `screen` session and run:
+#
+# ```
+# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token
+# ```
#
# The following specific types should exist, with the following requirements:
+# - small: For an x86_64 machine, recommended to have 2 CPUs and 8 GB of memory.
+# - medium: For an x86_64 machine, recommended to have 4 CPUs and 16 GB of memory.
# - 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.
# - arm64: For an aarch64 machine, recommended to have 2 CPUs and 8 GB of memory.
persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE
@@ -99,14 +119,11 @@ task:
task:
name: 'tidy [lunar]'
<< : *GLOBAL_TASK_TEMPLATE
- container:
- cpu: 4
- memory: 5G
- docker_arguments:
- CI_IMAGE_NAME_TAG: ubuntu:lunar
- FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
+ persistent_worker:
+ labels:
+ type: medium
env:
- << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
+ FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
task:
name: "Win64 native [vs2022]"