From ea67ed329ee2041a5817396dc9ea05c68882af65 Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@gmail.com>
Date: Thu, 3 Oct 2024 14:45:47 +1300
Subject: [PATCH 2/2] ci: Add a warning check for 32 bit builds.

We already compile and test 32 bit builds, but warnings don't turn
anything red unless something actually breaks at runtime.  Add a new
command to the CompileWarnings task for that, so that such breakage is
less likely to make it to the build farm to be caught by "adder".
---
 .cirrus.tasks.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/.cirrus.tasks.yml b/.cirrus.tasks.yml
index 1f67065816b..a9401977db6 100644
--- a/.cirrus.tasks.yml
+++ b/.cirrus.tasks.yml
@@ -234,6 +234,24 @@ LINUX_CONFIGURE_FEATURES: &LINUX_CONFIGURE_FEATURES >-
   --with-uuid=ossp
   --with-zstd
 
+LINUX_CONFIGURE_32_FEATURES: &LINUX_CONFIGURE_32_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/i386-linux-gnu/tcl8.6/
+  --with-uuid=e2fs
+  --with-zstd
+
 LINUX_MESON_FEATURES: &LINUX_MESON_FEATURES >-
   -Dllvm=enabled
   -Duuid=e2fs
@@ -726,6 +744,21 @@ task:
       make -s -j${BUILD_JOBS} clean
       time make -s -j${BUILD_JOBS} world-bin
 
+  # gcc, cassert on, 32 bit
+  always:
+    gcc_32_a_warning_script: |
+      time ./configure \
+        --cache gcc32.cache \
+        --enable-cassert \
+        ${LINUX_CONFIGURE_32_FEATURES} \
+        CC="ccache gcc -m32" \
+        CXX="ccache g++ -m32" \
+        CLANG="ccache clang-16 -m32" \
+        PERL="perl5.36-i386-linux-gnu" \
+        PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
+      make -s -j${BUILD_JOBS} clean
+      time make -s -j${BUILD_JOBS} world-bin
+
   # clang, cassert off, dtrace off
   always:
     clang_warning_script: |
-- 
2.46.1

