From 3cf48a338cfdf8888828f63fbfd27c0f44b35b71 Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz Date: Wed, 2 Jul 2025 17:30:59 +0300 Subject: [PATCH v3 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 e8f166dba2c..e40ccd00e29 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 between all meson tasks except the # 'SanityCheck' and 'Windows - VS' tasks MESON_COMMON_FEATURES: >- @@ -224,8 +228,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 @@ -356,9 +360,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 @@ -567,8 +571,8 @@ task: configure_script: | su postgres <<-EOF meson setup \ + ${MESON_COMMON_PG_CONFIG_ARGS} \ --buildtype=debug \ - -Dcassert=true -Dinjection_points=true \ ${MESON_COMMON_FEATURES} ${LINUX_64_MESON_FEATURES} \ build EOF @@ -579,8 +583,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 \ ${MESON_COMMON_FEATURES} ${LINUX_32_MESON_FEATURES} \ @@ -724,10 +728,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 @@ -808,7 +812,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 @@ -868,7 +872,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.49.0