From 2042a0483bed607c10244fe605b668239203b694 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 29 May 2025 12:21:28 +0530 Subject: [PATCH] ci: Add an x86 build Fairly minimal for now to save time, but we can add more deps and cover more code as needed. We don't test or install as this isn't a native build and we just want to make sure it builds for now. --- .gitlab-ci.yml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++-- cross-x86.txt | 23 ++++++++++++++++++ 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 cross-x86.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8319a1626..e2a549469 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -97,6 +97,36 @@ include: # FDO_DISTRIBUTION_EXEC: >- # pip3 install meson +# This is a pruned down container with enough dependencies for a basic i686 +# build to make sure we've not broken anything. This can be extended if we want +# to cover more of the code. +.fedora_x86: + variables: + # Update this tag when you want to trigger a rebuild + FDO_DISTRIBUTION_TAG: '2025-05-29.1' + FDO_DISTRIBUTION_VERSION: '42' + FDO_DISTRIBUTION_PACKAGES: >- + git + gcc + gcc-c++ + meson + glibc-devel.i686 + systemd-devel.i686 + dbus-devel.i686 + alsa-lib-devel.i686 + bluez-libs-devel.i686 + libffi-devel.i686 + pcre2-devel.i686 + sysprof-devel.i686 + zlib-ng-compat-devel.i686 + libblkid-devel.i686 + libmount-devel.i686 + libselinux-devel.i686 + glib2-devel.i686 + alsa-lib-devel + avahi-devel + bluez-libs-devel + .ubuntu: variables: # Update this tag when you want to trigger a rebuild @@ -208,8 +238,14 @@ include: - echo "Building with meson options $MESON_OPTIONS" - meson setup "$BUILD_DIR" --prefix="$PREFIX" $MESON_OPTIONS - meson compile -C "$BUILD_DIR" $COMPILE_ARGS - - meson test -C "$BUILD_DIR" --no-rebuild - - meson install -C "$BUILD_DIR" --no-rebuild + - | + if [ -z "$MESON_SKIP_TEST" ]; then + meson test -C "$BUILD_DIR" --no-rebuild + fi + - | + if [ -z "$MESON_SKIP_INSTALL" ]; then + meson install -C "$BUILD_DIR" --no-rebuild + fi artifacts: name: pipewire-$CI_COMMIT_SHA when: always @@ -232,6 +268,14 @@ container_fedora: variables: GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image +container_fedora_x86: + extends: + - .fedora_x86 + - .fdo.container-build@fedora + stage: container + variables: + GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image + container_alpine: extends: - .alpine @@ -357,6 +401,21 @@ build_on_fedora_html_docs: rules: - !reference [pages, rules] +build_on_fedora_x86: + extends: + - .fedora_x86 + - .not_coverity + - .fdo.distribution-image@fedora + - .build + stage: build + needs: + - job: container_fedora_x86 + artifacts: false + variables: + MESON_OPTIONS: "--cross-file=cross-x86.txt" + MESON_SKIP_TEST: "true" + MESON_SKIP_INSTALL: "true" + build_on_alpine: extends: - .alpine diff --git a/cross-x86.txt b/cross-x86.txt new file mode 100644 index 000000000..8ddd5ecc5 --- /dev/null +++ b/cross-x86.txt @@ -0,0 +1,23 @@ +[binaries] +c = 'gcc' +cpp = 'g++' +ld = 'ld' +cmake = 'cmake' +strip = 'strip' +pkg-config = 'pkg-config' + +[properties] +pkg_config_libdir = '/usr/lib/pkgconfig' +ld_args = '-m elf_i386' + +[built-in options] +c_args = '-m32 -msse' +c_link_args = '-m32 -msse' +cpp_args = '-m32 -msse' +cpp_link_args = '-m32 -msse' + +[host_machine] +system = 'linux' +cpu_family = 'x86' +cpu = 'i686' +endian = 'little'