Skip to content

Commit d4902b6

Browse files
committed
meson: ci: dontmerge: Add additional CI coverage
This is part of the series to be able to test meson on more platforms than normally part of CI. Author: Andres Freund <[email protected]> Author: Nazir Bilal Yavuz <[email protected]> Author: Justin Pryzby <[email protected]>
1 parent c010fd7 commit d4902b6

File tree

6 files changed

+410
-15
lines changed

6 files changed

+410
-15
lines changed

.cirrus.tasks.yml

Lines changed: 185 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,84 @@ task:
214214
cores_script: src/tools/ci/cores_backtrace.sh freebsd /tmp/cores
215215

216216

217+
task:
218+
depends_on: SanityCheck
219+
220+
env:
221+
CPUS: 2
222+
BUILD_JOBS: 3
223+
TEST_JOBS: 3
224+
225+
CIRRUS_WORKING_DIR: /home/postgres/postgres
226+
CCACHE_DIR: /tmp/ccache_dir
227+
228+
PATH: /usr/sbin:$PATH
229+
230+
# Postgres interprets LANG as a 'en_US.UTF-8' but it is 'C', then
231+
# Postgres tries to set 'LC_COLLATE' to 'en_US.UTF-8' but it is not
232+
# changeable. Initdb fails because of that. So, LANG is forced to be 'C'.
233+
LANG: "C"
234+
LC_ALL: "C"
235+
236+
matrix:
237+
- name: NetBSD - 9 - Meson
238+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*netbsd.*'
239+
env:
240+
IMAGE_FAMILY: pg-ci-netbsd-postgres-9-3
241+
INCLUDE_DIRS: -Dextra_lib_dirs=/usr/pkg/lib -Dextra_include_dirs=/usr/pkg/include
242+
<<: *netbsd_task_template
243+
244+
- name: OpenBSD - 7 - Meson
245+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*openbsd.*'
246+
env:
247+
IMAGE_FAMILY: pg-ci-openbsd-postgres-7-3
248+
INCLUDE_DIRS: -Dextra_include_dirs=/usr/local/include -Dextra_lib_dirs=/usr/local/lib
249+
UUID: -Duuid=e2fs
250+
<<: *openbsd_task_template
251+
252+
sysinfo_script: |
253+
locale
254+
id
255+
uname -a
256+
ulimit -a -H && ulimit -a -S
257+
export
258+
259+
ccache_cache:
260+
folder: $CCACHE_DIR
261+
262+
create_user_script: |
263+
useradd postgres
264+
chown -R postgres:users /home/postgres
265+
mkdir -p ${CCACHE_DIR}
266+
chown -R postgres:users ${CCACHE_DIR}
267+
268+
# -Duuid=bsd is not set since 'bsd' uuid option
269+
# is not working on netBSD & openBSD. See
270+
# https://www.postgresql.org/message-id/[email protected]
271+
# And other uuid options are not available on netBSD
272+
configure_script: |
273+
su postgres <<-EOF
274+
meson setup \
275+
--buildtype debug \
276+
-Dcassert=true -Dssl=openssl ${UUID} \
277+
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
278+
${INCLUDE_DIRS} \
279+
build
280+
EOF
281+
282+
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS}'
283+
upload_caches: ccache
284+
285+
test_world_script: |
286+
su postgres <<-EOF
287+
ulimit -c unlimited
288+
meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
289+
EOF
290+
291+
on_failure:
292+
<<: *on_failure_meson
293+
294+
217295
# configure feature flags, shared between the task running the linux tests and
218296
# the CompilerWarnings task
219297
LINUX_CONFIGURE_FEATURES: &LINUX_CONFIGURE_FEATURES >-
@@ -239,6 +317,22 @@ LINUX_MESON_FEATURES: &LINUX_MESON_FEATURES >-
239317
-Duuid=e2fs
240318

241319

320+
# configure preparation scripts, shared between tasks running the linux tests
321+
linux_preparation_scripts_template: &linux_preparation_scripts_template
322+
sysinfo_script: |
323+
id
324+
uname -a
325+
cat /proc/cmdline
326+
ulimit -a -H && ulimit -a -S
327+
export
328+
create_user_script: |
329+
useradd -m -U postgres
330+
chown -R postgres:postgres .
331+
mkdir -p ${CCACHE_DIR}
332+
chown -R postgres:postgres ${CCACHE_DIR}
333+
su postgres -c "ulimit -l -H && ulimit -l -S"
334+
335+
242336
task:
243337
env:
244338
CPUS: 4
@@ -287,19 +381,9 @@ task:
287381
ccache_cache:
288382
folder: ${CCACHE_DIR}
289383

