pixman: Branch 'master' - 10 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 19 21:09:19 UTC 2024


 .gitlab-ci.d/01-docker.yml                             |   74 +---------
 .gitlab-ci.d/01-docker/Dockerfile                      |  119 +++++++++++------
 .gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env |    4 
 .gitlab-ci.d/02-build.yml                              |   39 +----
 .gitlab-ci.d/03-test.yml                               |   71 ++--------
 .gitlab-ci.d/04-summary.yml                            |    3 
 .gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson        |    7 -
 .gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson       |    7 -
 .gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson        |    7 -
 .gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson       |    7 -
 .gitlab-ci.d/meson-cross/windows-686-gnu.meson         |    7 -
 .gitlab-ci.d/meson-cross/windows-686-llvm.meson        |    3 
 .gitlab-ci.d/meson-cross/windows-amd64-gnu.meson       |    3 
 .gitlab-ci.d/meson-cross/windows-amd64-llvm.meson      |    8 -
 .gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson   |    8 -
 .gitlab-ci.d/pixman-project.yml                        |   15 +-
 .gitlab-ci.d/templates/build.yml                       |   13 +
 .gitlab-ci.d/templates/docker.yml                      |   85 ++++++++++++
 .gitlab-ci.d/templates/test.yml                        |   25 ++-
 test/alpha-loop.c                                      |    2 
 20 files changed, 280 insertions(+), 227 deletions(-)

New commits:
commit a2afb80bdb1663e561a205b921fb551a690c99d8
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Mon Oct 14 15:07:21 2024 +0200

    ci: Use regular Debian as base Windows for ARM
    
    It turns out it's relatively easy to provide support for Windows on ARM.
    Unfortunately, it requires building Wine from source, as the version
    distributed by Debian (both Bookworm and Sid) is buggy for some tests.
    However, building it isn't overly complicated, and can be replaced with
    pre-built package once a fixed version lands in Debian Trixie.
    
    Besides that, I also fixed the dynamic linking issue and enabled OpenMP
    as for x86 targets.
    
    It has the following advantages:
    
    - It greatly decreases the image size, and improves maintainability of
      the package, as we don't rely on third-party image (from Linaro).
    - We can build a native image and run it on ARM GitLab runner spreading
      the load between different runners, and significantly improving the
      speed of execution (over 12 min down to under a minute).
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/01-docker.yml b/.gitlab-ci.d/01-docker.yml
index 5e45562..182cf2c 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -12,6 +12,7 @@ include:
         - linux-arm-v5
         - linux-arm-v7
         - linux-arm64-v8
+        - windows-arm64-v8
   - local: .gitlab-ci.d/templates/docker.yml
     inputs:
       runner_tag: $RUNNER_TAG_DEFAULT
@@ -27,4 +28,3 @@ include:
         - linux-riscv64
         - windows-686
         - windows-amd64
-        - windows-arm64-v8
diff --git a/.gitlab-ci.d/01-docker/Dockerfile b/.gitlab-ci.d/01-docker/Dockerfile
index eaeceed..ed29da5 100644
--- a/.gitlab-ci.d/01-docker/Dockerfile
+++ b/.gitlab-ci.d/01-docker/Dockerfile
@@ -109,13 +109,13 @@ RUN ${APT_UPDATE} \
 # Windows base image with a pre-built LLVM MinGW toolchain.
 FROM base AS windows-llvm-base
 ARG LLVM_MINGW_RELEASE=20241203
-ARG LLVM_MINGW_VARIANT=llvm-mingw-${LLVM_MINGW_RELEASE}-msvcrt-ubuntu-20.04-x86_64
+ARG LLVM_MINGW_VARIANT=llvm-mingw-${LLVM_MINGW_RELEASE}-ucrt-ubuntu-20.04
 RUN ${APT_UPDATE} \
     && ${APT_INSTALL} \
         procps \
         wget \
     && ${APT_CLEANUP} \
-    && wget https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_RELEASE}/${LLVM_MINGW_VARIANT}.tar.xz \
+    && wget https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_RELEASE}/${LLVM_MINGW_VARIANT}-`uname -m`.tar.xz \
         -O - | tar -xJ -C /opt \
     && mv /opt/llvm* /opt/llvm
 ENV PATH=/opt/llvm/bin:${PATH} \
@@ -150,11 +150,46 @@ RUN ${APT_UPDATE} \
     && ${APT_CLEANUP} \
     && ${WINE_BOOT}
 
