mirror of
https://github.com/postgres/postgres.git
synced 2025-04-18 13:44:19 +03:00
ci: Test NetBSD and OpenBSD
NetBSD and OpenBSD Postgres CI images are now generated [1], but aren't yet utilized for Postgres' CI. This commit adds CI support for them. For now the tasks will be manually triggered, to save on CI credits. [1] https://github.com/anarazel/pg-vm-images Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/CAN55FZ32ySyYa06k9MFd+VY5vHhUyBpvgmJUZae5PihjzaurVg@mail.gmail.com
This commit is contained in:
parent
b64d83115c
commit
e291573534
@ -216,6 +216,98 @@ task:
|
|||||||
cores_script: src/tools/ci/cores_backtrace.sh freebsd /tmp/cores
|
cores_script: src/tools/ci/cores_backtrace.sh freebsd /tmp/cores
|
||||||
|
|
||||||
|
|
||||||
|
task:
|
||||||
|
depends_on: SanityCheck
|
||||||
|
trigger_type: manual
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Below are experimentally derived to be a decent choice.
|
||||||
|
CPUS: 4
|
||||||
|
BUILD_JOBS: 8
|
||||||
|
TEST_JOBS: 8
|
||||||
|
|
||||||
|
# Default working directory is /tmp, but its total size (1.2 GB) is not
|
||||||
|
# enough, so different working and cache directory are set.
|
||||||
|
CIRRUS_WORKING_DIR: /home/postgres/postgres
|
||||||
|
CCACHE_DIR: /home/postgres/cache
|
||||||
|
|
||||||
|
PATH: /usr/sbin:$PATH
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
- name: NetBSD - Meson
|
||||||
|
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*netbsd.*'
|
||||||
|
env:
|
||||||
|
IMAGE_FAMILY: pg-ci-netbsd-postgres
|
||||||
|
PKGCONFIG_PATH: '/usr/lib/pkgconfig:/usr/pkg/lib/pkgconfig'
|
||||||
|
# initdb fails with: 'invalid locale settings' error on NetBSD.
|
||||||
|
# Force 'LANG' and 'LC_*' variables to be 'C'.
|
||||||
|
# See https://postgr.es/m/2490325.1734471752%40sss.pgh.pa.us
|
||||||
|
LANG: "C"
|
||||||
|
LC_ALL: "C"
|
||||||
|
# -Duuid is not set for the NetBSD, see the comment below, above
|
||||||
|
# configure_script, for more information.
|
||||||
|
setup_additional_packages_script: |
|
||||||
|
#pkgin -y install ...
|
||||||
|
<<: *netbsd_task_template
|
||||||
|
|
||||||
|
- name: OpenBSD - Meson
|
||||||
|
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*openbsd.*'
|
||||||
|
env:
|
||||||
|
IMAGE_FAMILY: pg-ci-openbsd-postgres
|
||||||
|
PKGCONFIG_PATH: '/usr/lib/pkgconfig:/usr/local/lib/pkgconfig'
|
||||||
|
UUID: -Duuid=e2fs
|
||||||
|
TCL: -Dtcl_version=tcl86
|
||||||
|
setup_additional_packages_script: |
|
||||||
|
#pkg_add -I ...
|
||||||
|
<<: *openbsd_task_template
|
||||||
|
|
||||||
|
sysinfo_script: |
|
||||||
|
locale
|
||||||
|
id
|
||||||
|
uname -a
|
||||||
|
ulimit -a -H && ulimit -a -S
|
||||||
|
env
|
||||||
|
|
||||||
|
ccache_cache:
|
||||||
|
folder: $CCACHE_DIR
|
||||||
|
|
||||||
|
create_user_script: |
|
||||||
|
useradd postgres
|
||||||
|
chown -R postgres:users /home/postgres
|
||||||
|
mkdir -p ${CCACHE_DIR}
|
||||||
|
chown -R postgres:users ${CCACHE_DIR}
|
||||||
|
|
||||||
|
# -Duuid=bsd is not set since 'bsd' uuid option
|
||||||
|
# is not working on NetBSD & OpenBSD. See
|
||||||
|
# https://www.postgresql.org/message-id/17358-89806e7420797025@postgresql.org
|
||||||
|
# And other uuid options are not available on NetBSD.
|
||||||
|
configure_script: |
|
||||||
|
su postgres <<-EOF
|
||||||
|
meson setup \
|
||||||
|
--buildtype=debugoptimized \
|
||||||
|
--pkg-config-path ${PKGCONFIG_PATH} \
|
||||||
|
-Dcassert=true -Dinjection_points=true \
|
||||||
|
-Dssl=openssl ${UUID} ${TCL} \
|
||||||
|
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
|
||||||
|
build
|
||||||
|
EOF
|
||||||
|
|
||||||
|
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS}'
|
||||||
|
upload_caches: ccache
|
||||||
|
|
||||||
|
test_world_script: |
|
||||||
|
su postgres <<-EOF
|
||||||
|
ulimit -c unlimited
|
||||||
|
# Otherwise tests will fail on OpenBSD, due to inability to start enough
|
||||||
|
# processes.
|
||||||
|
ulimit -p 256
|
||||||
|
meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
on_failure:
|
||||||
|
<<: *on_failure_meson
|
||||||
|
|
||||||
|
|
||||||
# configure feature flags, shared between the task running the linux tests and
|
# configure feature flags, shared between the task running the linux tests and
|
||||||
# the CompilerWarnings task
|
# the CompilerWarnings task
|
||||||
LINUX_CONFIGURE_FEATURES: &LINUX_CONFIGURE_FEATURES >-
|
LINUX_CONFIGURE_FEATURES: &LINUX_CONFIGURE_FEATURES >-
|
||||||
|
10
.cirrus.yml
10
.cirrus.yml
@ -52,6 +52,16 @@ default_freebsd_task_template: &freebsd_task_template
|
|||||||
PLATFORM: freebsd
|
PLATFORM: freebsd
|
||||||
<<: *cirrus_community_vm_template
|
<<: *cirrus_community_vm_template
|
||||||
|
|
||||||
|
default_netbsd_task_template: &netbsd_task_template
|
||||||
|
env:
|
||||||
|
PLATFORM: netbsd
|
||||||
|
<<: *cirrus_community_vm_template
|
||||||
|
|
||||||
|
default_openbsd_task_template: &openbsd_task_template
|
||||||
|
env:
|
||||||
|
PLATFORM: openbsd
|
||||||
|
<<: *cirrus_community_vm_template
|
||||||
|
|
||||||
|
|
||||||
default_windows_task_template: &windows_task_template
|
default_windows_task_template: &windows_task_template
|
||||||
env:
|
env:
|
||||||
|
@ -61,7 +61,7 @@ Controlling CI via commit messages
|
|||||||
The behavior of CI can be controlled by special content in commit
|
The behavior of CI can be controlled by special content in commit
|
||||||
messages. Currently the following controls are available:
|
messages. Currently the following controls are available:
|
||||||
|
|
||||||
- ci-os-only: {(freebsd|linux|macos|windows|mingw)}
|
- ci-os-only: {(freebsd|linux|macos|mingw|netbsd|openbsd|windows)}
|
||||||
|
|
||||||
Only runs CI on operating systems specified. This can be useful when
|
Only runs CI on operating systems specified. This can be useful when
|
||||||
addressing portability issues affecting only a subset of platforms.
|
addressing portability issues affecting only a subset of platforms.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user