290-
sysinfo_script: |
291-
id
292-
uname -a
293-
cat /proc/cmdline
294-
ulimit -a -H && ulimit -a -S
295-
export
296-
create_user_script: |
297-
useradd -m postgres
298-
chown -R postgres:postgres .
299-
mkdir -p ${CCACHE_DIR}
300-
chown -R postgres:postgres ${CCACHE_DIR}
384+
set_limits_script: |
301385
echo '* - memlock 134217728' > /etc/security/limits.d/postgres.conf
302-
su postgres -c "ulimit -l -H && ulimit -l -S"
386+
<<: *linux_preparation_scripts_template
303387
setup_core_files_script: |
304388
mkdir -m 770 /tmp/cores
305389
chown root:postgres /tmp/cores
@@ -352,7 +436,13 @@ task:
352436
on_failure:
353437
<<: *on_failure_ac
354438

355-
- name: Linux - Debian Bookworm - Meson
439+
- matrix:
440+
- name: Linux - Debian Bookworm - Meson
441+
- name: Linux - Debian Sid - Meson
442+
trigger_type: manual
443+
444+
env:
445+
IMAGE_FAMILY: pg-ci-sid
356446

357447
env:
358448
CCACHE_MAXSIZE: "400M" # tests two different builds
@@ -379,7 +469,7 @@ task:
379469
${LINUX_MESON_FEATURES} \
380470
-Dllvm=disabled \
381471
--pkg-config-path /usr/lib/i386-linux-gnu/pkgconfig/ \
382-
-DPERL=perl5.36-i386-linux-gnu \
472+
-DPERL=$(echo /usr/bin/perl*i386-linux-gnu) \
383473
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
384474
build-32
385475
EOF
@@ -415,7 +505,87 @@ task:
415505

416506

417507
task:
418-
name: macOS - Sonoma - Meson
508+
env:
509+
CPUS: 4
510+
BUILD_JOBS: 4
511+
TEST_JOBS: 8 # experimentally derived to be a decent choice
512+
513+
CCACHE_DIR: /tmp/ccache_dir
514+
DEBUGINFOD_URLS: ${DEBUGINFO}
515+
516+
TCL_DIR: /usr/lib64/
517+
UUID: e2fs
518+
519+
CFLAGS: "-Og -ggdb"
520+
CXXFLAGS: "-Og -ggdb"
521+
522+
LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
523+
524+
depends_on: SanityCheck
525+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
526+
527+
container:
528+
dockerfile: ${DOCKERFILE_PATH}
529+
cpu: $CPUS
530+
memory: 4G
531+
532+
ccache_cache:
533+
folder: ${CCACHE_DIR}
534+
535+
<<: *linux_preparation_scripts_template
536+
537+
matrix:
538+
- name: Linux - OpenSuse Tumbleweed (LLVM) - Meson
539+
env:
540+
DOCKERFILE_PATH: src/tools/ci/docker/linux_opensuse_tumbleweed
541+
DEBUGINFO: "https://debuginfod.opensuse.org/"
542+
LLVM: -Dllvm=enabled
543+
544+
- trigger_type: manual
545+
matrix:
546+
- name: Linux - Fedora Rawhide - Meson
547+
env:
548+
DOCKERFILE_PATH: src/tools/ci/docker/linux_fedora_rawhide
549+
DEBUGINFO: "https://debuginfod.fedoraproject.org/"
550+
551+
# FIXME: figure out how to build RHEL like env
552+
#- name: Linux - Centos 8 - Meson
553+
# env:
554+
# DOCKERFILE_PATH: src/tools/ci/docker/linux_centos8
555+
# DEBUGINFO: "http://debuginfo.centos.org/"
556+
#
557+
#- name: Linux - Centos 7 - Meson
558+
# env:
559+
# DOCKERFILE_PATH: src/tools/ci/docker/linux_centos7
560+
# DEBUGINFO: "http://debuginfo.centos.org/"
561+
562+
configure_script: |
563+
su postgres <<-EOF
564+
meson setup \
565+
--buildtype debug \
566+
-Dcassert=true -Dssl=openssl -Duuid=e2fs ${LLVM} \
567+
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
568+
build
569+
EOF
570+
571+
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS}'
572+
upload_caches: ccache
573+
574+
test_world_script: |
575+
su postgres <<-EOF
576+
ulimit -c unlimited
577+
meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
578+
EOF
579+
580+
on_failure:
581+
<<: *on_failure_meson
582+
crashlog_artifacts:
583+
path: "crashlog-*.txt"
584+
type: text/plain
585+
586+
587+
task:
588+
name: macOS - Ventura - Meson
419589

