From: Lucas De Marchi Date: Thu, 27 Feb 2025 14:48:56 +0000 (-0600) Subject: ci: Fix 32b build ignoring options X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa7ad9826bad570d62c378275b964b4cd882ec9b;p=thirdparty%2Fkmod.git ci: Fix 32b build ignoring options 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 --- diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02892f90..1189299e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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