-# aarch64 image requires linaro/wine-arm64 as a base.
-FROM windows-llvm-base AS windows-arm64-v8
-RUN wine-arm64 wineboot --init \
-    && while pgrep wineserver > /dev/null; do \
-        echo "waiting ..."; \
-        sleep 1; \
-    done \
-    && rm -rf /tmp/wine-*
+# Dependencies needed both for Wine build and the final image.
+FROM windows-llvm-base AS windows-wine-build-base
+RUN ${APT_UPDATE} \
+    && ${APT_INSTALL} \
+        libfreetype-dev \
+        libgnutls28-dev \
+        libkrb5-dev \
+        libx11-dev \
+        libxcomposite-dev \
+        libxcursor-dev \
+        libxext-dev \
+        libxfixes-dev \
+        libxi-dev \
+        libxrandr-dev \
+        libxrender-dev \
+    && ${APT_CLEANUP}
+
+# Wine build intermediate target, not going into the final image.
+FROM windows-wine-build-base AS windows-wine-build
+RUN ${APT_UPDATE} \
+    && ${APT_INSTALL} \
+        bison \
+        ca-certificates \
+        clang \
+        flex \
+        git \
+        lld \
+        llvm \
+    && ${APT_CLEANUP}
+ARG WINE_VERSION=9.22
+RUN git clone https://gitlab.winehq.org/wine/wine.git \
+        -b wine-${WINE_VERSION} \
+        --depth 1
+RUN cd wine \
+    && ./configure --enable-win64 --disable-tests --without-unwind --prefix=/opt/wine \
+    && make -j`nproc` \
+    && make install
+
+FROM windows-wine-build-base AS windows-arm64-v8
+COPY --from=windows-wine-build /opt/wine /opt/wine
+ENV PATH=/opt/wine/bin:${PATH} \
+    WINEPATH=/opt/llvm/aarch64-w64-mingw32/bin
+RUN ${WINE_BOOT}
diff --git a/.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env b/.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env
deleted file mode 100644
index 1e1ae33..0000000
--- a/.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env
+++ /dev/null
@@ -1,3 +0,0 @@
-DOCKER_PLATFORM=linux/amd64
-BASE_IMAGE=docker.io/linaro/wine-arm64
-BASE_IMAGE_TAG=latest
diff --git a/.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env b/.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env
new file mode 120000
index 0000000..f8f6a23
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env
@@ -0,0 +1 @@
+linux-arm64-v8.env
\ No newline at end of file
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 05af1bf..75093f5 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -87,5 +87,6 @@ include:
     inputs:
       target: windows-arm64-v8
       toolchain: [llvm]  # GNU toolchain doesn't seem to support Windows on ARM.
-      qemu_cpu: max
       enable_gnu_coverage: false
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index 0d000f1..8310453 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -122,4 +122,5 @@ include:
     inputs:
       target: windows-arm64-v8
       toolchain: [llvm]
-      qemu_cpu: [max]
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
diff --git a/.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson b/.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson
index f0d44cb..a984131 100644
--- a/.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson
+++ b/.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson
@@ -3,13 +3,7 @@ c = 'aarch64-w64-mingw32-clang'
 ar = 'aarch64-w64-mingw32-llvm-ar'
 strip = 'aarch64-w64-mingw32-strip'
 windres = 'aarch64-w64-mingw32-windres'
-exe_wrapper = 'wine-arm64'
-
-[built-in options]
-c_link_args = ['-static']
-
-[project options]
-openmp = 'disabled'
+exe_wrapper = 'wine'
 
 [host_machine]
 system = 'windows'
commit badcc1390b1a74c42490da3784ab82f0dc580e3a
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Mon Oct 14 12:41:37 2024 +0200

    ci: Improve Windows images
    
    - Update LLVM-MinGW.
    - Separate out win32 and win64 images. In some scenarios there are
      dependency clashes, thus it's easier to simply separate these two
      images.
    - Fix dynamic library loading. This means we can link dynamically
      everything and enable OpenMP for LLVM builds (meaning faster running
      tests)
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/01-docker/Dockerfile b/.gitlab-ci.d/01-docker/Dockerfile
index c19a71a..eaeceed 100644
--- a/.gitlab-ci.d/01-docker/Dockerfile
+++ b/.gitlab-ci.d/01-docker/Dockerfile
@@ -106,47 +106,52 @@ RUN ${APT_UPDATE} \
     && ${APT_INSTALL} gcc-multilib-powerpc64-linux-gnu \
     && ${APT_CLEANUP}
 
-# We use a common image for Windows i686 and amd64, as it doesn't make sense to
-# make them separate in terms of build time and image size. After two runs they
-# should use the same cache layers, so in the end it makes the collective image
-# size smaller.
-FROM base AS windows-base
-ARG LLVM_MINGW_RELEASE=20240619
+# Windows base image with a pre-built LLVM MinGW toolchain.
+FROM base AS windows-llvm-base
+ARG LLVM_MINGW_RELEASE=20241203
 ARG LLVM_MINGW_VARIANT=llvm-mingw-${LLVM_MINGW_RELEASE}-msvcrt-ubuntu-20.04-x86_64
 RUN ${APT_UPDATE} \
-    && ${APT_INSTALL} wget \
+    && ${APT_INSTALL} \
+        procps \
+        wget \
     && ${APT_CLEANUP} \
-    && cd /opt \
     && wget https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_RELEASE}/${LLVM_MINGW_VARIANT}.tar.xz \
-    && tar -xf ${LLVM_MINGW_VARIANT}.tar.xz \
-    && rm -f ${LLVM_MINGW_VARIANT}.tar.xz
-ENV PATH=${PATH}:/opt/${LLVM_MINGW_VARIANT}/bin
+        -O - | tar -xJ -C /opt \
+    && mv /opt/llvm* /opt/llvm
+ENV PATH=/opt/llvm/bin:${PATH} \
+    # Inspired by https://code.videolan.org/videolan/docker-images
+    WINE_BOOT='wine wineboot --init \
+        && while pgrep wineserver > /dev/null; do \
+            echo "waiting ..."; \
+            sleep 1; \
+        done \
+        && rm -rf /tmp/wine-*'
 
-FROM windows-base AS windows-x86-base
+FROM windows-llvm-base AS windows-686
+ENV WINEPATH=/opt/llvm/i686-w64-mingw32/bin \
+    WINEARCH=win32
 RUN dpkg --add-architecture i386 \
     && ${APT_UPDATE} \
     && ${APT_INSTALL} \
-        gcc-mingw-w64-i686 \
-        gcc-mingw-w64-x86-64 \
-        mingw-w64-tools \
-        procps \
+        libwine:i386 \
         wine \
         wine32 \
