@@ -142,6 +142,90 @@ task:
142
142
cores_script : src/tools/ci/cores_backtrace.sh freebsd /tmp/cores
143
143
144
144
145
+ task :
146
+ env :
147
+ CPUS : 2
148
+ BUILD_JOBS : 3
149
+ TEST_JOBS : 3
150
+
151
+ CIRRUS_WORKING_DIR : /home/postgres/postgres
152
+ CCACHE_DIR : /tmp/ccache_dir
153
+
154
+ PATH : /usr/sbin:$PATH
155
+
156
+ # Postgres interprets LANG as a 'en_US.UTF-8' but it is 'C', then
157
+ # Postgres tries to set 'LC_COLLATE' to 'en_US.UTF-8' but it is not
158
+ # changeable. Initdb fails because of that. So, LANG is forced to be 'C'.
159
+ LANG : " C"
160
+ LC_ALL : " C"
161
+
162
+ matrix :
163
+ - name : NetBSD - 9 - Meson
164
+ only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*netbsd.*'
165
+ env :
166
+ IMAGE_NAME : pg-ci-netbsd-9-postgres
167
+ PLATFORM : netbsd
168
+ INCLUDE_DIRS : -Dextra_lib_dirs=/usr/pkg/lib -Dextra_include_dirs=/usr/pkg/include
169
+
170
+ - name : OpenBSD - 7 - Meson
171
+ only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*openbsd.*'
172
+ env :
173
+ IMAGE_NAME : pg-ci-openbsd-7-postgres
174
+ PLATFORM : openbsd
175
+ INCLUDE_DIRS : -Dextra_include_dirs=/usr/local/include -Dextra_lib_dirs=/usr/local/lib
176
+ UUID : -Duuid=e2fs
177
+
178
+ compute_engine_instance :
179
+ image_project : $IMAGE_PROJECT
180
+ image : family/${IMAGE_NAME}
181
+ platform : ${PLATFORM}
182
+ cpu : $CPUS
183
+ memory : 4G
184
+ disk : 25
185
+
186
+ sysinfo_script : |
187
+ locale
188
+ id
189
+ uname -a
190
+ ulimit -a -H && ulimit -a -S
191
+ export
192
+
193
+ ccache_cache :
194
+ folder : $CCACHE_DIR
195
+
196
+ create_user_script : |
197
+ useradd postgres
198
+ chown -R postgres:users /home/postgres
199
+ mkdir -p ${CCACHE_DIR}
200
+ chown -R postgres:users ${CCACHE_DIR}
201
+
202
+ # -Duuid=bsd is not set since 'bsd' uuid option
203
+ # is not working on netBSD & openBSD. See
204
+ # https://www.postgresql.org/message-id/[email protected]
205
+ # And other uuid options are not available on netBSD
206
+ configure_script : |
207
+ su postgres <<-EOF
208
+ meson setup \
209
+ --buildtype debug \
210
+ -Dcassert=true -Dssl=openssl ${UUID} \
211
+ -DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
212
+ ${INCLUDE_DIRS} \
213
+ build
214
+ EOF
215
+
216
+ build_script : su postgres -c 'ninja -C build -j${BUILD_JOBS}'
217
+ upload_caches : ccache
218
+
219
+ test_world_script : |
220
+ su postgres <<-EOF
221
+ ulimit -c unlimited
222
+ meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
223
+ EOF
224
+
225
+ on_failure :
226
+ << : *on_failure_meson
227
+
228
+
145
229
# configure feature flags, shared between the task running the linux tests and
146
230
# the CompilerWarnings task
147
231
LINUX_CONFIGURE_FEATURES : &LINUX_CONFIGURE_FEATURES >-
@@ -168,6 +252,22 @@ LINUX_MESON_FEATURES: &LINUX_MESON_FEATURES >-
168
252
-Duuid=e2fs
169
253
170
254
255
+ # configure preparation scripts, shared between tasks running the linux tests
256
+ linux_preparation_scripts_template : &linux_preparation_scripts_template
257
+ sysinfo_script : |
258
+ id
259
+ uname -a
260
+ cat /proc/cmdline
261
+ ulimit -a -H && ulimit -a -S
262
+ export
263
+ create_user_script : |
264
+ useradd -m -U postgres
265
+ chown -R postgres:postgres .
266
+ mkdir -p ${CCACHE_DIR}
267
+ chown -R postgres:postgres ${CCACHE_DIR}
268
+ su postgres -c "ulimit -l -H && ulimit -l -S"
269
+
270
+
171
271
task :
172
272
env :
173
273
CPUS : 4
@@ -197,19 +297,9 @@ task:
197
297
ccache_cache :
198
298
folder : ${CCACHE_DIR}
199
299
200
- sysinfo_script : |
201
- id
202
- uname -a
203
- cat /proc/cmdline
204
- ulimit -a -H && ulimit -a -S
205
- export
206
- create_user_script : |
207
- useradd -m postgres
208
- chown -R postgres:postgres .
209
- mkdir -p ${CCACHE_DIR}
210
- chown -R postgres:postgres ${CCACHE_DIR}
300
+ set_limits_script : |
211
301
echo '* - memlock 134217728' > /etc/security/limits.d/postgres.conf
212
- su postgres -c "ulimit -l -H && ulimit -l -S"
302
+ << : *linux_preparation_scripts_template
213
303
setup_core_files_script : |
214
304
mkdir -m 770 /tmp/cores
215
305
chown root:postgres /tmp/cores
@@ -243,7 +333,13 @@ task:
243
333
on_failure :
244
334
<< : *on_failure_ac
245
335
246
- - name : Linux - Debian Bullseye - Meson
336
+ - matrix :
337
+ - name : Linux - Debian Bullseye - Meson
338
+ - name : Linux - Debian Sid - Meson
339
+ trigger_type : manual
340
+
341
+ compute_engine_instance :
342
+ image : family/pg-ci-sid
247
343
248
344
env :
249
345
CCACHE_MAXSIZE : " 400M" # tests two different builds
@@ -304,6 +400,81 @@ task:
304
400
cores_script : src/tools/ci/cores_backtrace.sh linux /tmp/cores
305
401
306
402
403
+ task :
404
+ env :
405
+ CPUS : 4
406
+ BUILD_JOBS : 4
407
+ TEST_JOBS : 8 # experimentally derived to be a decent choice
408
+
409
+ CCACHE_DIR : /tmp/ccache_dir
410
+ DEBUGINFOD_URLS : ${DEBUGINFO}
411
+
412
+ TCL_DIR : /usr/lib64/
413
+ UUID : e2fs
414
+
415
+ CFLAGS : " -Og -ggdb"
416
+ CXXFLAGS : " -Og -ggdb"
417
+
418
+ LINUX_CONFIGURE_FEATURES : *LINUX_CONFIGURE_FEATURES
419
+
420
+ only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
421
+
422
+ container :
423
+ dockerfile : ${DOCKERFILE_PATH}
424
+ cpu : $CPUS
425
+ memory : 4G
426
+
427
+ ccache_cache :
428
+ folder : ${CCACHE_DIR}
429
+
430
+ << : *linux_preparation_scripts_template
431
+
432
+ matrix :
433
+ - name : Linux - OpenSuse Tumbleweed (LLVM) - Meson
434
+ env :
435
+ DOCKERFILE_PATH : src/tools/ci/docker/linux_opensuse_tumbleweed
436
+ DEBUGINFO : " https://debuginfod.opensuse.org/"
437
+ LLVM : -Dllvm=enabled
438
+
439
+ - trigger_type : manual
440
+ matrix :
441
+ - name : Linux - Fedora Rawhide - Meson
442
+ env :
443
+ DOCKERFILE_PATH : src/tools/ci/docker/linux_fedora_rawhide
444
+ DEBUGINFO : " https://debuginfod.fedoraproject.org/"
445
+
446
+ - name : Linux - Centos 8 - Meson
447
+ env :
448
+ DOCKERFILE_PATH : src/tools/ci/docker/linux_centos8
449
+ DEBUGINFO : " http://debuginfo.centos.org/"
450
+
451
+ - name : Linux - Centos 7 - Meson
452
+ env :
453
+ DOCKERFILE_PATH : src/tools/ci/docker/linux_centos7
454
+ DEBUGINFO : " http://debuginfo.centos.org/"
455
+
456
+ configure_script : |
457
+ su postgres <<-EOF
458
+ meson setup \
459
+ --buildtype debug \
460
+ -Dcassert=true -Dssl=openssl -Duuid=e2fs ${LLVM} \
461
+ -DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
462
+ build
463
+ EOF
464
+
465
+ build_script : su postgres -c 'ninja -C build -j${BUILD_JOBS}'
466
+ upload_caches : ccache
467
+
468
+ test_world_script : |
469
+ su postgres <<-EOF
470
+ ulimit -c unlimited
471
+ meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
472
+ EOF
473
+
474
+ on_failure :
475
+ << : *on_failure_meson
476
+
477
+
307
478
task :
308
479
name : macOS - Monterey - Meson
309
480
@@ -408,9 +579,7 @@ task:
408
579
cores_script : src/tools/ci/cores_backtrace.sh macos "${HOME}/cores"
409
580
410
581
411
- task :
412
- name : Windows - Server 2019, VS 2019 - Meson & ninja
413
-
582
+ windows_template : &windows_template
414
583
env :
415
584
# Half the allowed per-user CPU cores
416
585
CPUS : 4
@@ -426,6 +595,20 @@ task:
426
595
# Avoids port conflicts between concurrent tap test runs
427
596
PG_TEST_USE_UNIX_SOCKETS : 1
428
597
PG_REGRESS_SOCK_DIR : " c:/cirrus/"
598
+ # -m enables parallelism
599
+ # verbosity:minimal + Summary reduce verbosity, while keeping a summary of
600
+ # errors/warnings
601
+ # ForceNoAlign prevents msbuild from introducing line-breaks for long lines
602
+ # disable file tracker, we're never going to rebuild, and it slows down the
603
+ # build
604
+ MSBFLAGS : -m -verbosity:minimal "-consoleLoggerParameters:Summary;ForceNoAlign" /p:TrackFileAccess=false -nologo
605
+
606
+ # If tests hang forever, cirrus eventually times out. In that case log
607
+ # output etc is not uploaded, making the problem hard to debug. Of course
608
+ # tests internally should have shorter timeouts, but that's proven to not
609
+ # be sufficient. 15min currently is fast enough to finish individual test
610
+ # "suites".
611
+ T_C : " \" C:/Program Files/Git/usr/bin/timeout.exe\" -v -k60s 15m"
429
612
430
613
# startcreate_script starts a postgres instance that we don't want to get
431
614
# killed at the end of that script (it's stopped in stop_script). Can't
@@ -459,6 +642,16 @@ task:
459
642
setup_additional_packages_script : |
460
643
REM choco install -y --no-progress ...
461
644
645
+
646
+ task :
647
+ << : *windows_template
648
+ name : Windows - Server 2019, VS 2019 - Meson & ninja
649
+
650
+ meson_install_wraps_script : |
651
+ mkdir subprojects
652
+ meson wrap install lz4
653
+ meson wrap install zlib
654
+
462
655
# Use /DEBUG:FASTLINK to avoid high memory usage during linking
463
656
configure_script : |
464
657
vcvarsall x64
@@ -479,6 +672,103 @@ task:
479
672
type : text/plain
480
673
481
674
675
+ task :
676
+ << : *windows_template
677
+ name : Windows - Server 2019, VS 2019 - Meson & msbuild
678
+
679
+ meson_install_wraps_script : |
680
+ mkdir subprojects
681
+ meson wrap install lz4
682
+ meson wrap install zlib
683
+
684
+ configure_script : |
685
+ vcvarsall x64
686
+ meson setup --buildtype debug --backend vs -Dcassert=true -Db_pch=true -Dssl=openssl -Dlz4=enabled -Dzlib=enabled -Dextra_lib_dirs=c:\openssl\1.1\lib -Dextra_include_dirs=c:\openssl\1.1\include -DTAR=c:/windows/system32/tar.exe -DPG_TEST_EXTRA="%PG_TEST_EXTRA%" build
687
+
688
+ build_script : |
689
+ vcvarsall x64
690
+ msbuild %MSBFLAGS% build\postgresql.sln
691
+
692
+ check_world_script : |
693
+ vcvarsall x64
694
+ meson test %MTEST_ARGS% --num-processes %TEST_JOBS%
695
+
696
+ on_failure :
697
+ << : *on_failure_meson
698
+ crashlog_artifacts :
699
+ path : " crashlog-*.txt"
700
+ type : text/plain
701
+
702
+
703
+ task :
704
+ << : *windows_template
705
+ name : Windows - Server 2019, VS 2019 - Homegrown
706
+
707
+ env :
708
+ # Our windows infrastructure doesn't have test concurrency above the level
709
+ # of a single vcregress test target. Due to that, it's useful to run prove
710
+ # with multiple jobs. For the other tasks it isn't, because two sources
711
+ # (make and prove) of concurrency can overload machines.
712
+ #
713
+ # The concrete choice of 10 is based on a small bit of experimentation and
714
+ # likely can be improved upon further.
715
+ PROVE_FLAGS : -j10 --timer
716
+
717
+ configure_script :
718
+ # copy errors out when using forward slashes
719
+ - copy src\tools\ci\windows_build_config.pl src\tools\msvc\config.pl
720
+ - vcvarsall x64
721
+ - perl src/tools/msvc/mkvcbuild.pl
722
+ build_script :
723
+ - vcvarsall x64
724
+ - msbuild %MSBFLAGS% pgsql.sln
725
+ tempinstall_script :
726
+ # Installation on windows currently only completely works from src/tools/msvc
727
+ - cd src/tools/msvc && perl install.pl %CIRRUS_WORKING_DIR%/tmp_install
728
+
729
+ test_regress_parallel_script : |
730
+ %T_C% perl src/tools/msvc/vcregress.pl check parallel
731
+ startcreate_script : |
732
+ rem paths to binaries need backslashes
733
+ tmp_install\bin\pg_ctl.exe initdb -D tmp_check/db -l tmp_check/initdb.log --options=--no-sync
734
+ echo include '%TEMP_CONFIG%' >> tmp_check/db/postgresql.conf
735
+ tmp_install\bin\pg_ctl.exe start -D tmp_check/db -l tmp_check/postmaster.log
736
+
737
+ test_pl_script : |
738
+ %T_C% perl src/tools/msvc/vcregress.pl plcheck
739
+ test_isolation_script : |
740
+ %T_C% perl src/tools/msvc/vcregress.pl isolationcheck
741
+ test_modules_script : |
742
+ %T_C% perl src/tools/msvc/vcregress.pl modulescheck
743
+ test_contrib_script : |
744
+ %T_C% perl src/tools/msvc/vcregress.pl contribcheck
745
+ stop_script : |
746
+ tmp_install\bin\pg_ctl.exe stop -D tmp_check/db -l tmp_check/postmaster.log
747
+ test_ssl_script : |
748
+ set with_ssl=openssl
749
+ %T_C% perl src/tools/msvc/vcregress.pl taptest ./src/test/ssl/
750
+ test_subscription_script : |
751
+ %T_C% perl src/tools/msvc/vcregress.pl taptest ./src/test/subscription/
752
+ test_authentication_script : |
753
+ %T_C% perl src/tools/msvc/vcregress.pl taptest ./src/test/authentication/
754
+ test_recovery_script : |
755
+ %T_C% perl src/tools/msvc/vcregress.pl recoverycheck
756
+ test_bin_script : |
757
+ %T_C% perl src/tools/msvc/vcregress.pl bincheck
758
+ test_ecpg_script : |
759
+ rem tries to build additional stuff
760
+ vcvarsall x64
761
+ rem References ecpg_regression.proj in the current dir
762
+ cd src/tools/msvc
763
+ %T_C% perl vcregress.pl ecpgcheck
764
+
765
+ on_failure :
766
+ << : *on_failure_ac
767
+ crashlog_artifacts :
768
+ path : " crashlog-*.txt"
769
+ type : text/plain
770
+
771
+
482
772
task :
483
773
name : CompilerWarnings
484
774
0 commit comments