From ccf36ea2580f66abbc37f27d8c296861ffaad9bf Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Thu, 29 Sep 2022 16:09:09 -0700 Subject: [PATCH] ci: Add 32bit build and test It's easy enough to make changes that break on 32bit platforms and few people test that locally. Add a test for that to CI. LLVM is disabled on 32bit because installing it would bloat the image size further. The debian w/ meson task is fast enough that we can afford to test both. Use the occasion of a separate run of the tests to run them under LANG=C, we've recently discovered there's not a lot of testing in the buildfarm for the case. Discussion: https://postgr.es/m/4033181.1664395633@sss.pgh.pa.us --- .cirrus.yml | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 7b5cb02102..d7f00cfb97 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -40,9 +40,9 @@ on_failure_ac: &on_failure_ac on_failure_meson: &on_failure_meson testrun_artifacts: paths: - - "build/testrun/**/*.log" - - "build/testrun/**/*.diffs" - - "build/testrun/**/regress_log_*" + - "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 @@ -51,7 +51,7 @@ on_failure_meson: &on_failure_meson # 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" + path: "build*/meson-logs/*.txt" type: text/plain @@ -229,6 +229,9 @@ task: - name: Linux - Debian Bullseye - Meson + env: + CCACHE_MAXSIZE: "400M" # tests two different builds + configure_script: | su postgres <<-EOF meson setup \ @@ -239,7 +242,25 @@ task: build EOF + # Also build & test in a 32bit build - it's gotten rare to test that + # locally. + configure_32_script: | + su postgres <<-EOF + export CC='ccache gcc -m32' + meson setup \ + --buildtype=debug \ + -Dcassert=true \ + ${LINUX_MESON_FEATURES} \ + -Dllvm=disabled \ + --pkg-config-path /usr/lib/i386-linux-gnu/pkgconfig/ \ + -DPERL=perl5.32-i386-linux-gnu \ + -DPG_TEST_EXTRA="$PG_TEST_EXTRA" \ + build-32 + EOF + build_script: su postgres -c 'ninja -C build -j${BUILD_JOBS}' + build_32_script: su postgres -c 'ninja -C build-32 -j${BUILD_JOBS}' + upload_caches: ccache test_world_script: | @@ -247,6 +268,18 @@ task: ulimit -c unlimited meson test $MTEST_ARGS --num-processes ${TEST_JOBS} EOF + # so that we don't upload 64bit logs if 32bit fails + rm -rf build/ + + # There's currently no coverage of icu with LANG=C in the buildfarm. We + # can easily provide some here by running one of the sets of tests that + # way. Newer versions of python insist on changing the LC_CTYPE away + # from C, prevent that with PYTHONCOERCECLOCALE. + test_world_32_script: | + su postgres <<-EOF + ulimit -c unlimited + PYTHONCOERCECLOCALE=0 LANG=C meson test $MTEST_ARGS -C build-32 --num-processes ${TEST_JOBS} + EOF on_failure: <<: *on_failure_meson