From 614c4d578622ca3c14a9bbfbb09e9fdb5e7befda Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz Date: Wed, 2 Jul 2025 17:30:59 +0300 Subject: [PATCH v6 3/3] ci: meson: Store common Postgres configuration options in one variable This helps to keep things aligned. Suggested-by: Peter Eisentraut Discussion: https://www.postgresql.org/message-id/flat/CAN55FZ0aO8d_jkyRijcGP8qO%3DXH09qG%3Dpw0ZZDvB4LMzuXYU1w%40mail.gmail.com --- .cirrus.tasks.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.cirrus.tasks.yml b/.cirrus.tasks.yml index a0d6f5b892e..b8415f6fee5 100644 --- a/.cirrus.tasks.yml +++ b/.cirrus.tasks.yml @@ -31,6 +31,10 @@ env: TEMP_CONFIG: ${CIRRUS_WORKING_DIR}/src/tools/ci/pg_ci_base.conf PG_TEST_EXTRA: kerberos ldap ssl libpq_encryption load_balance oauth + # Postgres config args for the meson builds, shared between all meson tasks + # except the 'SanityCheck' task + MESON_COMMON_PG_CONFIG_ARGS: -Dcassert=true -Dinjection_points=true + # Meson feature flags shared by all meson tasks, except: # SanityCheck: uses almost no dependencies. # Windows - VS: has fewer dependencies than listed here, so defines its own. @@ -226,8 +230,8 @@ task: configure_script: | su postgres <<-EOF meson setup \ + ${MESON_COMMON_PG_CONFIG_ARGS} \ --buildtype=debug \ - -Dcassert=true -Dinjection_points=true \ -Dextra_lib_dirs=/usr/local/lib -Dextra_include_dirs=/usr/local/include/ \ ${MESON_COMMON_FEATURES} ${MESON_FEATURES} \ build @@ -355,9 +359,9 @@ task: configure_script: | su postgres <<-EOF meson setup \ + ${MESON_COMMON_PG_CONFIG_ARGS} \ --buildtype=debugoptimized \ --pkg-config-path ${PKGCONFIG_PATH} \ - -Dcassert=true -Dinjection_points=true \ ${MESON_COMMON_FEATURES} ${MESON_FEATURES} \ build EOF @@ -544,8 +548,8 @@ task: configure_script: | su postgres <<-EOF meson setup \ + ${MESON_COMMON_PG_CONFIG_ARGS} \ --buildtype=debug \ - -Dcassert=true -Dinjection_points=true \ ${LINUX_MESON_FEATURES} -Dllvm=enabled \ build EOF @@ -556,8 +560,8 @@ task: su postgres <<-EOF export CC='ccache gcc -m32' meson setup \ + ${MESON_COMMON_PG_CONFIG_ARGS} \ --buildtype=debug \ - -Dcassert=true -Dinjection_points=true \ --pkg-config-path /usr/lib/i386-linux-gnu/pkgconfig/ \ -DPERL=perl5.36-i386-linux-gnu \ ${LINUX_MESON_FEATURES} -Dlibnuma=disabled \ @@ -701,10 +705,10 @@ task: configure_script: | export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig/" meson setup \ + ${MESON_COMMON_PG_CONFIG_ARGS} \ --buildtype=debug \ -Dextra_include_dirs=/opt/local/include \ -Dextra_lib_dirs=/opt/local/lib \ - -Dcassert=true -Dinjection_points=true \ ${MESON_COMMON_FEATURES} ${MESON_FEATURES} \ build @@ -785,7 +789,7 @@ task: # 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 -Dinjection_points=true -Db_pch=true -Dextra_lib_dirs=c:\openssl\1.1\lib -Dextra_include_dirs=c:\openssl\1.1\include -DTAR=%TAR% %MESON_FEATURES% build + meson setup --backend ninja %MESON_COMMON_PG_CONFIG_ARGS% --buildtype debug -Dc_link_args=/DEBUG:FASTLINK -Db_pch=true -Dextra_lib_dirs=c:\openssl\1.1\lib -Dextra_include_dirs=c:\openssl\1.1\include -DTAR=%TAR% %MESON_FEATURES% build build_script: | vcvarsall x64 @@ -845,7 +849,7 @@ task: # -Dnls need to be disabled as the number of files it creates cause a noticable slowdown configure_script: | - %BASH% -c "meson setup -Ddebug=true -Doptimization=g -Dcassert=true -Dinjection_points=true -Db_pch=true %MESON_COMMON_FEATURES% -DTAR=%TAR% build" + %BASH% -c "meson setup %MESON_COMMON_PG_CONFIG_ARGS% -Ddebug=true -Doptimization=g -Db_pch=true %MESON_COMMON_FEATURES% -DTAR=%TAR% build" build_script: | %BASH% -c "ninja -C build ${MBUILD_TARGET}" -- 2.50.0