-        wine64 \
     && ${APT_CLEANUP} \
-    # Inspired by https://code.videolan.org/videolan/docker-images
-    && wine wineboot --init \
-    && while pgrep wineserver > /dev/null; do \
-        echo "waiting ..."; \
-        sleep 1; \
-    done \
-    && rm -rf /tmp/wine-*
+    && ${WINE_BOOT}
 
-FROM windows-x86-base AS windows-686
-FROM windows-x86-base AS windows-amd64
+FROM windows-llvm-base AS windows-amd64
+ENV WINEPATH=/opt/llvm/x86_64-w64-mingw32/bin \
+    WINEARCH=win64
+RUN ${APT_UPDATE} \
+    && ${APT_INSTALL} \
+        libwine \
+        wine \
+        wine64 \
+    && ${APT_CLEANUP} \
+    && ${WINE_BOOT}
 
 # aarch64 image requires linaro/wine-arm64 as a base.
-FROM windows-base AS windows-arm64-v8
+FROM windows-llvm-base AS windows-arm64-v8
 RUN wine-arm64 wineboot --init \
     && while pgrep wineserver > /dev/null; do \
         echo "waiting ..."; \
diff --git a/.gitlab-ci.d/meson-cross/windows-686-gnu.meson b/.gitlab-ci.d/meson-cross/windows-686-gnu.meson
index bd40ac5..2b12105 100644
--- a/.gitlab-ci.d/meson-cross/windows-686-gnu.meson
+++ b/.gitlab-ci.d/meson-cross/windows-686-gnu.meson
@@ -5,14 +5,11 @@ strip = 'i686-w64-mingw32-strip'
 windres = 'i686-w64-mingw32-windres'
 exe_wrapper = 'wine'
 
-[built-in options]
-c_link_args = ['-static-libgcc']
+[project options]
+openmp = 'disabled'
 
 [host_machine]
 system = 'windows'
 cpu_family = 'x86'
 cpu = 'i686'
 endian = 'little'
-
-[project options]
-openmp = 'disabled'
diff --git a/.gitlab-ci.d/meson-cross/windows-686-llvm.meson b/.gitlab-ci.d/meson-cross/windows-686-llvm.meson
index 5c81322..1479a03 100644
--- a/.gitlab-ci.d/meson-cross/windows-686-llvm.meson
+++ b/.gitlab-ci.d/meson-cross/windows-686-llvm.meson
@@ -5,9 +5,6 @@ strip = 'i686-w64-mingw32-strip'
 windres = 'i686-w64-mingw32-windres'
 exe_wrapper = 'wine'
 
-[built-in options]
-c_link_args = ['-static']
-
 [project options]
 openmp = 'disabled'
 
diff --git a/.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson b/.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
index 0d14332..41be631 100644
--- a/.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
+++ b/.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
@@ -5,9 +5,6 @@ strip = 'x86_64-w64-mingw32-strip'
 windres = 'x86_64-w64-mingw32-windres'
 exe_wrapper = 'wine'
 
-[built-in options]
-c_link_args = ['-static-libgcc']
-
 [host_machine]
 system = 'windows'
 cpu_family = 'x86_64'
diff --git a/.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson b/.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson
index 8f353fc..ed3dab5 100644
--- a/.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson
+++ b/.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson
@@ -5,14 +5,6 @@ strip = 'x86_64-w64-mingw32-strip'
 windres = 'x86_64-w64-mingw32-windres'
 exe_wrapper = 'wine'
 
-[built-in options]
-# Static linking is a workaround around `libwinpthread-1` not being discovered correctly.
-c_link_args = ['-static']
-
-[project options]
-# OpenMP is disabled as it is not being discovered correctly during tests.
-openmp = 'disabled'
-
 [host_machine]
 system = 'windows'
 cpu_family = 'x86_64'
commit 962a30b3ad28e20156f55fd7027a66293c627a4d
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Thu Oct 24 15:00:07 2024 +0200

    ci: Use native ARM runners for Linux ARM targets
    
    - build Docker images
    - execute build and test stages
    - enable OpenMP for ARMv6 target to improve pipeline speed. This means
      that coverage report cannot be generated for this target (no support
      for -fprofile-update=atomic).
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/01-docker.yml b/.gitlab-ci.d/01-docker.yml
index 167dd3e..5e45562 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -7,13 +7,17 @@
 include:
   - local: .gitlab-ci.d/templates/docker.yml
     inputs:
-      runner_tag: $RUNNER_TAG_DEFAULT
+      runner_tag: $RUNNER_TAG_ARM
       targets:
-        - linux-386
-        - linux-amd64
         - linux-arm-v5
         - linux-arm-v7
         - linux-arm64-v8
