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.
2728PG_TEST_EXTRA :kerberos ldap ssl
2829
2930
31+ # Define how to run various types of tasks.
32+
33+ # VMs provided by cirrus-ci. Each user has a limited number of "free" credits
34+ # for testing.
35+ cirrus_community_vm_template :&cirrus_community_vm_template
36+ compute_engine_instance :
37+ image_project :$IMAGE_PROJECT
38+ image :family/$IMAGE_FAMILY
39+ platform :$PLATFORM
40+ cpu :$CPUS
41+ disk :$DISK_SIZE
42+
43+
44+ default_linux_task_template :&linux_task_template
45+ env :
46+ PLATFORM :linux
47+ << :*cirrus_community_vm_template
48+
49+
50+ default_freebsd_task_template :&freebsd_task_template
51+ env :
52+ PLATFORM :freebsd
53+ << :*cirrus_community_vm_template
54+
55+
56+ default_windows_task_template :&windows_task_template
57+ env :
58+ PLATFORM :windows
59+ << :*cirrus_community_vm_template
60+
61+
62+ # macos workers provided by cirrus-ci
63+ default_macos_task_template :&macos_task_template
64+ env :
65+ PLATFORM :macos
66+ macos_instance :
67+ image :$IMAGE
68+
69+
3070# What files to preserve in case tests fail
3171on_failure :&on_failure
3272log_artifacts :
@@ -45,17 +85,14 @@ task:
4585CPUS :2
4686BUILD_JOBS :3
4787TEST_JOBS :3
88+ IMAGE_FAMILY :pg-ci-freebsd-13
89+ DISK_SIZE :50
4890
4991CCACHE_DIR :/tmp/ccache_dir
5092
51- only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*freebsd.*'
93+ << : *freebsd_task_template
5294
53- compute_engine_instance :
54- image_project :$IMAGE_PROJECT
55- image :family/pg-ci-freebsd-13
56- platform :freebsd
57- cpu :$CPUS
58- disk :50
95+ only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*freebsd.*'
5996
6097sysinfo_script :|
6198 id
@@ -152,19 +189,16 @@ task:
152189CPUS :4
153190BUILD_JOBS :4
154191TEST_JOBS :8 # experimentally derived to be a decent choice
192+ IMAGE_FAMILY :pg-ci-bullseye
155193
156194CCACHE_DIR :/tmp/ccache_dir
157195DEBUGINFOD_URLS :" https://debuginfod.debian.net"
158196
159197LINUX_CONFIGURE_FEATURES :*LINUX_CONFIGURE_FEATURES
160198
161- only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
199+ << : *linux_task_template
162200
163- compute_engine_instance :
164- image_project :$IMAGE_PROJECT
165- image :family/pg-ci-bullseye
166- platform :linux
167- cpu :$CPUS
201+ only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
168202
169203ccache_cache :
170204folder :${CCACHE_DIR}
@@ -228,15 +262,15 @@ task:
228262# work OK. See
229263# https://postgr.es/m/20220927040208.l3shfcidovpzqxfh%40awork3.anarazel.de
230264TEST_JOBS :8
265+ IMAGE :ghcr.io/cirruslabs/macos-ventura-base:latest
231266
232267CIRRUS_WORKING_DIR :${HOME}/pgsql/
233268CCACHE_DIR :${HOME}/ccache
234269MACPORTS_CACHE :${HOME}/macports-cache
235270
236- only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*(macos|darwin|osx).*'
271+ << : *macos_task_template
237272
238- macos_instance :
239- image :ghcr.io/cirruslabs/macos-ventura-base:latest
273+ only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*(macos|darwin|osx).*'
240274
241275sysinfo_script :|
242276 id
@@ -360,6 +394,8 @@ task:
360394# build
361395MSBFLAGS :-m -verbosity:minimal "-consoleLoggerParameters:Summary;ForceNoAlign" /p:TrackFileAccess=false -nologo
362396
397+ DISK_SIZE :50
398+
363399# If tests hang forever, cirrus eventually times out. In that case log
364400# output etc is not uploaded, making the problem hard to debug. Of course
365401# tests internally should have shorter timeouts, but that's proven to not
@@ -382,14 +418,11 @@ task:
382418# given that it explicitly prevents crash dumps from working...
383419# 0x8001 is SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX
384420CIRRUS_WINDOWS_ERROR_MODE :0x8001
421+ IMAGE_FAMILY :pg-ci-windows-ci-vs-2019
385422
386- only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
423+ << : *windows_task_template
387424
388- compute_engine_instance :
389- image_project :$IMAGE_PROJECT
390- image :family/pg-ci-windows-ci-vs-2019
391- platform :windows
392- cpu :$CPUS
425+ only_if :$CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
393426
394427sysinfo_script :|
395428 chcp