2021-12-31 10:59:20 +08:00
|
|
|
# CI configuration file for CI utilizing cirrus-ci.org
|
|
|
|
#
|
|
|
|
# For instructions on how to enable the CI integration in a repository and
|
|
|
|
# further details, see src/tools/ci/README
|
|
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Source of images / containers
|
|
|
|
GCP_PROJECT: pg-ci-images
|
|
|
|
IMAGE_PROJECT: $GCP_PROJECT
|
|
|
|
CONTAINER_REPO: us-docker.pkg.dev/${GCP_PROJECT}/ci
|
|
|
|
|
|
|
|
# The lower depth accelerates git clone. Use a bit of depth so that
|
|
|
|
# concurrent tasks and retrying older jobs has a chance of working.
|
|
|
|
CIRRUS_CLONE_DEPTH: 500
|
|
|
|
# Useful to be able to analyse what in a script takes long
|
|
|
|
CIRRUS_LOG_TIMESTAMP: true
|
|
|
|
|
|
|
|
CCACHE_MAXSIZE: "250M"
|
|
|
|
|
|
|
|
# target to test, for all but windows
|
|
|
|
CHECK: check-world PROVE_FLAGS=$PROVE_FLAGS
|
|
|
|
CHECKFLAGS: -Otarget
|
|
|
|
PROVE_FLAGS: --timer
|
2022-09-22 12:53:18 +08:00
|
|
|
MTEST_ARGS: --print-errorlogs --no-rebuild -C build
|
2021-12-31 10:59:20 +08:00
|
|
|
PGCTLTIMEOUT: 120 # avoids spurious failures during parallel tests
|
|
|
|
TEMP_CONFIG: ${CIRRUS_WORKING_DIR}/src/tools/ci/pg_ci_base.conf
|
|
|
|
PG_TEST_EXTRA: kerberos ldap ssl
|
|
|
|
|
|
|
|
|
|
|
|
# What files to preserve in case tests fail
|
2022-09-22 12:53:18 +08:00
|
|
|
on_failure_ac: &on_failure_ac
|
2021-12-31 10:59:20 +08:00
|
|
|
log_artifacts:
|
2022-02-13 07:29:08 +08:00
|
|
|
paths:
|
|
|
|
- "**/*.log"
|
2022-02-13 11:38:06 +08:00
|
|
|
- "**/*.diffs"
|
2022-02-13 07:29:08 +08:00
|
|
|
- "**/regress_log_*"
|
2021-12-31 10:59:20 +08:00
|
|
|
type: text/plain
|
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
on_failure_meson: &on_failure_meson
|
|
|
|
testrun_artifacts:
|
|
|
|
paths:
|
|
|
|
- "build/testrun/**/*.log"
|
|
|
|
- "build/testrun/**/*.diffs"
|
|
|
|
- "build/testrun/**/regress_log_*"
|
|
|
|
type: text/plain
|
|
|
|
|
|
|
|
# In theory it'd be nice to upload the junit files meson generates, so that
|
|
|
|
# cirrus will nicely annotate the commit. Unfortunately the files don't
|
|
|
|
# contain identifieable file + line numbers right now, so the annotations
|
|
|
|
# don't end up useful. We could probably improve on that with a some custom
|
|
|
|
# conversion script, but ...
|
|
|
|
meson_log_artifacts:
|
|
|
|
path: "build/meson-logs/*.txt"
|
|
|
|
type: text/plain
|
|
|
|
|
|
|
|
|
2021-12-31 10:59:20 +08:00
|
|
|
task:
|
2022-09-22 12:53:18 +08:00
|
|
|
name: FreeBSD - 13 - Meson
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
# FreeBSD on GCP is slow when running with larger number of CPUS /
|
|
|
|
# jobs. Using one more job than cpus seems to work best.
|
|
|
|
CPUS: 2
|
|
|
|
BUILD_JOBS: 3
|
|
|
|
TEST_JOBS: 3
|
|
|
|
|
|
|
|
CCACHE_DIR: /tmp/ccache_dir
|
2022-09-22 12:53:18 +08:00
|
|
|
CFLAGS: -Og -ggdb
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*freebsd.*'
|
|
|
|
|
|
|
|
compute_engine_instance:
|
|
|
|
image_project: $IMAGE_PROJECT
|
2022-08-01 08:40:42 +08:00
|
|
|
image: family/pg-ci-freebsd-13
|
2021-12-31 10:59:20 +08:00
|
|
|
platform: freebsd
|
|
|
|
cpu: $CPUS
|
2022-09-22 07:35:46 +08:00
|
|
|
memory: 4G
|
2021-12-31 10:59:20 +08:00
|
|
|
disk: 50
|
|
|
|
|
|
|
|
sysinfo_script: |
|
|
|
|
id
|
|
|
|
uname -a
|
|
|
|
ulimit -a -H && ulimit -a -S
|
|
|
|
export
|
|
|
|
|
|
|
|
ccache_cache:
|
|
|
|
folder: $CCACHE_DIR
|
|
|
|
# Workaround around performance issues due to 32KB block size
|
|
|
|
repartition_script: src/tools/ci/gcp_freebsd_repartition.sh
|
|
|
|
create_user_script: |
|
|
|
|
pw useradd postgres
|
|
|
|
chown -R postgres:postgres .
|
|
|
|
mkdir -p ${CCACHE_DIR}
|
|
|
|
chown -R postgres:postgres ${CCACHE_DIR}
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_core_files_script: |
|
2021-12-31 10:59:20 +08:00
|
|
|
mkdir -m 770 /tmp/cores
|
|
|
|
chown root:postgres /tmp/cores
|
|
|
|
sysctl kern.corefile='/tmp/cores/%N.%P.core'
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_additional_packages_script: |
|
|
|
|
#pkg install -y ...
|
2021-12-31 10:59:20 +08:00
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
# NB: Intentionally build without -Dllvm. The freebsd image size is already
|
|
|
|
# large enough to make VM startup slow, and even without llvm freebsd
|
|
|
|
# already takes longer than other platforms except for windows.
|
2021-12-31 10:59:20 +08:00
|
|
|
configure_script: |
|
|
|
|
su postgres <<-EOF
|
2022-09-22 12:53:18 +08:00
|
|
|
meson setup \
|
|
|
|
--buildtype=debug \
|
|
|
|
-Dcassert=true -Dssl=openssl -Duuid=bsd -Dtcl_version=tcl86 -Ddtrace=auto \
|
|
|
|
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
|
2022-09-23 11:36:28 +08:00
|
|
|
-Dextra_lib_dirs=/usr/local/lib -Dextra_include_dirs=/usr/local/include/ \
|
2022-09-22 12:53:18 +08:00
|
|
|
build
|
2021-12-31 10:59:20 +08:00
|
|
|
EOF
|
2022-09-22 12:53:18 +08:00
|
|
|
build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS}'
|
2021-12-31 10:59:20 +08:00
|
|
|
upload_caches: ccache
|
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
test_world_script: |
|
|
|
|
su postgres <<-EOF
|
|
|
|
ulimit -c unlimited
|
|
|
|
meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
|
|
|
|
EOF
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
on_failure:
|
2022-09-22 12:53:18 +08:00
|
|
|
<<: *on_failure_meson
|
2021-12-31 10:59:20 +08:00
|
|
|
cores_script: src/tools/ci/cores_backtrace.sh freebsd /tmp/cores
|
|
|
|
|
|
|
|
|
|
|
|
# configure feature flags, shared between the task running the linux tests and
|
|
|
|
# the CompilerWarnings task
|
|
|
|
LINUX_CONFIGURE_FEATURES: &LINUX_CONFIGURE_FEATURES >-
|
|
|
|
--with-gssapi
|
|
|
|
--with-icu
|
|
|
|
--with-ldap
|
|
|
|
--with-libxml
|
|
|
|
--with-libxslt
|
|
|
|
--with-llvm
|
|
|
|
--with-lz4
|
|
|
|
--with-pam
|
|
|
|
--with-perl
|
|
|
|
--with-python
|
|
|
|
--with-selinux
|
|
|
|
--with-ssl=openssl
|
|
|
|
--with-systemd
|
|
|
|
--with-tcl --with-tclconfig=/usr/lib/tcl8.6/
|
|
|
|
--with-uuid=ossp
|
2022-03-31 00:33:28 +08:00
|
|
|
--with-zstd
|
2021-12-31 10:59:20 +08:00
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
LINUX_MESON_FEATURES: &LINUX_MESON_FEATURES >-
|
|
|
|
-Dllvm=enabled
|
|
|
|
-Dssl=openssl
|
|
|
|
-Duuid=e2fs
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
task:
|
2021-12-31 10:59:20 +08:00
|
|
|
env:
|
|
|
|
CPUS: 4
|
|
|
|
BUILD_JOBS: 4
|
|
|
|
TEST_JOBS: 8 # experimentally derived to be a decent choice
|
|
|
|
|
|
|
|
CCACHE_DIR: /tmp/ccache_dir
|
|
|
|
DEBUGINFOD_URLS: "https://debuginfod.debian.net"
|
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
CFLAGS: -Og -ggdb
|
|
|
|
CXXFLAGS: -Og -ggdb
|
|
|
|
CC: ccache gcc
|
|
|
|
CXX: ccache g++
|
|
|
|
|
2021-12-31 10:59:20 +08:00
|
|
|
LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
|
2022-09-22 12:53:18 +08:00
|
|
|
LINUX_MESON_FEATURES: *LINUX_MESON_FEATURES
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
|
|
|
|
|
|
|
|
compute_engine_instance:
|
|
|
|
image_project: $IMAGE_PROJECT
|
|
|
|
image: family/pg-ci-bullseye
|
|
|
|
platform: linux
|
|
|
|
cpu: $CPUS
|
2022-09-22 07:35:46 +08:00
|
|
|
memory: 4G
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
ccache_cache:
|
|
|
|
folder: ${CCACHE_DIR}
|
|
|
|
|
|
|
|
sysinfo_script: |
|
|
|
|
id
|
|
|
|
uname -a
|
|
|
|
cat /proc/cmdline
|
|
|
|
ulimit -a -H && ulimit -a -S
|
|
|
|
export
|
|
|
|
create_user_script: |
|
|
|
|
useradd -m postgres
|
|
|
|
chown -R postgres:postgres .
|
|
|
|
mkdir -p ${CCACHE_DIR}
|
|
|
|
chown -R postgres:postgres ${CCACHE_DIR}
|
|
|
|
echo '* - memlock 134217728' > /etc/security/limits.d/postgres.conf
|
|
|
|
su postgres -c "ulimit -l -H && ulimit -l -S"
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_core_files_script: |
|
2021-12-31 10:59:20 +08:00
|
|
|
mkdir -m 770 /tmp/cores
|
|
|
|
chown root:postgres /tmp/cores
|
|
|
|
sysctl kernel.core_pattern='/tmp/cores/%e-%s-%p.core'
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_additional_packages_script: |
|
|
|
|
#apt-get update
|
|
|
|
#DEBIAN_FRONTEND=noninteractive apt-get -y install ...
|
2021-12-31 10:59:20 +08:00
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
matrix:
|
|
|
|
- name: Linux - Debian Bullseye - Autoconf
|
|
|
|
|
|
|
|
configure_script: |
|
|
|
|
su postgres <<-EOF
|
|
|
|
./configure \
|
|
|
|
--enable-cassert --enable-debug --enable-tap-tests \
|
|
|
|
--enable-nls \
|
|
|
|
\
|
|
|
|
${LINUX_CONFIGURE_FEATURES} \
|
|
|
|
\
|
|
|
|
CLANG="ccache clang"
|
|
|
|
EOF
|
|
|
|
build_script: su postgres -c "make -s -j${BUILD_JOBS} world-bin"
|
|
|
|
upload_caches: ccache
|
|
|
|
|
|
|
|
test_world_script: |
|
|
|
|
su postgres <<-EOF
|
|
|
|
ulimit -c unlimited # default is 0
|
|
|
|
make -s ${CHECK} ${CHECKFLAGS} -j${TEST_JOBS}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
on_failure:
|
|
|
|
<<: *on_failure_ac
|
|
|
|
|
|
|
|
- name: Linux - Debian Bullseye - Meson
|
|
|
|
|
|
|
|
configure_script: |
|
|
|
|
su postgres <<-EOF
|
|
|
|
meson setup \
|
|
|
|
--buildtype=debug \
|
|
|
|
-Dcassert=true \
|
|
|
|
${LINUX_MESON_FEATURES} \
|
|
|
|
-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
|
|
|
|
meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
on_failure:
|
|
|
|
<<: *on_failure_meson
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
on_failure:
|
|
|
|
cores_script: src/tools/ci/cores_backtrace.sh linux /tmp/cores
|
|
|
|
|
|
|
|
|
|
|
|
task:
|
2022-09-22 12:53:18 +08:00
|
|
|
name: macOS - Monterey - Meson
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
CPUS: 12 # always get that much for cirrusci macOS instances
|
|
|
|
BUILD_JOBS: $CPUS
|
|
|
|
TEST_JOBS: $CPUS # already fast enough to not be worth tuning
|
|
|
|
|
|
|
|
CIRRUS_WORKING_DIR: ${HOME}/pgsql/
|
|
|
|
CCACHE_DIR: ${HOME}/ccache
|
|
|
|
HOMEBREW_CACHE: ${HOME}/homebrew-cache
|
|
|
|
PERL5LIB: ${HOME}/perl5/lib/perl5
|
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
CC: ccache cc
|
|
|
|
CXX: ccache c++
|
|
|
|
CFLAGS: -Og -ggdb
|
|
|
|
CXXFLAGS: -Og -ggdb
|
|
|
|
|
2021-12-31 10:59:20 +08:00
|
|
|
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*(macos|darwin|osx).*'
|
|
|
|
|
|
|
|
osx_instance:
|
|
|
|
image: monterey-base
|
|
|
|
|
|
|
|
sysinfo_script: |
|
|
|
|
id
|
2022-02-13 07:50:53 +08:00
|
|
|
uname -a
|
2021-12-31 10:59:20 +08:00
|
|
|
ulimit -a -H && ulimit -a -S
|
2022-02-13 07:50:53 +08:00
|
|
|
export
|
2021-12-31 10:59:20 +08:00
|
|
|
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_core_files_script:
|
2021-12-31 10:59:20 +08:00
|
|
|
- mkdir ${HOME}/cores
|
|
|
|
- sudo sysctl kern.corefile="${HOME}/cores/core.%P"
|
|
|
|
|
|
|
|
perl_cache:
|
|
|
|
folder: ~/perl5
|
|
|
|
cpan_install_script:
|
|
|
|
- perl -mIPC::Run -e 1 || cpan -T IPC::Run
|
|
|
|
- perl -mIO::Pty -e 1 || cpan -T IO::Pty
|
|
|
|
upload_caches: perl
|
|
|
|
|
|
|
|
|
|
|
|
# XXX: Could we instead install homebrew into a cached directory? The
|
|
|
|
# homebrew installation takes a good bit of time every time, even if the
|
|
|
|
# packages do not need to be downloaded.
|
|
|
|
homebrew_cache:
|
|
|
|
folder: $HOMEBREW_CACHE
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_additional_packages_script: |
|
2021-12-31 10:59:20 +08:00
|
|
|
brew install \
|
|
|
|
ccache \
|
|
|
|
icu4c \
|
|
|
|
krb5 \
|
|
|
|
llvm \
|
|
|
|
lz4 \
|
|
|
|
make \
|
2022-09-22 12:53:18 +08:00
|
|
|
meson \
|
2021-12-31 10:59:20 +08:00
|
|
|
openldap \
|
|
|
|
openssl \
|
|
|
|
python \
|
2022-03-31 00:33:28 +08:00
|
|
|
tcl-tk \
|
|
|
|
zstd
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
brew cleanup -s # to reduce cache size
|
|
|
|
upload_caches: homebrew
|
|
|
|
|
|
|
|
ccache_cache:
|
|
|
|
folder: $CCACHE_DIR
|
|
|
|
configure_script: |
|
|
|
|
brewpath="/usr/local"
|
2022-09-22 12:53:18 +08:00
|
|
|
PKG_CONFIG_PATH="${brewpath}/lib/pkgconfig:${PKG_CONFIG_PATH}"
|
2021-12-31 10:59:20 +08:00
|
|
|
|
2022-03-31 00:33:28 +08:00
|
|
|
for pkg in icu4c krb5 openldap openssl zstd ; do
|
2021-12-31 10:59:20 +08:00
|
|
|
pkgpath="${brewpath}/opt/${pkg}"
|
|
|
|
PKG_CONFIG_PATH="${pkgpath}/lib/pkgconfig:${PKG_CONFIG_PATH}"
|
2022-09-22 12:53:18 +08:00
|
|
|
PATH="${pkgpath}/bin:${pkgpath}/sbin:$PATH"
|
2021-12-31 10:59:20 +08:00
|
|
|
done
|
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
export PKG_CONFIG_PATH PATH
|
|
|
|
|
|
|
|
meson setup \
|
|
|
|
--buildtype=debug \
|
|
|
|
-Dextra_include_dirs=${brewpath}/include \
|
|
|
|
-Dextra_lib_dirs=${brewpath}/lib \
|
|
|
|
-Dcassert=true \
|
|
|
|
-Dssl=openssl -Duuid=e2fs -Ddtrace=auto \
|
|
|
|
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
|
|
|
|
build
|
|
|
|
|
|
|
|
build_script: ninja -C build -j${BUILD_JOBS}
|
2021-12-31 10:59:20 +08:00
|
|
|
upload_caches: ccache
|
|
|
|
|
|
|
|
test_world_script: |
|
|
|
|
ulimit -c unlimited # default is 0
|
|
|
|
ulimit -n 1024 # default is 256, pretty low
|
2022-09-22 12:53:18 +08:00
|
|
|
meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
on_failure:
|
2022-09-22 12:53:18 +08:00
|
|
|
<<: *on_failure_meson
|
2021-12-31 10:59:20 +08:00
|
|
|
cores_script: src/tools/ci/cores_backtrace.sh macos "${HOME}/cores"
|
|
|
|
|
|
|
|
|
|
|
|
task:
|
2022-09-22 12:53:18 +08:00
|
|
|
name: Windows - Server 2019, VS 2019 - Meson & ninja
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
# Half the allowed per-user CPU cores
|
|
|
|
CPUS: 4
|
2022-09-22 12:53:18 +08:00
|
|
|
TEST_JOBS: 8 # wild guess, data based value welcome
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
# The default cirrus working dir is in a directory msbuild complains about
|
|
|
|
CIRRUS_WORKING_DIR: "c:/cirrus"
|
|
|
|
# Avoid re-installing over and over
|
|
|
|
NO_TEMP_INSTALL: 1
|
|
|
|
# git's tar doesn't deal with drive letters, see
|
|
|
|
# https://postgr.es/m/b6782dc3-a7b0-ed56-175f-f8f54cb08d67%40dunslane.net
|
|
|
|
TAR: "c:/windows/system32/tar.exe"
|
|
|
|
# Avoids port conflicts between concurrent tap test runs
|
|
|
|
PG_TEST_USE_UNIX_SOCKETS: 1
|
|
|
|
PG_REGRESS_SOCK_DIR: "c:/cirrus/"
|
2022-02-03 09:31:54 +08:00
|
|
|
|
2022-03-20 02:32:18 +08:00
|
|
|
# startcreate_script starts a postgres instance that we don't want to get
|
|
|
|
# killed at the end of that script (it's stopped in stop_script). Can't
|
|
|
|
# trivially use background_scripts because a) need pg_ctl's dropping of
|
|
|
|
# permissions b) need to wait for startup to have finished, and we don't
|
|
|
|
# currently have a tool for that...
|
|
|
|
CIRRUS_ESCAPING_PROCESSES: 1
|
2022-02-03 09:31:54 +08:00
|
|
|
|
2022-09-22 08:15:54 +08:00
|
|
|
# Cirrus defaults to SetErrorMode(SEM_NOGPFAULTERRORBOX | ...). That
|
|
|
|
# prevents crash reporting from working unless binaries do SetErrorMode()
|
|
|
|
# themselves. Furthermore, it appears that either python or, more likely,
|
|
|
|
# the C runtime has a bug where SEM_NOGPFAULTERRORBOX can very
|
|
|
|
# occasionally *trigger* a crash on process exit - which is hard to debug,
|
|
|
|
# given that it explicitly prevents crash dumps from working...
|
|
|
|
# 0x8001 is SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX
|
|
|
|
CIRRUS_WINDOWS_ERROR_MODE: 0x8001
|
|
|
|
|
2021-12-31 10:59:20 +08:00
|
|
|
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
|
|
|
|
|
|
|
|
windows_container:
|
|
|
|
image: $CONTAINER_REPO/windows_ci_vs_2019:latest
|
|
|
|
cpu: $CPUS
|
|
|
|
memory: 4G
|
|
|
|
|
|
|
|
sysinfo_script: |
|
|
|
|
chcp
|
|
|
|
systeminfo
|
|
|
|
powershell -Command get-psdrive -psprovider filesystem
|
|
|
|
set
|
|
|
|
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_additional_packages_script: |
|
|
|
|
REM choco install -y --no-progress ...
|
|
|
|
|
2022-09-22 12:53:18 +08:00
|
|
|
# Use /DEBUG:FASTLINK to avoid high memory usage during linking
|
|
|
|
configure_script: |
|
|
|
|
vcvarsall x64
|
|
|
|
meson setup --backend ninja --buildtype debug -Dc_link_args=/DEBUG:FASTLINK -Dcassert=true -Dssl=openssl -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
|
|
|
|
|
|
|
|
build_script: |
|
|
|
|
vcvarsall x64
|
|
|
|
ninja -C build
|
|
|
|
|
|
|
|
check_world_script: |
|
2022-02-03 09:31:54 +08:00
|
|
|
vcvarsall x64
|
2022-09-22 12:53:18 +08:00
|
|
|
meson test %MTEST_ARGS% --num-processes %TEST_JOBS%
|
2021-12-31 10:59:20 +08:00
|
|
|
|
2022-02-03 10:33:25 +08:00
|
|
|
on_failure:
|
2022-09-22 12:53:18 +08:00
|
|
|
<<: *on_failure_meson
|
2022-02-03 10:33:25 +08:00
|
|
|
crashlog_artifacts:
|
2022-02-13 07:29:08 +08:00
|
|
|
path: "crashlog-*.txt"
|
2022-02-03 10:33:25 +08:00
|
|
|
type: text/plain
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
task:
|
|
|
|
name: CompilerWarnings
|
|
|
|
|
|
|
|
# To limit unnecessary work only run this once the normal linux test succeeds
|
|
|
|
depends_on:
|
2022-09-22 12:53:18 +08:00
|
|
|
- Linux - Debian Bullseye - Meson
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
CPUS: 4
|
|
|
|
BUILD_JOBS: 4
|
|
|
|
|
|
|
|
# Use larger ccache cache, as this task compiles with multiple compilers /
|
|
|
|
# flag combinations
|
2022-02-13 06:44:16 +08:00
|
|
|
CCACHE_MAXSIZE: "1GB"
|
2021-12-31 10:59:20 +08:00
|
|
|
CCACHE_DIR: "/tmp/ccache_dir"
|
|
|
|
|
|
|
|
LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
|
2022-09-22 12:53:18 +08:00
|
|
|
LINUX_MESON_FEATURES: *LINUX_MESON_FEATURES
|
2021-12-31 10:59:20 +08:00
|
|
|
|
|
|
|
# task that did not run, count as a success, so we need to recheck Linux'
|
|
|
|
# condition here ...
|
|
|
|
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
|
|
|
|
|
|
|
|
container:
|
|
|
|
image: $CONTAINER_REPO/linux_debian_bullseye_ci:latest
|
|
|
|
cpu: $CPUS
|
|
|
|
|
|
|
|
sysinfo_script: |
|
|
|
|
id
|
|
|
|
uname -a
|
|
|
|
cat /proc/cmdline
|
|
|
|
ulimit -a -H && ulimit -a -S
|
|
|
|
gcc -v
|
|
|
|
clang -v
|
|
|
|
export
|
|
|
|
|
|
|
|
ccache_cache:
|
|
|
|
folder: $CCACHE_DIR
|
|
|
|
|
2022-03-19 06:42:02 +08:00
|
|
|
setup_additional_packages_script: |
|
|
|
|
#apt-get update
|
|
|
|
#DEBIAN_FRONTEND=noninteractive apt-get -y install ...
|
|
|
|
|
2021-12-31 10:59:20 +08:00
|
|
|
###
|
|
|
|
# Test that code can be built with gcc/clang without warnings
|
|
|
|
###
|
|
|
|
|
|
|
|
setup_script: echo "COPT=-Werror" > src/Makefile.custom
|
|
|
|
|
|
|
|
# Trace probes have a history of getting accidentally broken. Use the
|
|
|
|
# different compilers to build with different combinations of dtrace on/off
|
|
|
|
# and cassert on/off.
|
|
|
|
|
|
|
|
# gcc, cassert off, dtrace on
|
|
|
|
always:
|
|
|
|
gcc_warning_script: |
|
|
|
|
time ./configure \
|
|
|
|
--cache gcc.cache \
|
|
|
|
--enable-dtrace \
|
|
|
|
${LINUX_CONFIGURE_FEATURES} \
|
|
|
|
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
|
|
|
|
make -s -j${BUILD_JOBS} clean
|
|
|
|
time make -s -j${BUILD_JOBS} world-bin
|
|
|
|
|
|
|
|
# gcc, cassert on, dtrace off
|
|
|
|
always:
|
|
|
|
gcc_a_warning_script: |
|
|
|
|
time ./configure \
|
|
|
|
--cache gcc.cache \
|
|
|
|
--enable-cassert \
|
|
|
|
${LINUX_CONFIGURE_FEATURES} \
|
|
|
|
CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
|
|
|
|
make -s -j${BUILD_JOBS} clean
|
|
|
|
time make -s -j${BUILD_JOBS} world-bin
|
|
|
|
|
|
|
|
# clang, cassert off, dtrace off
|
|
|
|
always:
|
|
|
|
clang_warning_script: |
|
|
|
|
time ./configure \
|
|
|
|
--cache clang.cache \
|
|
|
|
${LINUX_CONFIGURE_FEATURES} \
|
|
|
|
CC="ccache clang" CXX="ccache clang++" CLANG="ccache clang"
|
|
|
|
make -s -j${BUILD_JOBS} clean
|
|
|
|
time make -s -j${BUILD_JOBS} world-bin
|
|
|
|
|
|
|
|
# clang, cassert on, dtrace on
|
|
|
|
always:
|
|
|
|
clang_a_warning_script: |
|
|
|
|
time ./configure \
|
|
|
|
--cache clang.cache \
|
|
|
|
--enable-cassert \
|
|
|
|
--enable-dtrace \
|
|
|
|
${LINUX_CONFIGURE_FEATURES} \
|
|
|
|
CC="ccache clang" CXX="ccache clang++" CLANG="ccache clang"
|
|
|
|
make -s -j${BUILD_JOBS} clean
|
|
|
|
time make -s -j${BUILD_JOBS} world-bin
|
|
|
|
|
|
|
|
# cross-compile to windows
|
|
|
|
always:
|
|
|
|
mingw_cross_warning_script: |
|
|
|
|
time ./configure \
|
|
|
|
--host=x86_64-w64-mingw32 \
|
|
|
|
--enable-cassert \
|
|
|
|
CC="ccache x86_64-w64-mingw32-gcc" \
|
|
|
|
CXX="ccache x86_64-w64-mingw32-g++"
|
|
|
|
make -s -j${BUILD_JOBS} clean
|
|
|
|
time make -s -j${BUILD_JOBS} world-bin
|
|
|
|
|
|
|
|
###
|
|
|
|
# Verify docs can be built
|
|
|
|
###
|
|
|
|
# XXX: Only do this if there have been changes in doc/ since last build
|
|
|
|
always:
|
|
|
|
docs_build_script: |
|
|
|
|
time ./configure \
|
|
|
|
--cache gcc.cache \
|
|
|
|
CC="ccache gcc" \
|
|
|
|
CXX="ccache g++" \
|
|
|
|
CLANG="ccache clang"
|
|
|
|
make -s -j${BUILD_JOBS} clean
|
|
|
|
time make -s -j${BUILD_JOBS} -C doc
|
|
|
|
|
2022-03-24 02:33:01 +08:00
|
|
|
###
|
|
|
|
# Verify headerscheck / cpluspluscheck succeed
|
|
|
|
#
|
|
|
|
# - Don't use ccache, the files are uncacheable, polluting ccache's
|
|
|
|
# cache
|
|
|
|
# - Use -fmax-errors, as particularly cpluspluscheck can be very verbose
|
|
|
|
# - XXX have to disable ICU to avoid errors:
|
|
|
|
# https://postgr.es/m/20220323002024.f2g6tivduzrktgfa%40alap3.anarazel.de
|
|
|
|
# - XXX: the -Wno-register avoids verbose warnings:
|
|
|
|
# https://postgr.es/m/20220308181837.aun3tdtdvao4vb7o%40alap3.anarazel.de
|
|
|
|
###
|
|
|
|
always:
|
|
|
|
headers_headerscheck_script: |
|
|
|
|
time ./configure \
|
|
|
|
${LINUX_CONFIGURE_FEATURES} \
|
|
|
|
--without-icu \
|
|
|
|
--quiet \
|
|
|
|
CC="gcc" CXX"=g++" CLANG="clang"
|
|
|
|
make -s -j${BUILD_JOBS} clean
|
|
|
|
time make -s headerscheck EXTRAFLAGS='-fmax-errors=10'
|
|
|
|
headers_cpluspluscheck_script: |
|
|
|
|
time make -s cpluspluscheck EXTRAFLAGS='-Wno-register -fmax-errors=10'
|
|
|
|
|
2021-12-31 10:59:20 +08:00
|
|
|
always:
|
|
|
|
upload_caches: ccache
|