+  - local: .gitlab-ci.d/templates/docker.yml
+    inputs:
+      runner_tag: $RUNNER_TAG_DEFAULT
+      targets:
+        - linux-386
+        - linux-amd64
         - linux-mips
         - linux-mips64le
         - linux-mipsel
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 09e1cfe..05af1bf 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -26,15 +26,20 @@ include:
       qemu_cpu: arm1136
       # Disable coverage, as the tests take too long to run with a single thread.
       enable_gnu_coverage: false
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-arm-v7
       toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/113
       qemu_cpu: max
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-arm64-v8
-      qemu_cpu: max
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-mips
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index 523b407..0d000f1 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -41,15 +41,20 @@ include:
       pixman_disable: ["arm-neon"] # Test only arm-simd.
       timeout: 3h
       test_timeout_multiplier: 40
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-arm-v7
       toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/113
       qemu_cpu: [max]
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-arm64-v8
-      qemu_cpu: [max]
+      runner_tag: $RUNNER_TAG_ARM
+      docker_job: docker:${RUNNER_TAG_ARM}
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-mips
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson b/.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson
deleted file mode 120000
index 4461c28..0000000
--- a/.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson
+++ /dev/null
@@ -1 +0,0 @@
-native-gnu-noopenmp.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson b/.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson
new file mode 100644
index 0000000..d687d19
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson
@@ -0,0 +1,6 @@
+[binaries]
+c = 'gcc'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+exe_wrapper = ['qemu-arm', '-cpu', 'arm1136']
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson b/.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson
deleted file mode 120000
index 1fe9c2e..0000000
--- a/.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson
+++ /dev/null
@@ -1 +0,0 @@
-native-llvm-noopenmp.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson b/.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson
new file mode 100644
index 0000000..0f1a117
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson
@@ -0,0 +1,6 @@
+[binaries]
+c = 'clang'
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+pkg-config = 'pkg-config'
+exe_wrapper = ['qemu-arm', '-cpu', 'arm1136']
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson b/.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson
deleted file mode 120000
index ad75db9..0000000
--- a/.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson
+++ /dev/null
@@ -1 +0,0 @@
-native-gnu.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson b/.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson
new file mode 100644
index 0000000..400fc75
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson
@@ -0,0 +1,6 @@
+[binaries]
+c = 'gcc'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+exe_wrapper = 'qemu-arm'
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson b/.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson
deleted file mode 120000
index 3474611..0000000
--- a/.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson
+++ /dev/null
@@ -1 +0,0 @@
-native-llvm.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson b/.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson
new file mode 100644
index 0000000..a6200e9
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson
@@ -0,0 +1,6 @@
+[binaries]
+c = 'clang'
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+pkg-config = 'pkg-config'
+exe_wrapper = 'qemu-arm'
diff --git a/.gitlab-ci.d/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index ee4d7b0..aaeecd5 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -4,6 +4,8 @@
 # Expected GitLab CI variables:
 #   - RUNNER_TAG_DEFAULT – default GitLab CI runner tag. The `kvm` tag works on
 #     FDO infrastructure.
+#   - RUNNER_TAG_ARM – GitLab CI tag for ARM targets. Needs to have capability
+#     to run both 32 and 64-bit ARM binaries.
 
 stages:
   - docker
@@ -15,6 +17,7 @@ variables:
   # Default values for variables which are supposed to be overridden in the form
   # of GitLab CI variables.
   RUNNER_TAG_DEFAULT: kvm
+  RUNNER_TAG_ARM: kvm-aarch64
 
   # Docker image global configuration.
   DOCKER_TAG: latest
commit dc933879df0c2f2a2c6c63bbf133148cb3caf139
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Thu Oct 24 15:00:07 2024 +0200

    ci: Move Docker build to a CI template
    
    This enables reuse of the Docker build with different runner tags. Will
    be used for running native image builds on ARM64 runners.
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/01-docker.yml b/.gitlab-ci.d/01-docker.yml
index 5d54f19..167dd3e 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -4,48 +4,11 @@
 # later easily used with properly configured Docker (which uses binfmt and QEMU
 # underneath).
 
-docker:
-  stage: docker
-  image: quay.io/buildah/stable
-  rules:
-    - if: "$CI_PIPELINE_SOURCE == 'merge_request_event' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
-      changes:
-        paths:
-          - .gitlab-ci.d/01-docker.yml
-          - .gitlab-ci.d/01-docker/**/*
-      variables:
-        DOCKER_TAG: $CI_COMMIT_REF_SLUG
-        DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
-    - if: "$CI_PIPELINE_SOURCE == 'schedule' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
-    - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TARGET =~ $ACTIVE_TARGET_PATTERN"
-    - if: "$CI_COMMIT_TAG && $TARGET =~ $ACTIVE_TARGET_PATTERN"
-
-  variables:
-    # Use vfs with buildah. Docker offers overlayfs as a default, but Buildah
-    # cannot stack overlayfs on top of another overlayfs filesystem.
-    STORAGE_DRIVER: vfs
-
-    # Write all image metadata in the docker format, not the standard OCI
-    # format. Newer versions of docker can handle the OCI format, but older
-    # versions, like the one shipped with Fedora 30, cannot handle the format.
-    BUILDAH_FORMAT: docker
-
-    BUILDAH_ISOLATION: chroot
-    CACHE_IMAGE: ${CI_REGISTRY_IMAGE}/cache
-    CACHE_ARGS: --cache-from ${CACHE_IMAGE} --cache-to ${CACHE_IMAGE}
-  before_script:
-    # Login to the target registry.
-    - echo "${CI_REGISTRY_PASSWORD}" |
-        buildah login -u "${CI_REGISTRY_USER}" --password-stdin ${CI_REGISTRY}
-
-    # Docker Hub login is optional, and can be used to circumvent image pull
-    # quota for anonymous pulls for base images.
-    - echo "${DOCKERHUB_PASSWORD}" |
-        buildah login -u "${DOCKERHUB_USER}" --password-stdin docker.io ||
-          echo "Failed to login to Docker Hub."
-  parallel:
-    matrix:
-      - TARGET:
+include:
+  - local: .gitlab-ci.d/templates/docker.yml
+    inputs:
+      runner_tag: $RUNNER_TAG_DEFAULT
+      targets:
         - linux-386
         - linux-amd64
         - linux-arm-v5
@@ -61,20 +24,3 @@ docker:
         - windows-686
         - windows-amd64
         - windows-arm64-v8
