]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
ci: Fix 32b build ignoring options
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 27 Feb 2025 14:48:56 +0000 (08:48 -0600)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 4 Mar 2025 21:48:47 +0000 (15:48 -0600)
In some configurations we pass meson_setup and x32 options, but the
options were being ignored in 32b builds. Unify the configure/build/test
steps since just the 32b configuration step that needs to be handled
differently, then make sure --native-file and the configure options
are also handled for 32b builds.

Add a 64b configuration for Archlinux and disable test on Archlinux x32
since it's failing due to packages installed and/or distro
configuration.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
.github/workflows/main.yml

index 02892f90e17864b91e807dfc2ceebc3a1fd34aca..1189299e97368a1d698ccfd0ee09c69752fb38ca 100644 (file)
@@ -28,9 +28,13 @@ jobs:
           - compiler: 'gcc'
             container: 'alpine:latest'
             meson_setup: '-Ddocs=false -Db_sanitize=none'
+          - compiler: 'gcc'
+            container: 'archlinux:multilib-devel'
           - compiler: 'gcc'
             container: 'archlinux:multilib-devel'
             x32: 'true'
+            # for x32, fails on LD_PRELOAD
+            skip_test: 'true'
           - compiler: 'gcc'
             container: 'debian:unstable'
             x32: 'true'
@@ -58,6 +62,10 @@ jobs:
             meson_setup: '-Ddocs=false -Db_sanitize=none'
           - compiler: 'clang'
             container: 'archlinux:multilib-devel'
+          - compiler: 'clang'
+            container: 'archlinux:multilib-devel'
+            # for x32, fails on LD_PRELOAD
+            skip_test: 'true'
             x32: 'true'
           - compiler: 'clang'
             container: 'debian:unstable'
@@ -132,12 +140,22 @@ jobs:
           should_pass -D dlopen=xz -D xz=enabled
 
       - name: configure
-        run: mkdir build && cd build && meson setup --native-file ../build-dev.ini ${{ matrix.meson_setup }} . ..
+        run: |
+          setup_options="${{ matrix.meson_setup }}"
+
+          if [[ "${{ matrix.x32 }}" == "true" ]]; then
+            export CC="$CC -m32"
+            # FIXME: we shouldn't need to override and let it per configuration
+            setup_options+=" -D zstd=disabled -D xz=disabled -D zlib=disabled -D openssl=disabled"
+          fi
+
+          meson setup --native-file build-dev.ini $setup_options build
 
       - name: build
         run: cd build && meson compile
 
       - name: test
+        if: ${{ matrix.skip_test != 'true' }}
         run: cd build && meson test || meson test --verbose
 
       - name: install
@@ -145,17 +163,3 @@ jobs:
 
       - name: distcheck
         run: cd build && meson dist
-
-      - name: configure (32bit)
-        if: ${{ matrix.x32 == 'true' }}
-        run: |
-          cross_options="-D zstd=disabled -D xz=disabled -D zlib=disabled -D openssl=disabled"
-          CC="$CC -m32" meson setup $cross_options build32/
-
-      - name: build (32bit)
-        if: ${{ matrix.x32 == 'true' }}
-        run: cd build32 && meson compile
-
-      - name: test (32bit)
-        if: ${{ matrix.x32 == 'true' }}
-        run: cd build32 && meson test || meson test --verbose