ci-build test: Add a 32-bit compilation test
authorBernd Schubert <bernd@bsbernd.com>
Sun, 16 Feb 2025 21:15:31 +0000 (22:15 +0100)
committerBernd Schubert <bernd@bsbernd.com>
Tue, 18 Feb 2025 21:32:49 +0000 (22:32 +0100)
That was missing so far.

Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
.github/workflows/pr-ci.yml
test/ci-build.sh

index bec61662195c3c7fec6cf72af8cab8915173ba93..ccaaf7231e42952477ea5861b277b51dcf10e987 100644 (file)
@@ -26,7 +26,12 @@ jobs:
     steps:
       - name: Install dependencies (Ubuntu)
         if: runner.os == 'Linux'
-        run: sudo apt-get update && sudo apt-get install -y clang doxygen gcc gcc-10 gcc-9 valgrind
+        run: |
+          sudo dpkg --add-architecture i386
+          sudo apt-get update
+          sudo apt-get install -y clang doxygen gcc gcc-10 gcc-9 valgrind \
+            gcc-multilib g++-multilib libc6-dev-i386 \
+            libpcap0.8-dev:i386 libudev-dev:i386 pkg-config:i386
       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
       - uses: actions/setup-python@v5
         with:
index 4f7da4c8f51a20312411f6fd04e375d29a315400..3f0ff8546fd66bed22ac782c388ae521a955c0a2 100755 (executable)
@@ -118,6 +118,23 @@ sanitized_build()
     sudo rm -fr ${PREFIX_DIR}
 )
 
+# 32-bit sanitized build
+export CC=clang
+export CXX=clang++
+export CFLAGS="-m32"
+export CXXFLAGS="-m32"
+export LDFLAGS="-m32"
+export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
+TEST_WITH_VALGRIND=false
+sanitized_build
+unset CFLAGS
+unset CXXFLAGS
+unset LDFLAGS
+unset PKG_CONFIG_PATH
+unset TEST_WITH_VALGRIND
+unset CC
+unset CXX
+
 # Sanitized build
 export CC=clang
 export CXX=clang++