-  script:
-    # Prepare environment.
-    - ${LOAD_TARGET_ENV}
-    - FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${TARGET}
-
-    # Build and push the image.
-    - buildah bud
-        --tag ${FULL_IMAGE_NAME}
-        --layers ${CACHE_ARGS}
-        --target ${TARGET}
-        --platform=${DOCKER_PLATFORM}
-        --build-arg BASE_IMAGE=${BASE_IMAGE}
-        --build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
-        --build-arg LLVM_VERSION=${LLVM_VERSION}
-      -f Dockerfile .gitlab-ci.d/01-docker/
-    - buildah images
-    - buildah push ${FULL_IMAGE_NAME}
diff --git a/.gitlab-ci.d/templates/build.yml b/.gitlab-ci.d/templates/build.yml
index bf0d7d4..6633751 100644
--- a/.gitlab-ci.d/templates/build.yml
+++ b/.gitlab-ci.d/templates/build.yml
@@ -49,6 +49,9 @@ spec:
     runner_tag:
       description: GitLab runner tag for this job.
       default: $RUNNER_TAG_DEFAULT
+    docker_job:
+      description: Docker image build job name.
+      default: docker:${RUNNER_TAG_DEFAULT}
 ---
 
 "$[[ inputs.job_name_prefix ]]build:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
@@ -59,7 +62,7 @@ spec:
   allow_failure: $[[ inputs.allow_failure ]]
   retry: $[[ inputs.retry ]]
   needs:
-    - job: docker
+    - job: $[[ inputs.docker_job | expand_vars ]]
       optional: true
       parallel:
         matrix:
diff --git a/.gitlab-ci.d/templates/docker.yml b/.gitlab-ci.d/templates/docker.yml
new file mode 100644
index 0000000..9fb049a
--- /dev/null
+++ b/.gitlab-ci.d/templates/docker.yml
@@ -0,0 +1,85 @@
+spec:
+  inputs:
+    targets:
+      description:
+        List of build targets in form of "OS-ARCH" pair (e.g., linux-amd64).
+        Mostly the same as platform string for Docker but with a hyphen instead
+        of slash.
+      type: array
+    job_name_prefix:
+      description:
+        Additional prefix for the job name. Can be used to disable a job with a
+        "." prefix.
+      default: ""
+    job_name_suffix:
+      description:
+        Additional suffix for the job name. Can be used to prevent job
+        duplication for jobs for the same target.
+      default: ""
+    runner_tag:
+      description: GitLab runner tag for this job.
+      default: $RUNNER_TAG_DEFAULT
+
+---
+
+"$[[ inputs.job_name_prefix ]]docker:$[[ inputs.runner_tag | expand_vars ]]$[[ inputs.job_name_suffix ]]":
+  stage: docker
+  image: quay.io/buildah/stable
+  rules:
+    - if: "$CI_PIPELINE_SOURCE == 'merge_request_event' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
+      changes:
+        paths:
+          - .gitlab-ci.d/01-docker.yml
+          - .gitlab-ci.d/01-docker/**/*
+      variables:
+        DOCKER_TAG: $CI_COMMIT_REF_SLUG
+        DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
+    - if: "$CI_PIPELINE_SOURCE == 'schedule' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
+    - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TARGET =~ $ACTIVE_TARGET_PATTERN"
+    - if: "$CI_COMMIT_TAG && $TARGET =~ $ACTIVE_TARGET_PATTERN"
+  tags:
+    - $[[ inputs.runner_tag | expand_vars ]]
+
+  variables:
+    # Use vfs with buildah. Docker offers overlayfs as a default, but Buildah
+    # cannot stack overlayfs on top of another overlayfs filesystem.
+    STORAGE_DRIVER: vfs
+
+    # Write all image metadata in the docker format, not the standard OCI
+    # format. Newer versions of docker can handle the OCI format, but older
+    # versions, like the one shipped with Fedora 30, cannot handle the format.
+    BUILDAH_FORMAT: docker
+
+    BUILDAH_ISOLATION: chroot
+    CACHE_IMAGE: ${CI_REGISTRY_IMAGE}/cache
+    CACHE_ARGS: --cache-from ${CACHE_IMAGE} --cache-to ${CACHE_IMAGE}
+  before_script:
+    # Login to the target registry.
+    - echo "${CI_REGISTRY_PASSWORD}" |
+        buildah login -u "${CI_REGISTRY_USER}" --password-stdin ${CI_REGISTRY}
+
+    # Docker Hub login is optional, and can be used to circumvent image pull
+    # quota for anonymous pulls for base images.
+    - echo "${DOCKERHUB_PASSWORD}" |
+        buildah login -u "${DOCKERHUB_USER}" --password-stdin docker.io ||
+          echo "Failed to login to Docker Hub."
+  parallel:
+    matrix:
+      - TARGET: $[[ inputs.targets ]]
+  script:
+    # Prepare environment.
+    - ${LOAD_TARGET_ENV}
+    - FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${TARGET}
+
+    # Build and push the image.
+    - buildah bud
+        --tag ${FULL_IMAGE_NAME}
+        --layers ${CACHE_ARGS}
+        --target ${TARGET}
+        --platform=${DOCKER_PLATFORM}
+        --build-arg BASE_IMAGE=${BASE_IMAGE}
+        --build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
+        --build-arg LLVM_VERSION=${LLVM_VERSION}
+      -f Dockerfile .gitlab-ci.d/01-docker/
+    - buildah images
+    - buildah push ${FULL_IMAGE_NAME}
diff --git a/.gitlab-ci.d/templates/test.yml b/.gitlab-ci.d/templates/test.yml
index 97149b9..fab07dc 100644
--- a/.gitlab-ci.d/templates/test.yml
+++ b/.gitlab-ci.d/templates/test.yml
@@ -69,6 +69,9 @@ spec:
     runner_tag:
       description: GitLab runner tag for this job.
       default: $RUNNER_TAG_DEFAULT