420590
env:
421591
CPUS: 4 # always get that much for cirrusci macOS instances

.cirrus.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ default_freebsd_task_template: &freebsd_task_template
5252
PLATFORM: freebsd
5353
<<: *cirrus_community_vm_template
5454

55+
default_netbsd_task_template: &netbsd_task_template
56+
env:
57+
PLATFORM: netbsd
58+
<<: *cirrus_community_vm_template
59+
60+
default_openbsd_task_template: &openbsd_task_template
61+
env:
62+
PLATFORM: openbsd
63+
<<: *cirrus_community_vm_template
5564

5665
default_windows_task_template: &windows_task_template
5766
env:

src/tools/ci/docker/linux_centos7

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM centos:centos7
2+
# Enable powertools, EPEL and devtoolset repository
3+
RUN \
4+
yum -y install dnf-plugins-core \
5+
epel-release \
6+
centos-release-scl-rh && \
7+
\
8+
yum -y update && \
9+
yum -y install \
10+
\
11+
git \
12+
perl \
13+
perl-ExtUtils-Embed \
14+
perl-IPC-Run \
15+
perl-Test-Harness \
16+
perl-Test-Simple \
17+
\
18+
bison \
19+
ccache \
20+
clang \
21+
devtoolset-7-make \
22+
flex \
23+
gcc \
24+
gettext \
25+
\
26+
krb5-devel \
27+
libicu-devel \
28+
libuuid-devel \
29+
libxml2-devel \
30+
libxslt-devel \
31+
libzstd-devel \
32+
lz4-devel \
33+
openldap-devel \
34+
openssl-devel \
35+
pam-devel \
36+
python3-devel \
37+
readline-devel \
38+
systemd-devel \
39+
tcl-devel \
40+
\
41+
krb5-server \
42+
krb5-server-ldap \
43+
krb5-workstation \
44+
lz4 \
45+
openldap-clients \
46+
openldap-servers \
47+
openssl \
48+
zstd \
49+
\
50+
&& \
51+
pip3 install meson && \
52+
pip3 install ninja && \
53+
yum clean all
54+
55+
# Make version is 3.82 but required is > 4, adding devtoolset-7-make to the PATH
56+
ENV PATH="/opt/rh/devtoolset-7/root/usr/bin/:${PATH}"
57+
ENV LANG=en_US.UTF-8

src/tools/ci/docker/linux_centos8

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
FROM quay.io/centos/centos:stream8
2+
# Enable powertools and EPEL repository
3+
RUN \
4+
dnf -y install dnf-plugins-core && \
5+
dnf config-manager --set-enabled powertools && \
6+
dnf -y install epel-release && \
7+
dnf -y update && \
8+
dnf -y install \
9+
\
10+
git \
11+
meson \
12+
perl \
13+
perl-IPC-Run \
14+
\
15+
bison \
16+
ccache \
17+
clang \
18+
diffutils \
19+
flex \
20+
gcc \
21+
gettext \
22+
\
23+
krb5-devel \
24+
libicu-devel \
25+
libuuid-devel \
26+
libxml2-devel \
27+
libxslt-devel \
28+
libzstd-devel \
29+
llvm-devel \
30+
lz4-devel \
31+
openldap-devel \
32+
openssl-devel \
33+
pam-devel \
34+
python3-devel \
35+
readline-devel \
36+
systemd-devel \
37+
tcl-devel \
38+
\
39+
krb5-server \
40+
krb5-server-ldap \
41+
krb5-workstation \
42+
lz4 \
43+
openldap-clients \
44+
openldap-servers \
45+
openssl \
46+
zstd \
47+
\
48+
glibc-langpack-en \
49+
\
50+
&& \
51+
pip3 install ninja && \
52+
yum clean all
53+
54+
ENV LANG=en_US.UTF-8

0 commit comments

Comments
 (0)