99GCP_PROJECT :pg-ci-images
1010IMAGE_PROJECT :$GCP_PROJECT
1111CONTAINER_REPO :us-docker.pkg.dev/${GCP_PROJECT}/ci
12+ DISK_SIZE :25
1213
1314# The lower depth accelerates git clone. Use a bit of depth so that
1415# concurrent tasks and retrying older jobs have a chance of working.
2829PG_TEST_EXTRA :kerberos ldap ssl load_balance
2930
3031
32+ # Define how to run various types of tasks.
33+
34+ # VMs provided by cirrus-ci. Each user has a limited number of "free" credits
35+ # for testing.
36+ cirrus_community_vm_template :&cirrus_community_vm_template
37+ compute_engine_instance :
38+ image_project :$IMAGE_PROJECT
39+ image :family/$IMAGE_FAMILY
40+ platform :$PLATFORM
41+ cpu :$CPUS
42+ disk :$DISK_SIZE
43+
44+
45+ default_linux_task_template :&linux_task_template
46+ env :
47+ PLATFORM :linux
48+ << :*cirrus_community_vm_template
49+
50+
51+ default_freebsd_task_template :&freebsd_task_template
52+ env :
53+ PLATFORM :freebsd
54+ << :*cirrus_community_vm_template
55+
56+
57+ default_windows_task_template :&windows_task_template
58+ env :
59+ PLATFORM :windows
60+ << :*cirrus_community_vm_template
61+
62+
63+ # macos workers provided by cirrus-ci
64+ default_macos_task_template :&macos_task_template
65+ env :
66+ PLATFORM :macos
67+ macos_instance :
68+ image :$IMAGE
69+
70+
3171# What files to preserve in case tests fail
3272on_failure_ac :&on_failure_ac
3373log_artifacts :
@@ -136,21 +176,18 @@ task:
136176CPUS :2
137177BUILD_JOBS :3
138178TEST_JOBS :3
179+ IMAGE_FAMILY :pg-ci-freebsd-13
180+ DISK_SIZE :50
139181
140182CCACHE_DIR :/tmp/ccache_dir
141183CPPFLAGS :-DRELCACHE_FORCE_RELEASE -DCOPY_PARSE_PLAN_TREES -DWRITE_READ_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS
142184CFLAGS :-Og -ggdb
143185
186+ << :*freebsd_task_template
187+
144188depends_on :SanityCheck
145189only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*freebsd.*'
146190
147- compute_engine_instance :
148- image_project :$IMAGE_PROJECT
149- image :family/pg-ci-freebsd-13
150- platform :freebsd
151- cpu :$CPUS
152- disk :50
153-
154191sysinfo_script :|
155192 id
156193 uname -a
@@ -250,6 +287,7 @@ task:
250287CPUS :4
251288BUILD_JOBS :4
252289TEST_JOBS :8 # experimentally derived to be a decent choice
290+ IMAGE_FAMILY :pg-ci-bullseye
253291
254292CCACHE_DIR :/tmp/ccache_dir
255293DEBUGINFOD_URLS :" https://debuginfod.debian.net"
@@ -282,15 +320,11 @@ task:
282320LINUX_CONFIGURE_FEATURES :*LINUX_CONFIGURE_FEATURES
283321LINUX_MESON_FEATURES :*LINUX_MESON_FEATURES
284322
323+ << :*linux_task_template
324+
285325depends_on :SanityCheck
286326only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
287327
288- compute_engine_instance :
289- image_project :$IMAGE_PROJECT
290- image :family/pg-ci-bullseye
291- platform :linux
292- cpu :$CPUS
293-
294328ccache_cache :
295329folder :${CCACHE_DIR}
296330
@@ -430,6 +464,7 @@ task:
430464# work OK. See
431465# https://postgr.es/m/20220927040208.l3shfcidovpzqxfh%40awork3.anarazel.de
432466TEST_JOBS :8
467+ IMAGE :ghcr.io/cirruslabs/macos-ventura-base:latest
433468
434469CIRRUS_WORKING_DIR :${HOME}/pgsql/
435470CCACHE_DIR :${HOME}/ccache
@@ -440,12 +475,11 @@ task:
440475CFLAGS :-Og -ggdb
441476CXXFLAGS :-Og -ggdb
442477
478+ << :*macos_task_template
479+
443480depends_on :SanityCheck
444481only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*(macos|darwin|osx).*'
445482
446- macos_instance :
447- image :ghcr.io/cirruslabs/macos-ventura-base:latest
448-
449483sysinfo_script :|
450484 id
451485 uname -a
@@ -524,6 +558,7 @@ WINDOWS_ENVIRONMENT_BASE: &WINDOWS_ENVIRONMENT_BASE
524558# Avoids port conflicts between concurrent tap test runs
525559PG_TEST_USE_UNIX_SOCKETS :1
526560PG_REGRESS_SOCK_DIR :" c:/cirrus/"
561+ DISK_SIZE :50
527562
528563sysinfo_script :|
529564 chcp
@@ -547,16 +582,13 @@ task:
547582# given that it explicitly prevents crash dumps from working...
548583# 0x8001 is SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX
549584CIRRUS_WINDOWS_ERROR_MODE :0x8001
585+ IMAGE_FAMILY :pg-ci-windows-ci-vs-2019
586+
587+ << :*windows_task_template
550588
551589depends_on :SanityCheck
552590only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
553591
554- compute_engine_instance :
555- image_project :$IMAGE_PROJECT
556- image :family/pg-ci-windows-ci-vs-2019
557- platform :windows
558- cpu :$CPUS
559-
560592setup_additional_packages_script :|
561593 REM choco install -y --no-progress ...
562594
@@ -598,12 +630,6 @@ task:
598630# otherwise it'll be sorted before other tasks
599631depends_on :SanityCheck
600632
601- compute_engine_instance :
602- image_project :$IMAGE_PROJECT
603- image :family/pg-ci-windows-ci-mingw64
604- platform :windows
605- cpu :$CPUS
606-
607633env :
608634TEST_JOBS :4 # higher concurrency causes occasional failures
609635CCACHE_DIR :C:/msys64/ccache
@@ -617,6 +643,9 @@ task:
617643# Start bash in current working directory
618644CHERE_INVOKING :1
619645BASH :C:\msys64\usr\bin\bash.exe -l
646+ IMAGE_FAMILY :pg-ci-windows-ci-mingw64
647+
648+ << :*windows_task_template
620649
621650ccache_cache :
622651folder :${CCACHE_DIR}