+    docker_job:
+      description: Docker image build job name.
+      default: docker:${RUNNER_TAG_DEFAULT}
 ---
 
 "$[[ inputs.job_name_prefix ]]test:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
@@ -80,7 +83,7 @@ spec:
   retry: $[[ inputs.retry ]]
   timeout: $[[ inputs.timeout ]]
   needs:
-    - job: docker
+    - job: $[[ inputs.docker_job | expand_vars ]]
       optional: true
       parallel:
         matrix:
commit 17ab27ef5b9c8ff6f91bc407bb9a2483a5f47a94
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Mon Oct 21 18:28:10 2024 +0200

    ci: Add option to change the default runner tag
    
    Enables specifying GitLab runner tag on per-job basis. It requires
    setting the `RUNNER_TAG_DEFAULT` variable as GitLab CI variable in order
    to properly expand it when referenced in templates.
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index 3c3256c..ee4d7b0 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -1,5 +1,9 @@
 # This file contains the set of jobs run by the pixman project:
 # https://gitlab.freedesktop.org/pixman/pixman/-/pipelines
+#
+# Expected GitLab CI variables:
+#   - RUNNER_TAG_DEFAULT – default GitLab CI runner tag. The `kvm` tag works on
+#     FDO infrastructure.
 
 stages:
   - docker
@@ -8,9 +12,9 @@ stages:
   - summary
 
 variables:
-  # Make it possible to change RUNNER_TAG from GitLab variables. The default
-  # `kvm` tag has been tested with FDO infrastructure.
-  RUNNER_TAG: kvm
+  # Default values for variables which are supposed to be overridden in the form
+  # of GitLab CI variables.
+  RUNNER_TAG_DEFAULT: kvm
 
   # Docker image global configuration.
   DOCKER_TAG: latest
@@ -51,7 +55,7 @@ workflow:
 
 default:
   tags:
-    - $RUNNER_TAG
+    - $RUNNER_TAG_DEFAULT
 
   # Retry in case the runner is misconfigured for multi-arch builds or some
   # random unexpected runner error occurs (it happened during testing).
diff --git a/.gitlab-ci.d/templates/build.yml b/.gitlab-ci.d/templates/build.yml
index 3d0da18..bf0d7d4 100644
--- a/.gitlab-ci.d/templates/build.yml
+++ b/.gitlab-ci.d/templates/build.yml
@@ -46,10 +46,15 @@ spec:
         `allow_failure`.
       type: number
       default: 1
+    runner_tag:
+      description: GitLab runner tag for this job.
+      default: $RUNNER_TAG_DEFAULT
 ---
 
 "$[[ inputs.job_name_prefix ]]build:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
   extends: .target:all
+  tags:
+    - $[[ inputs.runner_tag | expand_vars ]]
   stage: build
   allow_failure: $[[ inputs.allow_failure ]]
   retry: $[[ inputs.retry ]]
diff --git a/.gitlab-ci.d/templates/test.yml b/.gitlab-ci.d/templates/test.yml
index 41d3d19..97149b9 100644
--- a/.gitlab-ci.d/templates/test.yml
+++ b/.gitlab-ci.d/templates/test.yml
@@ -66,10 +66,15 @@ spec:
         `allow_failure`.
       type: number
       default: 1
+    runner_tag:
+      description: GitLab runner tag for this job.
+      default: $RUNNER_TAG_DEFAULT
 ---
 
 "$[[ inputs.job_name_prefix ]]test:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
   extends: .target:all
+  tags:
+    - $[[ inputs.runner_tag | expand_vars ]]
   stage: test
   allow_failure: $[[ inputs.allow_failure ]]
   retry: $[[ inputs.retry ]]
commit 590cce95c7c4e1a4d204554a4477f2a60ded122e
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Thu Oct 24 12:02:23 2024 +0200

    ci: Clean up after disabling failing targets
    
    Remove disabled, failing targets to unclutter the pipeline description.
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 5c49431..09e1cfe 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -29,6 +29,7 @@ include:
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-arm-v7
+      toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/113
       qemu_cpu: max
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
@@ -37,20 +38,9 @@ include:
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-mips
-      toolchain: [gnu]
+      toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/105
       qemu_cpu: 74Kf
       enable_gnu_coverage: false
-  # TODO: Merge with the one above once the following issue is resolved:
-  # https://gitlab.freedesktop.org/pixman/pixman/-/issues/105).
-  - local: .gitlab-ci.d/templates/build.yml
-    inputs:
-      target: linux-mips
-      toolchain: [llvm]
-      qemu_cpu: 74Kf
-      job_name_prefix: "."
-      job_name_suffix: ":failing"
-      allow_failure: true
-      retry: 0
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-mips64le
@@ -58,21 +48,10 @@ include:
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-mipsel
-      toolchain: [gnu]
+      toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/105
       qemu_cpu: 74Kf
       # Disable coverage, as the tests take too long to run with a single thread.
       enable_gnu_coverage: false
