Skip to content

Commit 33da5d0

Browse files
committed
Merge bitcoin#21652: ci: Switch remaining Linux tasks to self-hosted
fa8e89d ci: Remove distro-name from task name (MarcoFalke) fad006f ci: Switch remaining tasks to self-hosted (MarcoFalke) Pull request description: Cirrus CI will be capping the free compute soon. For now, switch more tasks to persistent worker, as recommended by Cirrus CI. (See slightly related discussion in bitcoin#28098) ACKs for top commit: pinheadmz: concept ACK fa8e89d dergoegge: ACK fa8e89d hebasto: ACK fa8e89d. Tree-SHA512: f6b172fee14856021b7a219b2490c8a163ad0137567c34a383080c68f8319b1d846923e508a968f43fb63ed6ce536dcb0611905fa288271f2267764b07bf9ecb
2 parents 5aa67eb + fa8e89d commit 33da5d0

File tree

2 files changed

+48
-88
lines changed

2 files changed

+48
-88
lines changed

.cirrus.yml

Lines changed: 47 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ env: # Global defaults
88
CCACHE_DIR: "/tmp/ccache_dir"
99
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
1010

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
13-
1411
# https://cirrus-ci.org/guide/persistent-workers/
1512
#
1613
# It is possible to select a specific persistent worker by label. Refer to the
@@ -66,25 +63,11 @@ base_template: &BASE_TEMPLATE
6663

6764
main_template: &MAIN_TEMPLATE
6865
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
69-
ccache_cache:
70-
folder: "/tmp/ccache_dir"
7166
ci_script:
7267
- ./ci/test_run_all.sh
7368

74-
container_depends_template: &CONTAINER_DEPENDS_TEMPLATE
75-
<< : *BASE_TEMPLATE
76-
container:
77-
# https://cirrus-ci.org/faq/#are-there-any-limits
78-
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
79-
cpu: 2
80-
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
81-
dockerfile: ci/test_imagefile # https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment
82-
base_depends_built_cache:
83-
folder: "/ci_container_base/depends/built"
84-
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-parse HEAD:depends)
85-
8669
global_task_template: &GLOBAL_TASK_TEMPLATE
87-
<< : *CONTAINER_DEPENDS_TEMPLATE
70+
<< : *BASE_TEMPLATE
8871
<< : *MAIN_TEMPLATE
8972

9073
compute_credits_template: &CREDITS_TEMPLATE
@@ -93,7 +76,7 @@ compute_credits_template: &CREDITS_TEMPLATE
9376
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
9477

9578
task:
96-
name: 'lint [bookworm]'
79+
name: 'lint'
9780
<< : *BASE_TEMPLATE
9881
container:
9982
image: debian:bookworm
@@ -108,11 +91,9 @@ task:
10891
- git fetch --unshallow --no-tags
10992
lint_script:
11093
- ./ci/lint_run_all.sh
111-
env:
112-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
11394

11495
task:
115-
name: 'tidy [lunar]'
96+
name: 'tidy'
11697
<< : *GLOBAL_TASK_TEMPLATE
11798
persistent_worker:
11899
labels:
@@ -217,7 +198,7 @@ task:
217198
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=99999999 --jobs=6 --timeout-factor=8 --extended --exclude feature_dbcrash
218199

219200
task:
220-
name: 'ARM [unit tests, no functional tests] [bullseye]'
201+
name: 'ARM, unit tests, no functional tests'
221202
<< : *GLOBAL_TASK_TEMPLATE
222203
persistent_worker:
223204
labels:
@@ -226,33 +207,25 @@ task:
226207
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
227208

228209
task:
229-
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
210+
name: 'Win64, unit tests, no gui tests, no boost::process, no functional tests'
230211
<< : *GLOBAL_TASK_TEMPLATE
231-
container:
232-
docker_arguments:
233-
CI_IMAGE_NAME_TAG: ubuntu:jammy
234-
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
235-
<< : *CREDITS_TEMPLATE
212+
persistent_worker:
213+
labels:
214+
type: small
236215
env:
237-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
216+
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
238217

239218
task:
240-
name: '32-bit + dash [gui] [CentOS 9]'
219+
name: '32-bit CentOS, dash, gui'
241220
<< : *GLOBAL_TASK_TEMPLATE
242-
container:
243-
docker_arguments:
244-
CI_IMAGE_NAME_TAG: "quay.io/centos/amd64:stream9"
245-
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
246-
# For faster CI feedback, immediately schedule one task that runs all tests
247-
<< : *CREDITS_TEMPLATE
221+
persistent_worker:
222+
labels:
223+
type: small
248224
env:
249-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
250-
PACKAGE_MANAGER_INSTALL: "yum install -y"
225+
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
251226