-  # TODO: Merge with the one above once the following issue is resolved:
-  # https://gitlab.freedesktop.org/pixman/pixman/-/issues/105).
-  - local: .gitlab-ci.d/templates/build.yml
-    inputs:
-      target: linux-mipsel
-      toolchain: [llvm]
-      qemu_cpu: 74Kf
-      job_name_prefix: "."
-      job_name_suffix: ":failing"
-      allow_failure: true
-      retry: 0
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-ppc
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index cf76e18..523b407 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -21,26 +21,11 @@ include:
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-386
-      toolchain: [gnu]
+      toolchain: [gnu]  # TODO LLVM issue: https://gitlab.freedesktop.org/pixman/pixman/-/issues/106
       pixman_disable:
         - "sse2 ssse3"  # Testing "mmx"
         - "mmx ssse3"  # Testing "sse2"
         - "mmx sse2"  # Testing "ssse3"
-  # TODO: Merge up after resolving
-  # https://gitlab.freedesktop.org/pixman/pixman/-/issues/106
-  - local: .gitlab-ci.d/templates/test.yml
-    inputs:
-      target: linux-386
-      toolchain: [llvm]
-      pixman_disable:
-        # Same as above.
-        - "sse2 ssse3"
-        - "mmx ssse3"
-        - "mmx sse2"
-      job_name_prefix: "."
-      job_name_suffix: ":failing"
-      allow_failure: true
-      retry: 0
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-amd64
@@ -51,28 +36,15 @@ include:
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-arm-v5
-      toolchain: [gnu]
-      qemu_cpu: [arm1136]
-      pixman_disable: ["arm-neon"] # Test only arm-simd.
-      timeout: 3h
-      test_timeout_multiplier: 40
-  # TODO: Merge up after resolving
-  # https://gitlab.freedesktop.org/pixman/pixman/-/issues/107
-  - local: .gitlab-ci.d/templates/test.yml
-    inputs:
-      target: linux-arm-v5
-      toolchain: [llvm]
+      toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/107
       qemu_cpu: [arm1136]
       pixman_disable: ["arm-neon"] # Test only arm-simd.
       timeout: 3h
       test_timeout_multiplier: 40
-      job_name_prefix: "."
-      job_name_suffix: ":failing"
-      allow_failure: true
-      retry: 0
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-arm-v7
+      toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/113
       qemu_cpu: [max]
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
@@ -90,19 +62,8 @@ include:
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-mips64le
-      toolchain: [gnu]
+      toolchain: [gnu]  # TODO: https://gitlab.freedesktop.org/pixman/pixman/-/issues/108
       qemu_cpu: [Loongson-3A4000]
-  # TODO: Merge up after resolving
-  # https://gitlab.freedesktop.org/pixman/pixman/-/issues/108
-  - local: .gitlab-ci.d/templates/test.yml
-    inputs:
-      target: linux-mips64le
-      toolchain: [llvm]
-      qemu_cpu: [Loongson-3A4000]
-      job_name_prefix: "."
-      job_name_suffix: ":failing"
-      allow_failure: true
-      retry: 0
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-mipsel
commit 17cf74322e1b7f6129d0d18a00a53a3e6e5cb39e
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Sat Dec 14 02:20:35 2024 +0100

    ci: Enable cross PPC tests
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 9bb6587..5c49431 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -81,7 +81,7 @@ include:
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
       target: linux-ppc64
-      qemu_cpu: ppc64
+      qemu_cpu: power9
       enable_gnu_coverage: false
   - local: .gitlab-ci.d/templates/build.yml
     inputs:
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index 383e7e2..cf76e18 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -113,18 +113,14 @@ include:
     inputs:
       target: linux-ppc
       qemu_cpu: [g4]
-      job_name_prefix: "."
-      job_name_suffix: ":failing"
-      allow_failure: true  # SIGILL for some tests
-      retry: 0
+      timeout: 2h
+      test_timeout_multiplier: 30
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-ppc64
-      qemu_cpu: [ppc64]
-      job_name_prefix: "."
-      job_name_suffix: ":failing"
-      allow_failure: true  # SIGSEGV for some tests
-      retry: 0
+      qemu_cpu: [power9]
+      timeout: 2h
+      test_timeout_multiplier: 30
   - local: .gitlab-ci.d/templates/test.yml
     inputs:
       target: linux-ppc64le
commit 218d5ed24947960f02291c0b720778fdff7d4fb3
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Sat Dec 14 03:30:36 2024 +0100

    test: Increase timeout for alpha-loop test
    
    Required to successfully run cross-compiled PPC targets.
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/test/alpha-loop.c b/test/alpha-loop.c
index 71822f1..1fe3cb3 100644
--- a/test/alpha-loop.c
+++ b/test/alpha-loop.c
@@ -22,7 +22,7 @@ main (int argc, char **argv)
     d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4);
     s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4);
 
-    fail_after (5, "Infinite loop detected: 5 seconds without progress\n");
+    fail_after (10, "Infinite loop detected: 10 seconds without progress\n");
 
     pixman_image_set_alpha_map (s, a, 0, 0);
     pixman_image_set_alpha_map (a, s, 0, 0);
commit 656f5a9ba5cdb92861f40603f6eb90733515cd41
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Sat Dec 14 00:24:23 2024 +0100

    ci: Use newer version of QEMU for Bookworm
    
    Bookworm uses QEMU 7, which is buggy in some contexts (e.g., when
    running on aarch64 host).
    
    This change updates QEMU to version 9 from bookworm-backports. It
    doesn't affect sid images (which have upstream version 9).
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/01-docker/Dockerfile b/.gitlab-ci.d/01-docker/Dockerfile
index 65267ce..c19a71a 100644
--- a/.gitlab-ci.d/01-docker/Dockerfile
+++ b/.gitlab-ci.d/01-docker/Dockerfile
@@ -12,13 +12,13 @@ ENV APT_UPDATE="apt-get update" \
 
 ARG GCOVR_VERSION="~=7.2"
 ARG MESON_VERSION="~=1.6"
-RUN ${APT_UPDATE} \
+RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >  /etc/apt/sources.list.d/debian-12-backports.list \
+    && ${APT_UPDATE} \
     && ${APT_INSTALL} \
         # Build dependencies.
         build-essential \
         ninja-build \
         pkg-config \
-        qemu-user \
         # pipx dependencies.
         python3-argcomplete \
         python3-packaging \
@@ -30,6 +30,11 @@ RUN ${APT_UPDATE} \
         libxml2-dev \
         libxslt-dev \
         python3-dev \
+    # User bookworm-backports for QEMU, as it has version 7 by default, which
+    # has some issues.
+    && ${APT_INSTALL} \
+        $(grep bookworm /etc/os-release >/dev/null && echo -t bookworm-backports) \
+        qemu-user \
     && ${APT_CLEANUP} \
     # Install pipx using pip to have a more recent version of pipx, which
     # supports the `--global` flag.
commit ba564a57ef913877d731160aaf364eae9e3e360c
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date:   Mon Oct 21 12:10:10 2024 +0200

    ci: Improve coverage and artifact handling
    
    - Upload all coverage artifacts in the summary stage. Having all source
      coverage reports makes it easier to debug the summary stage behavior
      without the need to download each artifact separately.
    - Fail if coverage report cannot be generated to prevent silent coverage
      report failure, which was possible since coverage report was in the
      `after_script` block.
    - Always save artifacts, so that it's easier to debug what's happened if
      the job failed.
    
    Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>

diff --git a/.gitlab-ci.d/04-summary.yml b/.gitlab-ci.d/04-summary.yml
index fe8adea..7ac969e 100644
--- a/.gitlab-ci.d/04-summary.yml
+++ b/.gitlab-ci.d/04-summary.yml
@@ -39,9 +39,10 @@ summary:
         --txt --print-summary
   coverage: '/^TOTAL.*\s+(\d+\%)$/'
   artifacts:
+    when: always
     reports:
       coverage_report:
         coverage_format: cobertura
         path: ${COVERAGE_SUMMARY_DIR}/coverage.xml
     paths:
-      - ${COVERAGE_SUMMARY_DIR}/
+      - ${COVERAGE_BASE_DIR}/
diff --git a/.gitlab-ci.d/templates/build.yml b/.gitlab-ci.d/templates/build.yml
index 7add5bf..3d0da18 100644
--- a/.gitlab-ci.d/templates/build.yml
+++ b/.gitlab-ci.d/templates/build.yml
@@ -70,11 +70,14 @@ spec:
       if [ "$[[ inputs.enable_gnu_coverage ]]" == "true" ] && [ "${TOOLCHAIN}" == "gnu" ]; then
         COV_C_ARGS=-fprofile-update=atomic
         COV_MESON_BUILD_ARGS=-Db_coverage=true
+        mkdir -p ${BUILD_DIR}
+        touch ${BUILD_DIR}/.coverage-enable
       fi
     - meson setup ${BUILD_DIR}
         --cross-file .gitlab-ci.d/meson-cross/${TARGET}-${TOOLCHAIN}.meson
         -Dc_args="${COV_C_ARGS}" ${COV_MESON_BUILD_ARGS}
     - meson compile -C ${BUILD_DIR}
   artifacts:
+    when: always
     paths:
       - ${BUILD_DIR}/
diff --git a/.gitlab-ci.d/templates/test.yml b/.gitlab-ci.d/templates/test.yml
index 64a211e..41d3d19 100644
--- a/.gitlab-ci.d/templates/test.yml
+++ b/.gitlab-ci.d/templates/test.yml
@@ -87,7 +87,6 @@ spec:
   variables:
     TARGET: $[[ inputs.target ]]
     TEST_TIMEOUT_MULTIPLIER: $[[ inputs.test_timeout_multiplier ]]
-    GCOVR_FLAGS: $[[ inputs.gcovr_flags ]]
     MESON_ARGS: -t ${TEST_TIMEOUT_MULTIPLIER} --no-rebuild -v ${TEST_NAME}
     MESON_TESTTHREADS: $[[ inputs.meson_testthreads ]]
   parallel:
@@ -97,13 +96,17 @@ spec:
         QEMU_CPU: $[[ inputs.qemu_cpu ]]
   script:
     - meson test -C ${BUILD_DIR} ${MESON_ARGS}
-  after_script:
+
+    # Generate coverage report.
     - mkdir -p ${COVERAGE_OUT}
-    - gcovr ${GCOVR_FLAGS} -r ./ ${BUILD_DIR} -e ./subprojects
-        --json ${COVERAGE_OUT}.json
-        --html-details ${COVERAGE_OUT}/coverage.html
-        --print-summary || echo "No coverage data available."
+    - if [ -f "${BUILD_DIR}/.coverage-enable" ]; then
+        gcovr $[[ inputs.gcovr_flags ]] -r ./ ${BUILD_DIR} -e ./subprojects
+          --json ${COVERAGE_OUT}.json
+          --html-details ${COVERAGE_OUT}/coverage.html
+          --print-summary;
+      fi
   artifacts:
+    when: always
     paths:
       - ${BUILD_DIR}/meson-logs/testlog.txt
       - ${COVERAGE_BASE_DIR}/


More information about the xorg-commit mailing list