252227
task:
253-
name: '[previous releases, qt5 dev package and depends packages, DEBUG] [focal]'
254-
previous_releases_cache:
255-
folder: "releases"
228+
name: 'previous releases, qt5 dev package and depends packages, DEBUG'
256229
<< : *GLOBAL_TASK_TEMPLATE
257230
persistent_worker:
258231
labels:
@@ -261,30 +234,26 @@ task:
261234
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
262235

263236
task:
264-
name: '[TSan, depends, gui] [lunar]'
237+
name: 'TSan, depends, gui'
265238
<< : *GLOBAL_TASK_TEMPLATE
266-
container:
267-
cpu: 4
268-
memory: 16G # The default memory is too small, so double everything
269-
docker_arguments:
270-
CI_IMAGE_NAME_TAG: ubuntu:lunar
271-
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
239+
persistent_worker:
240+
labels:
241+
type: medium
272242
env:
273-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
243+
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
274244

275245
task:
276-
name: '[MSan, depends] [jammy]'
246+
name: 'MSan, depends'
277247
<< : *GLOBAL_TASK_TEMPLATE
278-
container:
279-
docker_arguments:
280-
CI_IMAGE_NAME_TAG: ubuntu:jammy
281-
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
248+
persistent_worker:
249+
labels:
250+
type: small
251+
timeout_in: 300m # Use longer timeout for the *rare* case where a full build (llvm + msan + depends + ...) needs to be done.
282252
env:
283-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
284-
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
253+
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
285254

286255
task:
287-
name: '[ASan + LSan + UBSan + integer, no depends, USDT] [lunar]'
256+
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
288257
enable_bpfcc_script:
289258
# In the image build step, no external environment variables are available,
290259
# so any settings will need to be written to the settings env file:
@@ -297,46 +266,37 @@ task:
297266
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
298267

299268
task:
300-
name: '[fuzzer,address,undefined,integer, no depends] [lunar]'
269+
name: 'fuzzer,address,undefined,integer, no depends'
301270
<< : *GLOBAL_TASK_TEMPLATE
302-
container:
303-
cpu: 4 # Increase CPU and memory to avoid timeout
304-
memory: 16G
305-
docker_arguments:
306-
CI_IMAGE_NAME_TAG: ubuntu:lunar
307-
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
271+
persistent_worker:
272+
labels:
273+
type: medium
308274
env:
309-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
275+
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
310276

311277
task:
312-
name: '[multiprocess, i686, DEBUG] [focal]'
278+
name: 'multiprocess, i686, DEBUG'
313279
<< : *GLOBAL_TASK_TEMPLATE
314-
container:
315-
cpu: 4
316-
memory: 16G # The default memory is too small, so double everything
317-
docker_arguments:
318-
CI_IMAGE_NAME_TAG: "docker.io/amd64/ubuntu:focal"
319-
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
280+
persistent_worker:
281+
labels:
282+
type: medium
320283
env:
321-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
284+
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
322285

323286
task:
324-
name: '[no wallet, libbitcoinkernel] [focal]'
287+
name: 'no wallet, libbitcoinkernel'
325288
<< : *GLOBAL_TASK_TEMPLATE
326-
container:
327-
docker_arguments:
328-
CI_IMAGE_NAME_TAG: ubuntu:focal
329-
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
330-
<< : *CREDITS_TEMPLATE
289+
persistent_worker:
290+
labels:
291+
type: small
331292
env:
332-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
293+
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
333294

334295
task:
335-
name: 'macOS 11.0 [gui, no tests] [jammy]'
296+
name: 'macOS-cross 11.0, gui, no tests'
336297
<< : *GLOBAL_TASK_TEMPLATE
337-
container:
338-
docker_arguments:
339-
CI_IMAGE_NAME_TAG: ubuntu:jammy
340-
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
298+
persistent_worker:
299+
labels:
300+
type: small
341301
env:
342-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
302+
FILE_ENV: "./ci/test/00_setup_env_mac.sh"

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424

2525
jobs:
2626
macos-native-x86_64:
27-
name: macOS 13 native, x86_64 [no depends, sqlite only, gui]
27+
name: 'macOS 13 native, x86_64, no depends, sqlite only, gui'
2828
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
2929
# See: https://github.com/actions/runner-images#available-images.
3030
runs-on: macos-13 # Use M1 once available https://github.com/github/roadmap/issues/528

0 commit comments

Comments
 (0)