pixman: Branch 'master' - 7 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Sep 9 14:28:54 UTC 2024
.gitlab-ci.d/01-docker.yml | 72 ---
.gitlab-ci.d/01-docker/Dockerfile | 140 +++++++
.gitlab-ci.d/01-docker/Dockerfile.codecov | 39 -
.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux | 20 -
.gitlab-ci.d/01-docker/Dockerfile.pltcov-windows | 32 -
.gitlab-ci.d/01-docker/platform-lookup.awk | 3
.gitlab-ci.d/01-docker/platform.lut | 9
.gitlab-ci.d/01-docker/target-env/linux-386.env | 3
.gitlab-ci.d/01-docker/target-env/linux-amd64.env | 3
.gitlab-ci.d/01-docker/target-env/linux-arm-v5.env | 3
.gitlab-ci.d/01-docker/target-env/linux-arm-v7.env | 3
.gitlab-ci.d/01-docker/target-env/linux-arm64-v8.env | 3
.gitlab-ci.d/01-docker/target-env/linux-mips.env | 3
.gitlab-ci.d/01-docker/target-env/linux-mips64el.env | 3
.gitlab-ci.d/01-docker/target-env/linux-mipsel.env | 3
.gitlab-ci.d/01-docker/target-env/linux-ppc.env | 1
.gitlab-ci.d/01-docker/target-env/linux-ppc64.env | 1
.gitlab-ci.d/01-docker/target-env/linux-ppc64le.env | 3
.gitlab-ci.d/01-docker/target-env/linux-riscv64.env | 3
.gitlab-ci.d/01-docker/target-env/windows-686.env | 1
.gitlab-ci.d/01-docker/target-env/windows-amd64.env | 1
.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env | 3
.gitlab-ci.d/02-build.yml | 194 ++++-----
.gitlab-ci.d/03-test.yml | 339 +++++++----------
.gitlab-ci.d/04-summary.yml | 42 +-
.gitlab-ci.d/meson-cross/linux-386-gnu.meson | 1
.gitlab-ci.d/meson-cross/linux-386-llvm.meson | 1
.gitlab-ci.d/meson-cross/linux-amd64-gnu.meson | 1
.gitlab-ci.d/meson-cross/linux-amd64-llvm.meson | 1
.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson | 1
.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson | 1
.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson | 1
.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson | 1
.gitlab-ci.d/meson-cross/linux-arm64-v8-gnu.meson | 1
.gitlab-ci.d/meson-cross/linux-arm64-v8-llvm.meson | 1
.gitlab-ci.d/meson-cross/linux-mips-gnu.meson | 6
.gitlab-ci.d/meson-cross/linux-mips-llvm.meson | 14
.gitlab-ci.d/meson-cross/linux-mips64el-gnu.meson | 8
.gitlab-ci.d/meson-cross/linux-mips64el-llvm.meson | 8
.gitlab-ci.d/meson-cross/linux-mipsel-gnu.meson | 1
.gitlab-ci.d/meson-cross/linux-mipsel-llvm.meson | 1
.gitlab-ci.d/meson-cross/linux-ppc-gnu.meson | 4
.gitlab-ci.d/meson-cross/linux-ppc-llvm.meson | 15
.gitlab-ci.d/meson-cross/linux-ppc64-gnu.meson | 2
.gitlab-ci.d/meson-cross/linux-ppc64-llvm.meson | 15
.gitlab-ci.d/meson-cross/linux-ppc64le-gnu.meson | 1
.gitlab-ci.d/meson-cross/linux-ppc64le-llvm.meson | 1
.gitlab-ci.d/meson-cross/linux-riscv64-gnu.meson | 5
.gitlab-ci.d/meson-cross/linux-riscv64-llvm.meson | 5
.gitlab-ci.d/meson-cross/native-gnu-noopenmp.meson | 8
.gitlab-ci.d/meson-cross/native-gnu.meson | 5
.gitlab-ci.d/meson-cross/native-llvm-noopenmp.meson | 8
.gitlab-ci.d/meson-cross/native-llvm.meson | 5
.gitlab-ci.d/meson-cross/windows-686-gnu.meson | 3
.gitlab-ci.d/meson-cross/windows-686-llvm.meson | 18
.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson | 3
.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson | 20 +
.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson | 18
.gitlab-ci.d/pixman-project.yml | 10
.gitlab-ci.d/platform-templates.yml | 188 ---------
.gitlab-ci.d/templates/build.yml | 75 +++
.gitlab-ci.d/templates/targets.yml | 9
.gitlab-ci.d/templates/test.yml | 112 +++++
63 files changed, 825 insertions(+), 680 deletions(-)
New commits:
commit ffa5645a2d139106a9154406e3b413fad14fe588
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Tue Aug 27 16:27:37 2024 +0200
ci: Add support for Windows on ARM
It uses LLVM MinGW pre-built toolchain, and wine-arm64 base Docker image
from Linaro.
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 f4feda9..12ff8f6 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -59,6 +59,7 @@ docker:
- linux-riscv64
- windows-686
- windows-amd64
+ - windows-arm64-v8
script:
# Prepare environment.
- ${LOAD_TARGET_ENV}
diff --git a/.gitlab-ci.d/01-docker/Dockerfile b/.gitlab-ci.d/01-docker/Dockerfile
index ac01b89..5c749ca 100644
--- a/.gitlab-ci.d/01-docker/Dockerfile
+++ b/.gitlab-ci.d/01-docker/Dockerfile
@@ -98,6 +98,16 @@ RUN ${APT_UPDATE} \
FROM base AS windows-base
ARG LLVM_MINGW_RELEASE=20240619
ARG LLVM_MINGW_VARIANT=llvm-mingw-${LLVM_MINGW_RELEASE}-msvcrt-ubuntu-20.04-x86_64
+RUN ${APT_UPDATE} \
+ && ${APT_INSTALL} 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
+
+FROM windows-base AS windows-x86-base
RUN dpkg --add-architecture i386 \
&& ${APT_UPDATE} \
&& ${APT_INSTALL} \
@@ -108,13 +118,7 @@ RUN dpkg --add-architecture i386 \
wine \
wine32 \
wine64 \
- wget \
&& ${APT_CLEANUP} \
- # Install llvm-mingw.
- && 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 \
# Inspired by https://code.videolan.org/videolan/docker-images
&& wine wineboot --init \
&& while pgrep wineserver > /dev/null; do \
@@ -122,7 +126,15 @@ RUN dpkg --add-architecture i386 \
sleep 1; \
done \
&& rm -rf /tmp/wine-*
-ENV PATH=${PATH}:/opt/${LLVM_MINGW_VARIANT}/bin
-FROM windows-base AS windows-686
-FROM windows-base AS windows-amd64
+FROM windows-x86-base AS windows-686
+FROM windows-x86-base AS windows-amd64
+
+# aarch64 image requires linaro/wine-arm64 as a base.
+FROM windows-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-*
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 100644
index 0000000..1e1ae33
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/amd64
+BASE_IMAGE=docker.io/linaro/wine-arm64
+BASE_IMAGE_TAG=latest
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index c6fb235..78bd4d3 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -93,3 +93,9 @@ include:
inputs:
target: windows-amd64
enable_gnu_coverage: false
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: windows-arm64-v8
+ toolchain: [llvm] # GNU toolchain doesn't seem to support Windows on ARM.
+ qemu_cpu: max
+ enable_gnu_coverage: false
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index ee144d8..90003c5 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -170,3 +170,8 @@ include:
- ""
- "fast"
- "wholeops"
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: windows-arm64-v8
+ toolchain: [llvm]
+ qemu_cpu: [max]
diff --git a/.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson b/.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson
new file mode 100644
index 0000000..f0d44cb
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson
@@ -0,0 +1,18 @@
+[binaries]
+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'
+
+[host_machine]
+system = 'windows'
+cpu_family = 'aarch64'
+cpu = 'aarch64'
+endian = 'little'
diff --git a/.gitlab-ci.d/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index 9af325f..33a38b4 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -20,7 +20,7 @@ variables:
LOAD_TARGET_ENV: source .gitlab-ci.d/01-docker/target-env/${TARGET}.env
# Enable/disable specific targets for code and platform coverage targets.
- ACTIVE_TARGET_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips|linux-mips64el|linux-mipsel|linux-ppc|linux-ppc64|linux-ppc64le|linux-riscv64|windows-686|windows-amd64/i'
+ ACTIVE_TARGET_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips|linux-mips64el|linux-mipsel|linux-ppc|linux-ppc64|linux-ppc64le|linux-riscv64|windows-686|windows-amd64|windows-arm64-v8/i'
workflow:
rules:
commit 51dcfb8027f131fc4f11ab2b295d182c830ff59d
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Tue Aug 27 15:55:30 2024 +0200
ci: Add support for LLVM for Windows targets
It uses LLVM MinGW project to get the precompiled LLVM toolchain for
cross-compilation.
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 ef57661..ac01b89 100644
--- a/.gitlab-ci.d/01-docker/Dockerfile
+++ b/.gitlab-ci.d/01-docker/Dockerfile
@@ -96,6 +96,8 @@ RUN ${APT_UPDATE} \
# 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
+ARG LLVM_MINGW_VARIANT=llvm-mingw-${LLVM_MINGW_RELEASE}-msvcrt-ubuntu-20.04-x86_64
RUN dpkg --add-architecture i386 \
&& ${APT_UPDATE} \
&& ${APT_INSTALL} \
@@ -106,7 +108,13 @@ RUN dpkg --add-architecture i386 \
wine \
wine32 \
wine64 \
+ wget \
&& ${APT_CLEANUP} \
+ # Install llvm-mingw.
+ && 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 \
# Inspired by https://code.videolan.org/videolan/docker-images
&& wine wineboot --init \
&& while pgrep wineserver > /dev/null; do \
@@ -114,6 +122,7 @@ RUN dpkg --add-architecture i386 \
sleep 1; \
done \
&& rm -rf /tmp/wine-*
+ENV PATH=${PATH}:/opt/${LLVM_MINGW_VARIANT}/bin
FROM windows-base AS windows-686
FROM windows-base AS windows-amd64
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 86f1e09..c6fb235 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -85,14 +85,11 @@ include:
inputs:
target: linux-riscv64
qemu_cpu: rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
- # Windows targets don't directly support LLVM at this moment.
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: windows-686
- toolchain: [gnu]
enable_gnu_coverage: false
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: windows-amd64
- toolchain: [gnu]
enable_gnu_coverage: false
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index 1b352af..ee144d8 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -154,11 +154,9 @@ include:
- rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
- rv64,v=true,vext_spec=v1.0,vlen=512,elen=64
- rv64,v=true,vext_spec=v1.0,vlen=1024,elen=64
- # For now, only GNU toolchain is supported for Windows.
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: windows-686
- toolchain: [gnu]
pixman_disable:
# The same as for linux-386.
- "sse2 ssse3"
@@ -167,7 +165,6 @@ include:
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: windows-amd64
- toolchain: [gnu]
pixman_disable:
# The same as for linux-amd64.
- ""
diff --git a/.gitlab-ci.d/meson-cross/windows-686-llvm.meson b/.gitlab-ci.d/meson-cross/windows-686-llvm.meson
new file mode 100644
index 0000000..5c81322
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/windows-686-llvm.meson
@@ -0,0 +1,18 @@
+[binaries]
+c = 'i686-w64-mingw32-clang'
+ar = 'i686-w64-mingw32-llvm-ar'
+strip = 'i686-w64-mingw32-strip'
+windres = 'i686-w64-mingw32-windres'
+exe_wrapper = 'wine'
+
+[built-in options]
+c_link_args = ['-static']
+
+[project options]
+openmp = 'disabled'
+
+[host_machine]
+system = 'windows'
+cpu_family = 'x86'
+cpu = 'i686'
+endian = 'little'
diff --git a/.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson b/.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson
new file mode 100644
index 0000000..8f353fc
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson
@@ -0,0 +1,20 @@
+[binaries]
+c = 'x86_64-w64-mingw32-clang'
+ar = 'x86_64-w64-mingw32-llvm-ar'
+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'
+cpu = 'x86_64'
+endian = 'little'
commit c0ee08aab0b0b38384d89eb5fb1ccc0d9b31a146
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Tue Aug 20 18:14:32 2024 +0200
ci: Add LLVM support to the CI workflow
Add support for LLVM for all targets. Mind that in the current state,
some targets fail either build or test stage. For the time being, these
jobs are marked with `:failing` job name suffix.
Relevant issues:
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/105
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/106
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/107
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/108
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/109
diff --git a/.gitlab-ci.d/01-docker/Dockerfile b/.gitlab-ci.d/01-docker/Dockerfile
index 28d2c1c..ef57661 100644
--- a/.gitlab-ci.d/01-docker/Dockerfile
+++ b/.gitlab-ci.d/01-docker/Dockerfile
@@ -41,13 +41,27 @@ RUN ${APT_UPDATE} \
&& echo Meson version: \
&& meson --version
-FROM base AS native-base
+FROM base AS llvm-base
+RUN ${APT_UPDATE} \
+ && ${APT_INSTALL} \
+ clang \
+ libclang-rt-dev \
+ lld \
+ llvm \
+ && ${APT_CLEANUP}
+
+FROM llvm-base AS native-base
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} \
# Runtime library dependencies.
libglib2.0-dev \
libgtk-3-dev \
libpng-dev \
+ # Install libomp-dev if available (OpenMP support for LLVM). It's done only
+ # for the native images, as OpenMP support in cross-build environment is
+ # tricky for LLVM.
+ && (${APT_INSTALL} libomp-dev \
+ || echo "OpenMP not available on this platform.") \
&& ${APT_CLEANUP}
# The following targets differ in BASE_IMAGE.
@@ -62,17 +76,17 @@ FROM native-base AS linux-ppc64le
FROM native-base AS linux-riscv64
# The following targets should have a common BASE_IMAGE.
-FROM base AS linux-mips
+FROM llvm-base AS linux-mips
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} gcc-multilib-mips-linux-gnu \
&& ${APT_CLEANUP}
-FROM base AS linux-ppc
+FROM llvm-base AS linux-ppc
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} gcc-multilib-powerpc-linux-gnu \
&& ${APT_CLEANUP}
-FROM base AS linux-ppc64
+FROM llvm-base AS linux-ppc64
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} gcc-multilib-powerpc64-linux-gnu \
&& ${APT_CLEANUP}
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 28bd2d7..86f1e09 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -9,7 +9,7 @@
variables:
# Used in test stage as well.
- BUILD_DIR: build
+ BUILD_DIR: build-${TOOLCHAIN}
# Applicable to all build targets.
@@ -35,8 +35,19 @@ include:
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mips
+ toolchain: [gnu]
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_suffix: ":failing"
+ allow_failure: true
+ retry: 0
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mips64el
@@ -44,7 +55,18 @@ include:
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mipsel
+ toolchain: [gnu]
+ qemu_cpu: 74Kf
+ # 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_suffix: ":failing"
+ allow_failure: true
+ retry: 0
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-ppc
@@ -63,11 +85,14 @@ include:
inputs:
target: linux-riscv64
qemu_cpu: rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
+ # Windows targets don't directly support LLVM at this moment.
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: windows-686
+ toolchain: [gnu]
enable_gnu_coverage: false
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: windows-amd64
+ toolchain: [gnu]
enable_gnu_coverage: false
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index b3370a1..1b352af 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -28,10 +28,25 @@ include:
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-386
+ toolchain: [gnu]
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_suffix: ":failing"
+ allow_failure: true
+ retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-amd64
@@ -42,12 +57,27 @@ 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
meson_testthreads: 1
gcovr_flags: --gcov-ignore-parse-errors
+ # 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]
+ qemu_cpu: [arm1136]
+ pixman_disable: ["arm-neon"] # Test only arm-simd.
+ timeout: 3h
+ test_timeout_multiplier: 40
+ meson_testthreads: 1
+ job_name_suffix: ":failing"
+ allow_failure: true
+ retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-arm-v7
@@ -59,6 +89,7 @@ include:
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-mips
+ toolchain: [gnu] # TODO: Add llvm once the build is fixed.
qemu_cpu: [74Kf]
job_name_suffix: ":failing"
allow_failure: true # Some tests seem to fail.
@@ -66,10 +97,22 @@ include:
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-mips64el
+ toolchain: [gnu]
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-mips64el
+ toolchain: [llvm]
+ qemu_cpu: [Loongson-3A4000]
+ job_name_suffix: ":failing"
+ allow_failure: true
+ retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-mipsel
+ toolchain: [gnu] # TODO: Add llvm once the build is fixed.
qemu_cpu: [74Kf]
timeout: 2h
meson_testthreads: 1
@@ -90,7 +133,18 @@ include:
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-ppc64le
+ toolchain: [gnu]
qemu_cpu: [power10]
+ # TODO: Merge up after resolving
+ # https://gitlab.freedesktop.org/pixman/pixman/-/issues/109
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-ppc64le
+ toolchain: [llvm]
+ qemu_cpu: [power10]
+ job_name_suffix: ":failing"
+ allow_failure: true
+ retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-riscv64
@@ -100,9 +154,11 @@ include:
- rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
- rv64,v=true,vext_spec=v1.0,vlen=512,elen=64
- rv64,v=true,vext_spec=v1.0,vlen=1024,elen=64
+ # For now, only GNU toolchain is supported for Windows.
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: windows-686
+ toolchain: [gnu]
pixman_disable:
# The same as for linux-386.
- "sse2 ssse3"
@@ -111,6 +167,7 @@ include:
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: windows-amd64
+ toolchain: [gnu]
pixman_disable:
# The same as for linux-amd64.
- ""
diff --git a/.gitlab-ci.d/meson-cross/linux-386-llvm.meson b/.gitlab-ci.d/meson-cross/linux-386-llvm.meson
new file mode 120000
index 0000000..3474611
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-386-llvm.meson
@@ -0,0 +1 @@
+native-llvm.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-amd64-llvm.meson b/.gitlab-ci.d/meson-cross/linux-amd64-llvm.meson
new file mode 120000
index 0000000..3474611
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-amd64-llvm.meson
@@ -0,0 +1 @@
+native-llvm.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 120000
index 0000000..1fe9c2e
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson
@@ -0,0 +1 @@
+native-llvm-noopenmp.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 120000
index 0000000..3474611
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson
@@ -0,0 +1 @@
+native-llvm.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-arm64-v8-llvm.meson b/.gitlab-ci.d/meson-cross/linux-arm64-v8-llvm.meson
new file mode 120000
index 0000000..3474611
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm64-v8-llvm.meson
@@ -0,0 +1 @@
+native-llvm.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-mips-llvm.meson b/.gitlab-ci.d/meson-cross/linux-mips-llvm.meson
new file mode 100644
index 0000000..8bce465
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-mips-llvm.meson
@@ -0,0 +1,14 @@
+[binaries]
+c = ['clang', '-target', 'mips-linux-gnu', '-fPIC', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/']
+
+[built-in options]
+c_link_args = ['-target', 'mips-linux-gnu', '-fuse-ld=lld']
+
+[host_machine]
+system = 'linux'
+cpu_family = 'mips32'
+cpu = 'mips32'
+endian = 'big'
diff --git a/.gitlab-ci.d/meson-cross/linux-mips64el-llvm.meson b/.gitlab-ci.d/meson-cross/linux-mips64el-llvm.meson
new file mode 100644
index 0000000..09ff006
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-mips64el-llvm.meson
@@ -0,0 +1,8 @@
+[binaries]
+c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+pkg-config = 'pkg-config'
+
+[project options]
+mips-dspr2 = 'disabled'
diff --git a/.gitlab-ci.d/meson-cross/linux-mipsel-llvm.meson b/.gitlab-ci.d/meson-cross/linux-mipsel-llvm.meson
new file mode 120000
index 0000000..1fe9c2e
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-mipsel-llvm.meson
@@ -0,0 +1 @@
+native-llvm-noopenmp.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-ppc-llvm.meson b/.gitlab-ci.d/meson-cross/linux-ppc-llvm.meson
new file mode 100644
index 0000000..1e0baa6
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-ppc-llvm.meson
@@ -0,0 +1,15 @@
+[binaries]
+c = ['clang', '-target', 'powerpc-linux-gnu']
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+exe_wrapper = ['qemu-ppc', '-L', '/usr/powerpc-linux-gnu/']
+
+[built-in options]
+# We cannot use LLD, as it doesn't support big-endian PPC.
+c_link_args = ['-target', 'powerpc-linux-gnu']
+
+[host_machine]
+system = 'linux'
+cpu_family = 'ppc'
+cpu = 'ppc'
+endian = 'big'
diff --git a/.gitlab-ci.d/meson-cross/linux-ppc64-llvm.meson b/.gitlab-ci.d/meson-cross/linux-ppc64-llvm.meson
new file mode 100644
index 0000000..6c6b644
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-ppc64-llvm.meson
@@ -0,0 +1,15 @@
+[binaries]
+c = ['clang', '-target', 'powerpc64-linux-gnu']
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+exe_wrapper = ['qemu-ppc64', '-L', '/usr/powerpc64-linux-gnu/']
+
+[built-in options]
+# We cannot use LLD, as it doesn't support big-endian PPC.
+c_link_args = ['-target', 'powerpc64-linux-gnu']
+
+[host_machine]
+system = 'linux'
+cpu_family = 'ppc64'
+cpu = 'ppc64'
+endian = 'big'
diff --git a/.gitlab-ci.d/meson-cross/linux-ppc64le-llvm.meson b/.gitlab-ci.d/meson-cross/linux-ppc64le-llvm.meson
new file mode 120000
index 0000000..3474611
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-ppc64le-llvm.meson
@@ -0,0 +1 @@
+native-llvm.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-riscv64-llvm.meson b/.gitlab-ci.d/meson-cross/linux-riscv64-llvm.meson
new file mode 100644
index 0000000..e9a868f
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-riscv64-llvm.meson
@@ -0,0 +1,5 @@
+[binaries]
+c = ['clang', '-march=rv64gcv']
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+pkg-config = 'pkg-config'
diff --git a/.gitlab-ci.d/meson-cross/native-llvm-noopenmp.meson b/.gitlab-ci.d/meson-cross/native-llvm-noopenmp.meson
new file mode 100644
index 0000000..50cb04f
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/native-llvm-noopenmp.meson
@@ -0,0 +1,8 @@
+[binaries]
+c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+pkg-config = 'pkg-config'
+
+[project options]
+openmp = 'disabled'
diff --git a/.gitlab-ci.d/meson-cross/native-llvm.meson b/.gitlab-ci.d/meson-cross/native-llvm.meson
new file mode 100644
index 0000000..4f78044
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/native-llvm.meson
@@ -0,0 +1,5 @@
+[binaries]
+c = 'clang'
+ar = 'llvm-ar'
+strip = 'llvm-strip'
+pkg-config = 'pkg-config'
diff --git a/.gitlab-ci.d/templates/build.yml b/.gitlab-ci.d/templates/build.yml
index 05e870f..9e4d157 100644
--- a/.gitlab-ci.d/templates/build.yml
+++ b/.gitlab-ci.d/templates/build.yml
@@ -4,6 +4,12 @@ spec:
description:
Build target 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.
+ toolchain:
+ description:
+ An array of toolchains to test with. Each toolchain should have an
+ appropriate Meson cross file.
+ type: array
+ default: [gnu, llvm]
qemu_cpu:
description:
QEMU_CPU environmental variable used by Docker (which uses QEMU
@@ -51,14 +57,17 @@ spec:
variables:
TARGET: $[[ inputs.target ]]
QEMU_CPU: $[[ inputs.qemu_cpu ]]
+ parallel:
+ matrix:
+ - TOOLCHAIN: $[[ inputs.toolchain ]]
script:
- |
- if [ "$[[ inputs.enable_gnu_coverage ]]" == "true" ]; then
+ if [ "$[[ inputs.enable_gnu_coverage ]]" == "true" ] && [ "${TOOLCHAIN}" == "gnu" ]; then
COV_C_ARGS=-fprofile-update=atomic
COV_MESON_BUILD_ARGS=-Db_coverage=true
fi
- meson setup ${BUILD_DIR}
- --cross-file .gitlab-ci.d/meson-cross/${TARGET}-gnu.meson
+ --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:
diff --git a/.gitlab-ci.d/templates/test.yml b/.gitlab-ci.d/templates/test.yml
index 708d5be..73278a4 100644
--- a/.gitlab-ci.d/templates/test.yml
+++ b/.gitlab-ci.d/templates/test.yml
@@ -4,6 +4,12 @@ spec:
description:
Build target 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.
+ toolchain:
+ description:
+ An array of toolchains to test with. Each toolchain should have an
+ appropriate Meson cross file.
+ type: array
+ default: [gnu, llvm]
qemu_cpu:
description:
An array of QEMU_CPU environmental variables used as a job matrix
@@ -69,7 +75,10 @@ spec:
parallel:
matrix:
- TARGET: $[[ inputs.target ]]
- - build:$[[ inputs.target ]]
+ - job: build:$[[ inputs.target ]]
+ parallel:
+ matrix:
+ - TOOLCHAIN: $[[ inputs.toolchain ]]
variables:
TARGET: $[[ inputs.target ]]
TEST_TIMEOUT_MULTIPLIER: $[[ inputs.test_timeout_multiplier ]]
@@ -77,7 +86,8 @@ spec:
MESON_ARGS: -t ${TEST_TIMEOUT_MULTIPLIER} --no-rebuild -v ${TEST_NAME}
parallel:
matrix:
- - PIXMAN_DISABLE: $[[ inputs.pixman_disable ]]
+ - TOOLCHAIN: $[[ inputs.toolchain ]]
+ PIXMAN_DISABLE: $[[ inputs.pixman_disable ]]
QEMU_CPU: $[[ inputs.qemu_cpu ]]
script:
# Move MESON_TESTTHREADS to variables once
commit 44927bf1e14c2ca17d1edaa8f8d1c1e2d8f4acc5
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Tue Aug 20 18:14:32 2024 +0200
ci: Unify build and test stage as job templates
This commit unifies codecov and pltcov build and test stages as single
parametrizable GitLab job templates. This cleans up the pipeline flow in
preparation for LLVM support in the pipeline.
Each target has now a Meson cross file, even when using a native
compiler, so that the job template can be better generalized. This also
allows to move architecture-specific build configuration to the cross
file instead of using the additional Meson flags in the job declaration.
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 597ac5d..28bd2d7 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -13,113 +13,61 @@ variables:
# Applicable to all build targets.
-.build:all:
- stage: build
- variables:
- # These are for job groups to fill.
- GROUP_C_ARGS: ""
- GROUP_MESON_ARGS: ""
- # These are for jobs to fill if needed.
- JOB_C_ARGS: ""
- JOB_MESON_ARGS: ""
- script:
- - meson setup ${BUILD_DIR}
- -Dc_args="-DCI_HAS_ALL_MIPS_CPU_FEATURES ${GROUP_C_ARGS} ${JOB_C_ARGS}"
- ${GROUP_MESON_ARGS} ${JOB_MESON_ARGS}
- - meson compile -C ${BUILD_DIR}
- artifacts:
- paths:
- - ${BUILD_DIR}/
-
-# Code coverage target build.
-
-.codecov-build:all:
- extends: .build:all
- variables:
- GROUP_C_ARGS: "-fprofile-update=atomic"
- GROUP_MESON_ARGS: "-Db_coverage=true"
-
-codecov-build:linux:386:
- extends:
- - .codecov-build:all
- - .codecov:linux:386
-
-codecov-build:linux:amd64:
- extends:
- - .codecov-build:all
- - .codecov:linux:amd64
-
-codecov-build:linux:arm:v5:
- extends:
- - .codecov-build:all
- - .codecov:linux:arm:v5
- variables:
- JOB_MESON_ARGS: -Dopenmp=disabled
-
-codecov-build:linux:arm:v7:
- extends:
- - .codecov-build:all
- - .codecov:linux:arm:v7
-
-codecov-build:linux:arm64:v8:
- extends:
- - .codecov-build:all
- - .codecov:linux:arm64:v8
-
-codecov-build:linux:mips64el:
- extends:
- - .codecov-build:all
- - .codecov:linux:mips64el
-
-codecov-build:linux:mipsel:
- extends:
- - .codecov-build:all
- - .codecov:linux:mipsel
- variables:
- JOB_MESON_ARGS: -Dopenmp=disabled
-
-codecov-build:linux:ppc64le:
- extends:
- - .codecov-build:all
- - .codecov:linux:ppc64le
-
-codecov-build:linux:riscv64:
- extends:
- - .codecov-build:all
- - .codecov:linux:riscv64
- variables:
- JOB_C_ARGS: "-march=rv64gcv"
-
-# Platform coverage target build.
-
-.pltcov-build:all:
- extends:
- - .build:all
- variables:
- CROSS_FILE_NAME: ${TARGET}.meson
- GROUP_MESON_ARGS: "--cross-file .gitlab-ci.d/pltcov/meson-cross/${CROSS_FILE_NAME}"
-
-pltcov-build:linux:mips:
- extends:
- - .pltcov-build:all
- - .pltcov:linux:mips
-
-pltcov-build:linux:ppc:
- extends:
- - .pltcov-build:all
- - .pltcov:linux:ppc
-
-pltcov-build:linux:ppc64:
- extends:
- - .pltcov-build:all
- - .pltcov:linux:ppc64
-
-pltcov-build:windows:686:
- extends:
- - .pltcov-build:all
- - .pltcov:windows:686
-
-pltcov-build:windows:amd64:
- extends:
- - .pltcov-build:all
- - .pltcov:windows:amd64
+include:
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-386
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-amd64
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-arm-v5
+ qemu_cpu: arm1136
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-arm-v7
+ qemu_cpu: max
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-arm64-v8
+ qemu_cpu: max
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-mips
+ qemu_cpu: 74Kf
+ enable_gnu_coverage: false
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-mips64el
+ qemu_cpu: Loongson-3A4000
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-mipsel
+ qemu_cpu: 74Kf
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-ppc
+ qemu_cpu: g4
+ enable_gnu_coverage: false
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-ppc64
+ qemu_cpu: ppc64
+ enable_gnu_coverage: false
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-ppc64le
+ qemu_cpu: power10
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: linux-riscv64
+ qemu_cpu: rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: windows-686
+ enable_gnu_coverage: false
+ - local: .gitlab-ci.d/templates/build.yml
+ inputs:
+ target: windows-amd64
+ enable_gnu_coverage: false
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index b30ea41..b3370a1 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -20,184 +20,99 @@
variables:
# Used in summary stage as well.
- COVERAGE_OUT_DIR: ${BUILD_DIR}/coverage
- COVERAGE_HTML_OUT_DIR: ${COVERAGE_OUT_DIR}/html
-
-.test:all:
- stage: test
- variables:
- TEST_TIMEOUT_MULTIPLIER: 20
- TEST_NAME: "" # Allow to specify a set of tests to run with run variables.
- script:
- - meson test -C ${BUILD_DIR} -t ${TEST_TIMEOUT_MULTIPLIER}
- --no-rebuild ${TEST_NAME}
-
-# Code coverage targets.
-
-.codecov-test:linux:
- extends: .test:all
- after_script:
- - mkdir -p ${COVERAGE_OUT_DIR} ${COVERAGE_HTML_OUT_DIR}
- - gcovr ${QCOVR_FLAGS} -r ./ ${BUILD_DIR} -e ./subprojects
- --json ${COVERAGE_OUT_DIR}/coverage-${CI_JOB_ID}.json
- --html-details ${COVERAGE_HTML_OUT_DIR}/coverage.html
- --print-summary
- artifacts:
- paths:
- - ${COVERAGE_OUT_DIR}/
- reports:
- junit: ${BUILD_DIR}/meson-logs/testlog.junit.xml
-
-codecov-test:linux:386:
- extends:
- - .codecov-test:linux
- - .codecov:linux:386
- needs:
- - codecov-build:linux:386
- parallel:
- matrix:
- - PIXMAN_ENABLE: ["mmx"]
- PIXMAN_DISABLE: ["sse2 ssse3"]
- - PIXMAN_ENABLE: ["sse2"]
- PIXMAN_DISABLE: ["mmx ssse3"]
- - PIXMAN_ENABLE: ["ssse3"]
- PIXMAN_DISABLE: ["mmx sse2"]
-
-codecov-test:linux:amd64:
- extends:
- - .codecov-test:linux
- - .codecov:linux:amd64
- needs:
- - codecov-build:linux:amd64
- parallel:
- matrix:
- - PIXMAN_DISABLE:
+ COVERAGE_BASE_DIR: coverage
+ COVERAGE_OUT: ${COVERAGE_BASE_DIR}/${CI_JOB_ID}
+ TEST_NAME: "" # Allow to specify a set of tests to run with run variables.
+
+include:
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-386
+ pixman_disable:
+ - "sse2 ssse3" # Testing "mmx"
+ - "mmx ssse3" # Testing "sse2"
+ - "mmx sse2" # Testing "ssse3"
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-amd64
+ pixman_disable:
- ""
- "fast"
- "wholeops"
-
-codecov-test:linux:arm:v5:
- extends:
- - .codecov-test:linux
- - .codecov:linux:arm:v5
- needs:
- - codecov-build:linux:arm:v5
- timeout: 3h
- variables:
- TEST_TIMEOUT_MULTIPLIER: 40
- PIXMAN_DISABLE: "arm-neon arm-iwmmxt" # Test only arm-simd.
- MESON_TESTTHREADS: 1
- QCOVR_FLAGS: --gcov-ignore-parse-errors
-
-codecov-test:linux:arm:v7:
- extends:
- - .codecov-test:linux
- - .codecov:linux:arm:v7
- needs:
- - codecov-build:linux:arm:v7
-
-codecov-test:linux:arm64:v8:
- extends:
- - .codecov-test:linux
- - .codecov:linux:arm64:v8
- needs:
- - codecov-build:linux:arm64:v8
-
-codecov-test:linux:mips64el:
- extends:
- - .codecov-test:linux
- - .codecov:linux:mips64el
- needs:
- - codecov-build:linux:mips64el
- variables:
- # Testing only loongson-mmi. Needs to be explicitly disabled due to
- # CI_HAS_ALL_MIPS_CPU_FEATURES.
- PIXMAN_DISABLE: "mips-dspr2"
-
-codecov-test:linux:mipsel:
- extends:
- - .codecov-test:linux
- - .codecov:linux:mipsel
- needs:
- - codecov-build:linux:mipsel
- timeout: 2h
- variables:
- MESON_TESTTHREADS: 1
- QCOVR_FLAGS: --gcov-ignore-parse-errors
-
-codecov-test:linux:ppc64le:
- extends:
- - .codecov-test:linux
- - .codecov:linux:ppc64le
- needs:
- - codecov-build:linux:ppc64le
-
-codecov-test:linux:riscv64:
- extends:
- - .codecov-test:linux
- - .codecov:linux:riscv64
- needs:
- - codecov-build:linux:riscv64
- parallel:
- matrix:
- # Test correctness for different VLENs.
- - QEMU_CPU:
- - rv64,v=true,vext_spec=v1.0,vlen=128,elen=64
- - rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
- - rv64,v=true,vext_spec=v1.0,vlen=512,elen=64
- - rv64,v=true,vext_spec=v1.0,vlen=1024,elen=64
-
-# Platform coverage targets.
-
-pltcov-test:linux:mips:
- extends:
- - .test:all
- - .pltcov:linux:mips
- needs:
- - pltcov-build:linux:mips
- allow_failure: true # Some tests seem to fail.
- retry: 0
-
-pltcov-test:linux:ppc:
- extends:
- - .test:all
- - .pltcov:linux:ppc
- needs:
- - pltcov-build:linux:ppc
- allow_failure: true # SIGILL for some tests
- retry: 0
-
-pltcov-test:linux:ppc64:
- extends:
- - .test:all
- - .pltcov:linux:ppc64
- needs:
- - pltcov-build:linux:ppc64
-
-pltcov-test:windows:686:
- extends:
- - .test:all
- - .pltcov:windows:686
- needs:
- - pltcov-build:windows:686
- parallel:
- matrix:
- - PIXMAN_ENABLE: ["mmx"]
- PIXMAN_DISABLE: ["sse2 ssse3"]
- - PIXMAN_ENABLE: ["sse2"]
- PIXMAN_DISABLE: ["mmx ssse3"]
- - PIXMAN_ENABLE: ["ssse3"]
- PIXMAN_DISABLE: ["mmx sse2"]
-
-pltcov-test:windows:amd64:
- extends:
- - .test:all
- - .pltcov:windows:amd64
- needs:
- - pltcov-build:windows:amd64
- parallel:
- matrix:
- - PIXMAN_DISABLE:
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-arm-v5
+ qemu_cpu: [arm1136]
+ pixman_disable: ["arm-neon"] # Test only arm-simd.
+ timeout: 3h
+ test_timeout_multiplier: 40
+ meson_testthreads: 1
+ gcovr_flags: --gcov-ignore-parse-errors
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-arm-v7
+ qemu_cpu: [max]
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-arm64-v8
+ qemu_cpu: [max]
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-mips
+ qemu_cpu: [74Kf]
+ job_name_suffix: ":failing"
+ allow_failure: true # Some tests seem to fail.
+ retry: 0
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-mips64el
+ qemu_cpu: [Loongson-3A4000]
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-mipsel
+ qemu_cpu: [74Kf]
+ timeout: 2h
+ meson_testthreads: 1
+ gcovr_flags: --gcov-ignore-parse-errors
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-ppc
+ qemu_cpu: [g4]
+ allow_failure: true # SIGILL for some tests
+ retry: 0
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-ppc64
+ qemu_cpu: [ppc64]
+ job_name_suffix: ":failing"
+ allow_failure: true # SIGSEGV for some tests
+ retry: 0
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-ppc64le
+ qemu_cpu: [power10]
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: linux-riscv64
+ qemu_cpu:
+ # Test correctness for different VLENs.
+ - rv64,v=true,vext_spec=v1.0,vlen=128,elen=64
+ - rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
+ - rv64,v=true,vext_spec=v1.0,vlen=512,elen=64
+ - rv64,v=true,vext_spec=v1.0,vlen=1024,elen=64
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: windows-686
+ pixman_disable:
+ # The same as for linux-386.
+ - "sse2 ssse3"
+ - "mmx ssse3"
+ - "mmx sse2"
+ - local: .gitlab-ci.d/templates/test.yml
+ inputs:
+ target: windows-amd64
+ pixman_disable:
+ # The same as for linux-amd64.
- ""
- "fast"
- "wholeops"
diff --git a/.gitlab-ci.d/04-summary.yml b/.gitlab-ci.d/04-summary.yml
index 2dc7263..87922b0 100644
--- a/.gitlab-ci.d/04-summary.yml
+++ b/.gitlab-ci.d/04-summary.yml
@@ -9,44 +9,43 @@ summary:
stage: summary
variables:
TARGET: linux-amd64
+ COVERAGE_SUMMARY_DIR: ${COVERAGE_BASE_DIR}/summary
needs:
- - job: codecov-test:linux:386
+ - job: test:linux-386
optional: true
- - job: codecov-test:linux:amd64
+ - job: test:linux-amd64
optional: true
- - job: codecov-test:linux:arm:v5
+ - job: test:linux-arm-v5
optional: true
- - job: codecov-test:linux:arm:v7
+ - job: test:linux-arm-v7
optional: true
- - job: codecov-test:linux:arm64:v8
+ - job: test:linux-arm64-v8
optional: true
- - job: codecov-test:linux:mips64el
+ - job: test:linux-mips64el
optional: true
- - job: codecov-test:linux:mipsel
+ - job: test:linux-mipsel
optional: true
- - job: codecov-test:linux:ppc64le
+ - job: test:linux-ppc64le
optional: true
- - job: codecov-test:linux:riscv64
+ - job: test:linux-riscv64
optional: true
script:
- - echo "Input coverage reports:" && ls ${COVERAGE_OUT_DIR}/coverage-*.json
+ - echo "Input coverage reports:" && ls ${COVERAGE_BASE_DIR}/*.json || (echo "No coverage reports available." && exit)
- |
args=( )
- for f in ${COVERAGE_OUT_DIR}/coverage-*.json; do
+ for f in ${COVERAGE_BASE_DIR}/*.json; do
args+=( "-a" "$f" )
done
- # Recreate the output directory, so that new artifacts don't mix with
- # arch-specific HTML outputs.
- - rm -fr ${COVERAGE_HTML_OUT_DIR} && mkdir -p ${COVERAGE_HTML_OUT_DIR}
+ - mkdir -p ${COVERAGE_SUMMARY_DIR}
- gcovr "${args[@]}"
- --cobertura-pretty --cobertura ${COVERAGE_OUT_DIR}/coverage.xml
- --html-details ${COVERAGE_HTML_OUT_DIR}/coverage.html
+ --cobertura-pretty --cobertura ${COVERAGE_SUMMARY_DIR}/coverage.xml
+ --html-details ${COVERAGE_SUMMARY_DIR}/coverage.html
--txt --print-summary
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
- path: ${COVERAGE_OUT_DIR}/coverage.xml
+ path: ${COVERAGE_SUMMARY_DIR}/coverage.xml
paths:
- - ${COVERAGE_OUT_DIR}/
+ - ${COVERAGE_SUMMARY_DIR}/
diff --git a/.gitlab-ci.d/meson-cross/linux-386-gnu.meson b/.gitlab-ci.d/meson-cross/linux-386-gnu.meson
new file mode 120000
index 0000000..ad75db9
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-386-gnu.meson
@@ -0,0 +1 @@
+native-gnu.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-amd64-gnu.meson b/.gitlab-ci.d/meson-cross/linux-amd64-gnu.meson
new file mode 120000
index 0000000..ad75db9
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-amd64-gnu.meson
@@ -0,0 +1 @@
+native-gnu.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 120000
index 0000000..4461c28
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson
@@ -0,0 +1 @@
+native-gnu-noopenmp.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 120000
index 0000000..ad75db9
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson
@@ -0,0 +1 @@
+native-gnu.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-arm64-v8-gnu.meson b/.gitlab-ci.d/meson-cross/linux-arm64-v8-gnu.meson
new file mode 120000
index 0000000..ad75db9
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-arm64-v8-gnu.meson
@@ -0,0 +1 @@
+native-gnu.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/pltcov/meson-cross/linux-mips.meson b/.gitlab-ci.d/meson-cross/linux-mips-gnu.meson
similarity index 50%
rename from .gitlab-ci.d/pltcov/meson-cross/linux-mips.meson
rename to .gitlab-ci.d/meson-cross/linux-mips-gnu.meson
index 4b1adcf..3234420 100644
--- a/.gitlab-ci.d/pltcov/meson-cross/linux-mips.meson
+++ b/.gitlab-ci.d/meson-cross/linux-mips-gnu.meson
@@ -1,10 +1,8 @@
[binaries]
-c = 'mips-linux-gnu-gcc'
-cpp = 'mips-linux-gnu-cpp'
+c = ['mips-linux-gnu-gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
ar = 'mips-linux-gnu-ar'
strip = 'mips-linux-gnu-strip'
-pkgconfig = 'pkg-config'
-exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/', '-cpu', '74Kf']
+exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/']
[host_machine]
system = 'linux'
diff --git a/.gitlab-ci.d/meson-cross/linux-mips64el-gnu.meson b/.gitlab-ci.d/meson-cross/linux-mips64el-gnu.meson
new file mode 100644
index 0000000..8a00fab
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-mips64el-gnu.meson
@@ -0,0 +1,8 @@
+[binaries]
+c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+
+[project options]
+mips-dspr2 = 'disabled'
diff --git a/.gitlab-ci.d/meson-cross/linux-mipsel-gnu.meson b/.gitlab-ci.d/meson-cross/linux-mipsel-gnu.meson
new file mode 120000
index 0000000..4461c28
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-mipsel-gnu.meson
@@ -0,0 +1 @@
+native-gnu-noopenmp.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/pltcov/meson-cross/linux-ppc.meson b/.gitlab-ci.d/meson-cross/linux-ppc-gnu.meson
similarity index 58%
rename from .gitlab-ci.d/pltcov/meson-cross/linux-ppc.meson
rename to .gitlab-ci.d/meson-cross/linux-ppc-gnu.meson
index e486eb2..a125a66 100644
--- a/.gitlab-ci.d/pltcov/meson-cross/linux-ppc.meson
+++ b/.gitlab-ci.d/meson-cross/linux-ppc-gnu.meson
@@ -1,10 +1,8 @@
[binaries]
c = 'powerpc-linux-gnu-gcc'
-cpp = 'powerpc-linux-gnu-cpp'
ar = 'powerpc-linux-gnu-ar'
strip = 'powerpc-linux-gnu-strip'
-pkgconfig = 'pkg-config'
-exe_wrapper = ['qemu-ppc', '-L', '/usr/powerpc-linux-gnu', '-cpu', 'g4']
+exe_wrapper = ['qemu-ppc', '-L', '/usr/powerpc-linux-gnu']
[host_machine]
system = 'linux'
diff --git a/.gitlab-ci.d/pltcov/meson-cross/linux-ppc64.meson b/.gitlab-ci.d/meson-cross/linux-ppc64-gnu.meson
similarity index 81%
rename from .gitlab-ci.d/pltcov/meson-cross/linux-ppc64.meson
rename to .gitlab-ci.d/meson-cross/linux-ppc64-gnu.meson
index a07683c..9f12913 100644
--- a/.gitlab-ci.d/pltcov/meson-cross/linux-ppc64.meson
+++ b/.gitlab-ci.d/meson-cross/linux-ppc64-gnu.meson
@@ -1,9 +1,7 @@
[binaries]
c = 'powerpc64-linux-gnu-gcc'
-cpp = 'powerpc64-linux-gnu-cpp'
ar = 'powerpc64-linux-gnu-ar'
strip = 'powerpc64-linux-gnu-strip'
-pkgconfig = 'pkg-config'
exe_wrapper = ['qemu-ppc64', '-L', '/usr/powerpc64-linux-gnu/']
[host_machine]
diff --git a/.gitlab-ci.d/meson-cross/linux-ppc64le-gnu.meson b/.gitlab-ci.d/meson-cross/linux-ppc64le-gnu.meson
new file mode 120000
index 0000000..ad75db9
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-ppc64le-gnu.meson
@@ -0,0 +1 @@
+native-gnu.meson
\ No newline at end of file
diff --git a/.gitlab-ci.d/meson-cross/linux-riscv64-gnu.meson b/.gitlab-ci.d/meson-cross/linux-riscv64-gnu.meson
new file mode 100644
index 0000000..04821dc
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/linux-riscv64-gnu.meson
@@ -0,0 +1,5 @@
+[binaries]
+c = ['gcc', '-march=rv64gcv']
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
diff --git a/.gitlab-ci.d/meson-cross/native-gnu-noopenmp.meson b/.gitlab-ci.d/meson-cross/native-gnu-noopenmp.meson
new file mode 100644
index 0000000..0b66b40
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/native-gnu-noopenmp.meson
@@ -0,0 +1,8 @@
+[binaries]
+c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+
+[project options]
+openmp = 'disabled'
diff --git a/.gitlab-ci.d/meson-cross/native-gnu.meson b/.gitlab-ci.d/meson-cross/native-gnu.meson
new file mode 100644
index 0000000..7cac576
--- /dev/null
+++ b/.gitlab-ci.d/meson-cross/native-gnu.meson
@@ -0,0 +1,5 @@
+[binaries]
+c = 'gcc'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
diff --git a/.gitlab-ci.d/pltcov/meson-cross/windows-686.meson b/.gitlab-ci.d/meson-cross/windows-686-gnu.meson
similarity index 86%
rename from .gitlab-ci.d/pltcov/meson-cross/windows-686.meson
rename to .gitlab-ci.d/meson-cross/windows-686-gnu.meson
index 3de8afa..301f6eb 100644
--- a/.gitlab-ci.d/pltcov/meson-cross/windows-686.meson
+++ b/.gitlab-ci.d/meson-cross/windows-686-gnu.meson
@@ -1,12 +1,11 @@
[binaries]
c = 'i686-w64-mingw32-gcc'
-cpp = 'i686-w64-mingw32-g++'
ar = 'i686-w64-mingw32-ar'
strip = 'i686-w64-mingw32-strip'
windres = 'i686-w64-mingw32-windres'
exe_wrapper = 'wine'
-[properties]
+[built-in options]
c_link_args = ['-static-libgcc']
[host_machine]
diff --git a/.gitlab-ci.d/pltcov/meson-cross/windows-amd64.meson b/.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
similarity index 86%
rename from .gitlab-ci.d/pltcov/meson-cross/windows-amd64.meson
rename to .gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
index a7b901f..0d14332 100644
--- a/.gitlab-ci.d/pltcov/meson-cross/windows-amd64.meson
+++ b/.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
@@ -1,12 +1,11 @@
[binaries]
c = 'x86_64-w64-mingw32-gcc'
-cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
windres = 'x86_64-w64-mingw32-windres'
exe_wrapper = 'wine'
-[properties]
+[built-in options]
c_link_args = ['-static-libgcc']
[host_machine]
diff --git a/.gitlab-ci.d/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index 18d1862..9af325f 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -53,7 +53,7 @@ default:
retry: 1
include:
- - local: "/.gitlab-ci.d/platform-templates.yml"
+ - local: "/.gitlab-ci.d/templates/targets.yml"
- local: "/.gitlab-ci.d/01-docker.yml"
- local: "/.gitlab-ci.d/02-build.yml"
- local: "/.gitlab-ci.d/03-test.yml"
diff --git a/.gitlab-ci.d/platform-templates.yml b/.gitlab-ci.d/platform-templates.yml
deleted file mode 100644
index 702ef77..0000000
--- a/.gitlab-ci.d/platform-templates.yml
+++ /dev/null
@@ -1,200 +0,0 @@
-# Platform templates
-#
-# Used to provide base for multi-arch runs. Each platform can be globally
-# disabled with by modifying ACTIVE_CODE/PLT_PATTERN variables. Some targets
-# have pre-defined `QEMU_CPU`, which is either the only or the default QEMU
-# configuration for a given platform.
-#
-# There are two types of targets:
-# - code – it is used to perform code coverage test.
-# - plt – it is used to perform additional platform coverage test for
-# architectures, which don't have official Debian support, and don't increase
-# the code coverage.
-
-.target:all:
- image:
- name: $DOCKER_IMAGE_NAME-$TARGET
- rules:
- - if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
- before_script:
- - ${LOAD_TARGET_ENV}
-
-# i386 is used for `mmx`, `sse2` and `ssse3` backend tests.
-.codecov:linux:386:
- extends: .target:all
- # Waiting for https://gitlab.com/gitlab-org/gitlab/-/issues/423553
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-386
- variables:
- TARGET: linux-386
-
-# amd64 is used for general tests.
-.codecov:linux:amd64:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-amd64
- variables:
- TARGET: linux-amd64
-
-# ARMv5 is used for `arm-simd` test.
-.codecov:linux:arm:v5:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-arm-v5
- variables:
- TARGET: linux-arm-v5
- # It is in fact an ARMv6 CPU, which is required for SIMD to get discovered
- # on runtime.
- QEMU_CPU: arm1136
-
-# ARMv7 is used for ARMv7 variant of `arm-neon`.
-.codecov:linux:arm:v7:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-arm-v7
- variables:
- TARGET: linux-arm-v7
-
-# ARM64v8 is used for `arm-neon`.
-.codecov:linux:arm64:v8:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-arm64-v8
- variables:
- TARGET: linux-arm64-v8
-
-# MIPS64EL used for `loongson-mmi`.
-.codecov:linux:mips64el:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-mips64el
- variables:
- TARGET: linux-mips64el
- QEMU_CPU: "Loongson-3A4000"
-
-# MIPS (32 bit, little endian) is used for `mips-dspr2`.
-.codecov:linux:mipsel:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-mipsel
- variables:
- TARGET: linux-mipsel
- # As written in the code comment, it's the only supported CPU.
- QEMU_CPU: 74Kf
-
-# PPC64LE used for `vmx`.
-.codecov:linux:ppc64le:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-ppc64le
- variables:
- TARGET: linux-ppc64le
-
-# RISCV64 used for `rvv`.
-.codecov:linux:riscv64:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-riscv64
- variables:
- TARGET: linux-riscv64
- QEMU_CPU: rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
-
-# Platform coverage targets (Linux).
-
-# MIPS (32 bit, big endian) used for `mips-dspr2`.
-.pltcov:linux:mips:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-mips
- variables:
- TARGET: linux-mips
-
-# PPC (32 bit, big endian) used for `vmx`.
-.pltcov:linux:ppc:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-ppc
- variables:
- TARGET: linux-ppc
-
-# PPC64 (64 bit, big endian) used for `vmx`.
-.pltcov:linux:ppc64:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: linux-ppc64
- variables:
- TARGET: linux-ppc64
-
-# Platform coverage targets (Windows).
-
-# Windows i386
-.pltcov:windows:686:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: windows-686
- variables:
- TARGET: windows-686
-
-# Windows amd64
-.pltcov:windows:amd64:
- extends: .target:all
- needs:
- - job: docker
- optional: true
- parallel:
- matrix:
- - TARGET: windows-amd64
- variables:
- TARGET: windows-amd64
diff --git a/.gitlab-ci.d/templates/build.yml b/.gitlab-ci.d/templates/build.yml
new file mode 100644
index 0000000..05e870f
--- /dev/null
+++ b/.gitlab-ci.d/templates/build.yml
@@ -0,0 +1,66 @@
+spec:
+ inputs:
+ target:
+ description:
+ Build target 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.
+ qemu_cpu:
+ description:
+ QEMU_CPU environmental variable used by Docker (which uses QEMU
+ underneath). It is not used by x86 targets, as they are executed
+ natively on the host.
+ default: ""
+ enable_gnu_coverage:
+ description:
+ Enable coverage build flags. It can be later used to compile a coverage
+ report for all the jobs. Should be enabled only for native build
+ environments as they have all the optional dependencies, and are the
+ most reliable and uniform (so disable for cross environments).
+ type: boolean
+ default: true
+ job_name_suffix:
+ description:
+ Additional suffix for the job name. Can be used to prevent job
+ duplication for jobs for the same target.
+ default: ""
+ allow_failure:
+ description:
+ Set the `allow_failure` flag for jobs that are expected to fail.
+ Remember to set `retry` argument to 0 to prevent unnecessary retries.
+ type: boolean
+ default: false
+ retry:
+ description:
+ Set the `retry` flag for a job. Usually used together with
+ `allow_failure`.
+ type: number
+ default: 1
+---
+
+"build:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
+ extends: .target:all
+ stage: build
+ allow_failure: $[[ inputs.allow_failure ]]
+ retry: $[[ inputs.retry ]]
+ needs:
+ - job: docker
+ optional: true
+ parallel:
+ matrix:
+ - TARGET: $[[ inputs.target ]]
+ variables:
+ TARGET: $[[ inputs.target ]]
+ QEMU_CPU: $[[ inputs.qemu_cpu ]]
+ script:
+ - |
+ if [ "$[[ inputs.enable_gnu_coverage ]]" == "true" ]; then
+ COV_C_ARGS=-fprofile-update=atomic
+ COV_MESON_BUILD_ARGS=-Db_coverage=true
+ fi
+ - meson setup ${BUILD_DIR}
+ --cross-file .gitlab-ci.d/meson-cross/${TARGET}-gnu.meson
+ -Dc_args="${COV_C_ARGS}" ${COV_MESON_BUILD_ARGS}
+ - meson compile -C ${BUILD_DIR}
+ artifacts:
+ paths:
+ - ${BUILD_DIR}/
diff --git a/.gitlab-ci.d/templates/targets.yml b/.gitlab-ci.d/templates/targets.yml
new file mode 100644
index 0000000..c348bf2
--- /dev/null
+++ b/.gitlab-ci.d/templates/targets.yml
@@ -0,0 +1,9 @@
+# General target templates.
+
+.target:all:
+ image:
+ name: $DOCKER_IMAGE_NAME-$TARGET
+ rules:
+ - if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
+ before_script:
+ - ${LOAD_TARGET_ENV}
diff --git a/.gitlab-ci.d/templates/test.yml b/.gitlab-ci.d/templates/test.yml
new file mode 100644
index 0000000..708d5be
--- /dev/null
+++ b/.gitlab-ci.d/templates/test.yml
@@ -0,0 +1,102 @@
+spec:
+ inputs:
+ target:
+ description:
+ Build target 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.
+ qemu_cpu:
+ description:
+ An array of QEMU_CPU environmental variables used as a job matrix
+ variable, and in turn by Docker (which uses QEMU underneath). It is not
+ used by x86 targets, as they are executed natively on the host.
+ type: array
+ default: [""]
+ pixman_disable:
+ description:
+ An array of PIXMAN_DISABLE targets used as a job matrix variable.
+ type: array
+ default: [""]
+ timeout:
+ description:
+ GitLab job timeout property. May need to be increased for slow
+ targets.
+ default: 1h
+ test_timeout_multiplier:
+ description:
+ Test timeout multiplier flag used for Meson test execution. May need to
+ be increased for slow targets.
+ type: number
+ default: 20
+ meson_testthreads:
+ description:
+ Sets MESON_TESTTHREADS environmental variable. For some platforms, the
+ tests should be executed one by one (without multithreading) to prevent
+ gcovr errors.
+ type: number
+ default: 0
+ gcovr_flags:
+ description:
+ Additional flags passed to gcovr tool.
+ 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: ""
+ allow_failure:
+ description:
+ Set the `allow_failure` flag for jobs that are expected to fail.
+ Remember to set `retry` argument to 0 to prevent unnecessary retries.
+ type: boolean
+ default: false
+ retry:
+ description:
+ Set the `retry` flag for a job. Usually used together with
+ `allow_failure`.
+ type: number
+ default: 1
+---
+
+"test:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
+ extends: .target:all
+ stage: test
+ allow_failure: $[[ inputs.allow_failure ]]
+ retry: $[[ inputs.retry ]]
+ timeout: $[[ inputs.timeout ]]
+ needs:
+ - job: docker
+ optional: true
+ parallel:
+ matrix:
+ - TARGET: $[[ inputs.target ]]
+ - build:$[[ inputs.target ]]
+ 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}
+ parallel:
+ matrix:
+ - PIXMAN_DISABLE: $[[ inputs.pixman_disable ]]
+ QEMU_CPU: $[[ inputs.qemu_cpu ]]
+ script:
+ # Move MESON_TESTTHREADS to variables once
+ # https://github.com/mesonbuild/meson/pull/13604 gets released.
+ - |
+ if [ $[[ inputs.meson_testthreads ]] -gt 0 ]; then
+ MESON_TESTTHREADS=$[[ inputs.meson_testthreads ]]
+ fi
+ - meson test -C ${BUILD_DIR} ${MESON_ARGS}
+ after_script:
+ - 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."
+ artifacts:
+ paths:
+ - ${BUILD_DIR}/meson-logs/testlog.txt
+ - ${COVERAGE_BASE_DIR}/
+ reports:
+ junit:
+ - ${BUILD_DIR}/meson-logs/testlog.junit.xml
commit 19b1a98e8d82c456201ea2afae4974e6888c4eba
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Mon Sep 2 19:05:45 2024 +0200
ci: Unify Docker image as multi-stage build
This commit merges codecov and pltcov Dockerfiles into a single,
multi-stage Dockerfile. This results in more streamlined Docker image
builds with some common layers which can be reused by multiple images.
Also, by making a common Dockerfile, all common dependencies have the
same exact description, which decreases disparity between different
images for all the supported architectures. Mind that package version
disparity cannot be prevented 100%, as different base images may be used
for different architectures (e.g., Debian Sid for riscv64 instead of
Bookworm).
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 20d1869..f4feda9 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -4,20 +4,20 @@
# later easily used with properly configured Docker (which uses binfmt and QEMU
# underneath).
-.docker:
+docker:
stage: docker
image: quay.io/buildah/stable
rules:
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
+ - 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
- - if: $CI_PIPELINE_SOURCE == 'schedule'
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- - if: $CI_COMMIT_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
@@ -42,9 +42,6 @@
- echo "${DOCKERHUB_PASSWORD}" |
buildah login -u "${DOCKERHUB_USER}" --password-stdin docker.io ||
echo "Failed to login to Docker Hub."
-
-docker-codecov:
- extends: .docker
parallel:
matrix:
- TARGET:
@@ -53,12 +50,15 @@ docker-codecov:
- linux-arm-v5
- linux-arm-v7
- linux-arm64-v8
+ - linux-mips
- linux-mips64el
- linux-mipsel
+ - linux-ppc
+ - linux-ppc64
- linux-ppc64le
- linux-riscv64
- rules:
- - if: $TARGET =~ $ACTIVE_TARGET_PATTERN
+ - windows-686
+ - windows-amd64
script:
# Prepare environment.
- ${LOAD_TARGET_ENV}
@@ -67,42 +67,11 @@ docker-codecov:
# Build and push the image.
- buildah bud
--tag ${FULL_IMAGE_NAME}
- --layers
- ${CACHE_ARGS}
+ --layers ${CACHE_ARGS}
+ --target ${TARGET}
--platform=${DOCKER_PLATFORM}
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
- -f Dockerfile.codecov .gitlab-ci.d/01-docker/
- - buildah push ${FULL_IMAGE_NAME}
-
-.docker-pltcov:
- extends: .docker
- retry: 0
- script:
- # Prepare environment.
- - FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-pltcov-${TARGET}
-
- # Build and push the image.
- - buildah bud
- --tag ${FULL_IMAGE_NAME}
- --layers
- ${CACHE_ARGS}
- -f Dockerfile.pltcov-${TARGET} .gitlab-ci.d/01-docker/
+ -f Dockerfile .gitlab-ci.d/01-docker/
+ - buildah images
- buildah push ${FULL_IMAGE_NAME}
-
-docker-pltcov:linux:
- extends: .docker-pltcov
- rules:
- - if: "'linux-mips' =~ $ACTIVE_TARGET_PATTERN"
- - if: "'linux-ppc' =~ $ACTIVE_TARGET_PATTERN"
- - if: "'linux-ppc64' =~ $ACTIVE_TARGET_PATTERN"
- variables:
- TARGET: linux
-
-docker-pltcov:windows:
- extends: .docker-pltcov
- rules:
- - if: "'windows-386' =~ $ACTIVE_TARGET_PATTERN"
- - if: "'windows-amd64' =~ $ACTIVE_TARGET_PATTERN"
- variables:
- TARGET: windows
diff --git a/.gitlab-ci.d/01-docker/Dockerfile b/.gitlab-ci.d/01-docker/Dockerfile
new file mode 100644
index 0000000..28d2c1c
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/Dockerfile
@@ -0,0 +1,105 @@
+ARG BASE_IMAGE=docker.io/debian
+ARG BASE_IMAGE_TAG=bookworm-slim
+FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} AS base
+
+LABEL org.opencontainers.image.title="Pixman build environment for platform coverage" \
+ org.opencontainers.image.authors="Marek Pikuła <m.pikula at partner.samsung.com>"
+
+ARG DEBIAN_FRONTEND=noninteractive
+ENV APT_UPDATE="apt-get update" \
+ APT_INSTALL="apt-get install -y --no-install-recommends" \
+ APT_CLEANUP="rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*"
+
+RUN ${APT_UPDATE} \
+ && ${APT_INSTALL} \
+ # Build dependencies.
+ build-essential \
+ ninja-build \
+ pkg-config \
+ qemu-user \
+ # pipx dependencies.
+ python3-argcomplete \
+ python3-packaging \
+ python3-pip \
+ python3-platformdirs \
+ python3-userpath \
+ python3-venv \
+ # gcovr dependencies.
+ libxml2-dev \
+ libxslt-dev \
+ python3-dev \
+ && ${APT_CLEANUP} \
+ # Install pipx using pip to have a more recent version of pipx, which
+ # supports the `--global` flag.
+ && pip install pipx --break-system-packages \
+ # Install a recent version of meson and gcovr using pipx to have the same
+ # version across all variants regardless of base.
+ && pipx install --global \
+ gcovr \
+ meson \
+ && gcovr --version \
+ && echo Meson version: \
+ && meson --version
+
+FROM base AS native-base
+RUN ${APT_UPDATE} \
+ && ${APT_INSTALL} \
+ # Runtime library dependencies.
+ libglib2.0-dev \
+ libgtk-3-dev \
+ libpng-dev \
+ && ${APT_CLEANUP}
+
+# The following targets differ in BASE_IMAGE.
+FROM native-base AS linux-386
+FROM native-base AS linux-amd64
+FROM native-base AS linux-arm-v5
+FROM native-base AS linux-arm-v7
+FROM native-base AS linux-arm64-v8
+FROM native-base AS linux-mips64el
+FROM native-base AS linux-mipsel
+FROM native-base AS linux-ppc64le
+FROM native-base AS linux-riscv64
+
+# The following targets should have a common BASE_IMAGE.
+FROM base AS linux-mips
+RUN ${APT_UPDATE} \
+ && ${APT_INSTALL} gcc-multilib-mips-linux-gnu \
+ && ${APT_CLEANUP}
+
+FROM base AS linux-ppc
+RUN ${APT_UPDATE} \
+ && ${APT_INSTALL} gcc-multilib-powerpc-linux-gnu \
+ && ${APT_CLEANUP}
+
+FROM base AS linux-ppc64
+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
+RUN dpkg --add-architecture i386 \
+ && ${APT_UPDATE} \
+ && ${APT_INSTALL} \
+ gcc-mingw-w64-i686 \
+ gcc-mingw-w64-x86-64 \
+ mingw-w64-tools \
+ procps \
+ 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-*
+
+FROM windows-base AS windows-686
+FROM windows-base AS windows-amd64
diff --git a/.gitlab-ci.d/01-docker/Dockerfile.codecov b/.gitlab-ci.d/01-docker/Dockerfile.codecov
deleted file mode 100644
index a2f9be5..0000000
--- a/.gitlab-ci.d/01-docker/Dockerfile.codecov
+++ /dev/null
@@ -1,39 +0,0 @@
-ARG BASE_IMAGE=docker.io/debian
-# Debian Sid is requried for official riscv64 support.
-ARG BASE_IMAGE_TAG=bookworm-slim
-FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
-
-LABEL org.opencontainers.image.title="Pixman build environment for code coverage" \
- org.opencontainers.image.authors="Marek Pikuła <m.pikula at partner.samsung.com>"
-
-ARG DEBIAN_FRONTEND=noninteractive
-RUN apt-get update \
- # Install build dependencies.
- && apt-get install -y --no-install-recommends \
- # Build dependencies
- build-essential \
- libglib2.0-dev \
- libgtk-3-dev \
- libpng-dev \
- meson \
- pkg-config \
- # pipx and gcovr dependencies
- libxml2-dev \
- libxslt-dev \
- python3-argcomplete \
- python3-dev \
- python3-packaging \
- python3-pip \
- python3-platformdirs \
- python3-userpath \
- python3-venv \
- # Clean up after apt.
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* \
- # Install pipx using pip to have the more recent version which supports the
- # `--global` flag.
- && pip install pipx --break-system-packages \
- # Install gcovr using pipx to have the same version on all installations.
- && pipx ensurepath --global \
- && pipx install --global gcovr \
- # Check gcovr version.
- && gcovr --version
diff --git a/.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux b/.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux
deleted file mode 100644
index 2491712..0000000
--- a/.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux
+++ /dev/null
@@ -1,20 +0,0 @@
-ARG BASE_IMAGE=docker.io/debian
-# Debian Sid is requried for official riscv64 support.
-ARG BASE_IMAGE_TAG=bookworm-slim
-FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
-
-LABEL org.opencontainers.image.title="Pixman build environment for platform coverage (Linux targets)" \
- org.opencontainers.image.authors="Marek Pikuła <m.pikula at partner.samsung.com>"
-
-ARG DEBIAN_FRONTEND=noninteractive
-RUN apt-get update \
- # Install build dependencies.
- && apt-get install -y --no-install-recommends \
- build-essential \
- gcc-multilib-mips-linux-gnu \
- gcc-multilib-powerpc-linux-gnu \
- gcc-multilib-powerpc64-linux-gnu \
- meson \
- qemu-user \
- # Clean up after apt.
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
diff --git a/.gitlab-ci.d/01-docker/Dockerfile.pltcov-windows b/.gitlab-ci.d/01-docker/Dockerfile.pltcov-windows
deleted file mode 100644
index c75591e..0000000
--- a/.gitlab-ci.d/01-docker/Dockerfile.pltcov-windows
+++ /dev/null
@@ -1,32 +0,0 @@
-ARG BASE_IMAGE=docker.io/debian
-# Debian Sid is requried for official riscv64 support.
-ARG BASE_IMAGE_TAG=bookworm-slim
-FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
-
-LABEL org.opencontainers.image.title="Pixman build environment for platform coverage (Windows targets)" \
- org.opencontainers.image.authors="Marek Pikuła <m.pikula at partner.samsung.com>"
-
-ARG DEBIAN_FRONTEND=noninteractive
-RUN dpkg --add-architecture i386 \
- && apt-get update \
- # Install build dependencies.
- && apt-get install -y --no-install-recommends \
- build-essential \
- gcc-mingw-w64-i686 \
- gcc-mingw-w64-x86-64 \
- meson \
- mingw-w64-tools \
- procps \
- wine \
- wine32 \
- wine64 \
- # Clean up after apt.
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
-
-# Inspired by https://code.videolan.org/videolan/docker-images
-RUN wine wineboot --init \
- && while pgrep wineserver > /dev/null; do \
- echo "waiting ..."; \
- sleep 1; \
- done \
- && rm -rf /tmp/wine-*
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-mips.env b/.gitlab-ci.d/01-docker/target-env/linux-mips.env
new file mode 100644
index 0000000..4798622
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-mips.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/amd64
+BASE_IMAGE=docker.io/amd64/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-ppc.env b/.gitlab-ci.d/01-docker/target-env/linux-ppc.env
new file mode 120000
index 0000000..d0a3f97
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-ppc.env
@@ -0,0 +1 @@
+linux-amd64.env
\ No newline at end of file
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-ppc64.env b/.gitlab-ci.d/01-docker/target-env/linux-ppc64.env
new file mode 120000
index 0000000..d0a3f97
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-ppc64.env
@@ -0,0 +1 @@
+linux-amd64.env
\ No newline at end of file
diff --git a/.gitlab-ci.d/01-docker/target-env/windows-686.env b/.gitlab-ci.d/01-docker/target-env/windows-686.env
new file mode 120000
index 0000000..d0a3f97
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/windows-686.env
@@ -0,0 +1 @@
+linux-amd64.env
\ No newline at end of file
diff --git a/.gitlab-ci.d/01-docker/target-env/windows-amd64.env b/.gitlab-ci.d/01-docker/target-env/windows-amd64.env
new file mode 120000
index 0000000..d0a3f97
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/windows-amd64.env
@@ -0,0 +1 @@
+linux-amd64.env
\ No newline at end of file
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 5aa7bc0..597ac5d 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -99,23 +99,27 @@ codecov-build:linux:riscv64:
CROSS_FILE_NAME: ${TARGET}.meson
GROUP_MESON_ARGS: "--cross-file .gitlab-ci.d/pltcov/meson-cross/${CROSS_FILE_NAME}"
-pltcov-build:linux:
+pltcov-build:linux:mips:
extends:
- .pltcov-build:all
- - .pltcov:linux
- parallel:
- matrix:
- - TARGET:
- - linux-mips
- - linux-ppc
- - linux-ppc64
-
-pltcov-build:windows:
+ - .pltcov:linux:mips
+
+pltcov-build:linux:ppc:
+ extends:
+ - .pltcov-build:all
+ - .pltcov:linux:ppc
+
+pltcov-build:linux:ppc64:
+ extends:
+ - .pltcov-build:all
+ - .pltcov:linux:ppc64
+
+pltcov-build:windows:686:
+ extends:
+ - .pltcov-build:all
+ - .pltcov:windows:686
+
+pltcov-build:windows:amd64:
extends:
- .pltcov-build:all
- - .pltcov:windows
- parallel:
- matrix:
- - TARGET:
- - windows-386
- - windows-amd64
+ - .pltcov:windows:amd64
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index 99994c5..b30ea41 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -154,10 +154,7 @@ pltcov-test:linux:mips:
- .test:all
- .pltcov:linux:mips
needs:
- - job: pltcov-build:linux
- parallel:
- matrix:
- - TARGET: linux-mips
+ - pltcov-build:linux:mips
allow_failure: true # Some tests seem to fail.
retry: 0
@@ -166,10 +163,7 @@ pltcov-test:linux:ppc:
- .test:all
- .pltcov:linux:ppc
needs:
- - job: pltcov-build:linux
- parallel:
- matrix:
- - TARGET: linux-ppc
+ - pltcov-build:linux:ppc
allow_failure: true # SIGILL for some tests
retry: 0
@@ -178,20 +172,14 @@ pltcov-test:linux:ppc64:
- .test:all
- .pltcov:linux:ppc64
needs:
- - job: pltcov-build:linux
- parallel:
- matrix:
- - TARGET: linux-ppc64
+ - pltcov-build:linux:ppc64
-pltcov-test:windows:386:
+pltcov-test:windows:686:
extends:
- .test:all
- - .pltcov:windows:386
+ - .pltcov:windows:686
needs:
- - job: pltcov-build:windows
- parallel:
- matrix:
- - TARGET: windows-386
+ - pltcov-build:windows:686
parallel:
matrix:
- PIXMAN_ENABLE: ["mmx"]
@@ -206,10 +194,7 @@ pltcov-test:windows:amd64:
- .test:all
- .pltcov:windows:amd64
needs:
- - job: pltcov-build:windows
- parallel:
- matrix:
- - TARGET: windows-amd64
+ - pltcov-build:windows:amd64
parallel:
matrix:
- PIXMAN_DISABLE:
diff --git a/.gitlab-ci.d/04-summary.yml b/.gitlab-ci.d/04-summary.yml
index 530ac36..2dc7263 100644
--- a/.gitlab-ci.d/04-summary.yml
+++ b/.gitlab-ci.d/04-summary.yml
@@ -5,11 +5,10 @@
# HTML report generated as a separate artifact.
summary:
+ extends: .target:all
stage: summary
- image:
- name: $DOCKER_IMAGE_NAME-linux-amd64
- docker:
- platform: linux/amd64
+ variables:
+ TARGET: linux-amd64
needs:
- job: codecov-test:linux:386
optional: true
diff --git a/.gitlab-ci.d/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index 83553dc..18d1862 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -20,7 +20,7 @@ variables:
LOAD_TARGET_ENV: source .gitlab-ci.d/01-docker/target-env/${TARGET}.env
# Enable/disable specific targets for code and platform coverage targets.
- ACTIVE_TARGET_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips64el|linux-mips|linux-mipsel|linux-ppc|linux-ppc64|linux-ppc64le|linux-riscv64|windows-386|windows-amd64/i'
+ ACTIVE_TARGET_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips|linux-mips64el|linux-mipsel|linux-ppc|linux-ppc64|linux-ppc64le|linux-riscv64|windows-686|windows-amd64/i'
workflow:
rules:
diff --git a/.gitlab-ci.d/platform-templates.yml b/.gitlab-ci.d/platform-templates.yml
index e441d9a..702ef77 100644
--- a/.gitlab-ci.d/platform-templates.yml
+++ b/.gitlab-ci.d/platform-templates.yml
@@ -11,18 +11,20 @@
# architectures, which don't have official Debian support, and don't increase
# the code coverage.
-.codecov:all:
- rules:
- - if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
+.target:all:
image:
name: $DOCKER_IMAGE_NAME-$TARGET
+ rules:
+ - if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
+ before_script:
+ - ${LOAD_TARGET_ENV}
# i386 is used for `mmx`, `sse2` and `ssse3` backend tests.
.codecov:linux:386:
- extends: .codecov:all
+ extends: .target:all
# Waiting for https://gitlab.com/gitlab-org/gitlab/-/issues/423553
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -32,9 +34,9 @@
# amd64 is used for general tests.
.codecov:linux:amd64:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -44,9 +46,9 @@
# ARMv5 is used for `arm-simd` test.
.codecov:linux:arm:v5:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -59,9 +61,9 @@
# ARMv7 is used for ARMv7 variant of `arm-neon`.
.codecov:linux:arm:v7:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -71,9 +73,9 @@
# ARM64v8 is used for `arm-neon`.
.codecov:linux:arm64:v8:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -83,9 +85,9 @@
# MIPS64EL used for `loongson-mmi`.
.codecov:linux:mips64el:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -96,9 +98,9 @@
# MIPS (32 bit, little endian) is used for `mips-dspr2`.
.codecov:linux:mipsel:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -110,9 +112,9 @@
# PPC64LE used for `vmx`.
.codecov:linux:ppc64le:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -122,9 +124,9 @@
# RISCV64 used for `rvv`.
.codecov:linux:riscv64:
- extends: .codecov:all
+ extends: .target:all
needs:
- - job: docker-codecov
+ - job: docker
optional: true
parallel:
matrix:
@@ -135,54 +137,64 @@
# Platform coverage targets (Linux).
-.pltcov:all:
- rules:
- - if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
-
-.pltcov:linux:
- extends: .pltcov:all
- needs:
- - job: docker-pltcov:linux
- optional: true
- image:
- name: $DOCKER_IMAGE_NAME-pltcov-linux
-
# MIPS (32 bit, big endian) used for `mips-dspr2`.
.pltcov:linux:mips:
- extends: .pltcov:linux
+ extends: .target:all
+ needs:
+ - job: docker
+ optional: true
+ parallel:
+ matrix:
+ - TARGET: linux-mips
variables:
TARGET: linux-mips
# PPC (32 bit, big endian) used for `vmx`.
.pltcov:linux:ppc:
- extends: .pltcov:linux
+ extends: .target:all
+ needs:
+ - job: docker
+ optional: true
+ parallel:
+ matrix:
+ - TARGET: linux-ppc
variables:
TARGET: linux-ppc
# PPC64 (64 bit, big endian) used for `vmx`.
.pltcov:linux:ppc64:
- extends: .pltcov:linux
+ extends: .target:all
+ needs:
+ - job: docker
+ optional: true
+ parallel:
+ matrix:
+ - TARGET: linux-ppc64
variables:
TARGET: linux-ppc64
# Platform coverage targets (Windows).
-.pltcov:windows:
- extends: .pltcov:all
+# Windows i386
+.pltcov:windows:686:
+ extends: .target:all
needs:
- - job: docker-pltcov:windows
+ - job: docker
optional: true
- image:
- name: $DOCKER_IMAGE_NAME-pltcov-windows
-
-# Windows i386
-.pltcov:windows:386:
- extends: .pltcov:windows
+ parallel:
+ matrix:
+ - TARGET: windows-686
variables:
- TARGET: windows-386
+ TARGET: windows-686
# Windows amd64
.pltcov:windows:amd64:
- extends: .pltcov:windows
+ extends: .target:all
+ needs:
+ - job: docker
+ optional: true
+ parallel:
+ matrix:
+ - TARGET: windows-amd64
variables:
TARGET: windows-amd64
diff --git a/.gitlab-ci.d/pltcov/meson-cross/windows-386.meson b/.gitlab-ci.d/pltcov/meson-cross/windows-686.meson
similarity index 100%
rename from .gitlab-ci.d/pltcov/meson-cross/windows-386.meson
rename to .gitlab-ci.d/pltcov/meson-cross/windows-686.meson
commit 028213b588c3dc01cbe2bee11d7991b2ba86bf5d
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Mon Aug 26 21:07:23 2024 +0200
ci: Unify target enable flag
It replaces CODE- and PLT- specific target enable variables. It is a
ground work for unification of codecov and pltcov flows.
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 866c708..20d1869 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -47,7 +47,7 @@ docker-codecov:
extends: .docker
parallel:
matrix:
- - PLATFORM:
+ - TARGET:
- linux-386
- linux-amd64
- linux-arm-v5
@@ -58,11 +58,11 @@ docker-codecov:
- linux-ppc64le
- linux-riscv64
rules:
- - if: $PLATFORM =~ $ACTIVE_CODE_PATTERN
+ - if: $TARGET =~ $ACTIVE_TARGET_PATTERN
script:
# Prepare environment.
- - ${LOAD_PLATFORM_ENV}
- - FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${PLATFORM}
+ - ${LOAD_TARGET_ENV}
+ - FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${TARGET}
# Build and push the image.
- buildah bud
@@ -93,16 +93,16 @@ docker-codecov:
docker-pltcov:linux:
extends: .docker-pltcov
rules:
- - if: "'linux-mips' =~ $ACTIVE_PLT_PATTERN"
- - if: "'linux-ppc' =~ $ACTIVE_PLT_PATTERN"
- - if: "'linux-ppc64' =~ $ACTIVE_PLT_PATTERN"
+ - if: "'linux-mips' =~ $ACTIVE_TARGET_PATTERN"
+ - if: "'linux-ppc' =~ $ACTIVE_TARGET_PATTERN"
+ - if: "'linux-ppc64' =~ $ACTIVE_TARGET_PATTERN"
variables:
TARGET: linux
docker-pltcov:windows:
extends: .docker-pltcov
rules:
- - if: "'windows-386' =~ $ACTIVE_PLT_PATTERN"
- - if: "'windows-amd64' =~ $ACTIVE_PLT_PATTERN"
+ - if: "'windows-386' =~ $ACTIVE_TARGET_PATTERN"
+ - if: "'windows-amd64' =~ $ACTIVE_TARGET_PATTERN"
variables:
TARGET: windows
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 56000ec..5aa7bc0 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -96,7 +96,7 @@ codecov-build:linux:riscv64:
extends:
- .build:all
variables:
- CROSS_FILE_NAME: ${PLATFORM}.meson
+ CROSS_FILE_NAME: ${TARGET}.meson
GROUP_MESON_ARGS: "--cross-file .gitlab-ci.d/pltcov/meson-cross/${CROSS_FILE_NAME}"
pltcov-build:linux:
@@ -105,7 +105,7 @@ pltcov-build:linux:
- .pltcov:linux
parallel:
matrix:
- - PLATFORM:
+ - TARGET:
- linux-mips
- linux-ppc
- linux-ppc64
@@ -116,6 +116,6 @@ pltcov-build:windows:
- .pltcov:windows
parallel:
matrix:
- - PLATFORM:
+ - TARGET:
- windows-386
- windows-amd64
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index ec0b124..99994c5 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -157,7 +157,7 @@ pltcov-test:linux:mips:
- job: pltcov-build:linux
parallel:
matrix:
- - PLATFORM: linux-mips
+ - TARGET: linux-mips
allow_failure: true # Some tests seem to fail.
retry: 0
@@ -169,7 +169,7 @@ pltcov-test:linux:ppc:
- job: pltcov-build:linux
parallel:
matrix:
- - PLATFORM: linux-ppc
+ - TARGET: linux-ppc
allow_failure: true # SIGILL for some tests
retry: 0
@@ -181,7 +181,7 @@ pltcov-test:linux:ppc64:
- job: pltcov-build:linux
parallel:
matrix:
- - PLATFORM: linux-ppc64
+ - TARGET: linux-ppc64
pltcov-test:windows:386:
extends:
@@ -191,7 +191,7 @@ pltcov-test:windows:386:
- job: pltcov-build:windows
parallel:
matrix:
- - PLATFORM: windows-386
+ - TARGET: windows-386
parallel:
matrix:
- PIXMAN_ENABLE: ["mmx"]
@@ -209,7 +209,7 @@ pltcov-test:windows:amd64:
- job: pltcov-build:windows
parallel:
matrix:
- - PLATFORM: windows-amd64
+ - TARGET: windows-amd64
parallel:
matrix:
- PIXMAN_DISABLE:
diff --git a/.gitlab-ci.d/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index d156563..83553dc 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -17,11 +17,10 @@ variables:
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
# Execute to load a target-specific environment.
- LOAD_PLATFORM_ENV: source .gitlab-ci.d/01-docker/target-env/${PLATFORM}.env
+ LOAD_TARGET_ENV: source .gitlab-ci.d/01-docker/target-env/${TARGET}.env
- # Enable/disable specific platforms for code coverage and platform coverage targets.
- ACTIVE_CODE_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips64el|linux-mipsel|linux-ppc64le|linux-riscv64/i'
- ACTIVE_PLT_PATTERN: '/linux-ppc|linux-ppc64|linux-mips|windows-386|windows-amd64/i'
+ # Enable/disable specific targets for code and platform coverage targets.
+ ACTIVE_TARGET_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips64el|linux-mips|linux-mipsel|linux-ppc|linux-ppc64|linux-ppc64le|linux-riscv64|windows-386|windows-amd64/i'
workflow:
rules:
diff --git a/.gitlab-ci.d/platform-templates.yml b/.gitlab-ci.d/platform-templates.yml
index 0428f2f..e441d9a 100644
--- a/.gitlab-ci.d/platform-templates.yml
+++ b/.gitlab-ci.d/platform-templates.yml
@@ -13,9 +13,9 @@
.codecov:all:
rules:
- - if: "$PLATFORM =~ $ACTIVE_CODE_PATTERN"
+ - if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
image:
- name: $DOCKER_IMAGE_NAME-$PLATFORM
+ name: $DOCKER_IMAGE_NAME-$TARGET
# i386 is used for `mmx`, `sse2` and `ssse3` backend tests.
.codecov:linux:386:
@@ -26,9 +26,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-386
+ - TARGET: linux-386
variables:
- PLATFORM: linux-386
+ TARGET: linux-386
# amd64 is used for general tests.
.codecov:linux:amd64:
@@ -38,9 +38,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-amd64
+ - TARGET: linux-amd64
variables:
- PLATFORM: linux-amd64
+ TARGET: linux-amd64
# ARMv5 is used for `arm-simd` test.
.codecov:linux:arm:v5:
@@ -50,9 +50,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-arm-v5
+ - TARGET: linux-arm-v5
variables:
- PLATFORM: linux-arm-v5
+ TARGET: linux-arm-v5
# It is in fact an ARMv6 CPU, which is required for SIMD to get discovered
# on runtime.
QEMU_CPU: arm1136
@@ -65,9 +65,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-arm-v7
+ - TARGET: linux-arm-v7
variables:
- PLATFORM: linux-arm-v7
+ TARGET: linux-arm-v7
# ARM64v8 is used for `arm-neon`.
.codecov:linux:arm64:v8:
@@ -77,9 +77,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-arm64-v8
+ - TARGET: linux-arm64-v8
variables:
- PLATFORM: linux-arm64-v8
+ TARGET: linux-arm64-v8
# MIPS64EL used for `loongson-mmi`.
.codecov:linux:mips64el:
@@ -89,9 +89,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-mips64el
+ - TARGET: linux-mips64el
variables:
- PLATFORM: linux-mips64el
+ TARGET: linux-mips64el
QEMU_CPU: "Loongson-3A4000"
# MIPS (32 bit, little endian) is used for `mips-dspr2`.
@@ -102,9 +102,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-mipsel
+ - TARGET: linux-mipsel
variables:
- PLATFORM: linux-mipsel
+ TARGET: linux-mipsel
# As written in the code comment, it's the only supported CPU.
QEMU_CPU: 74Kf
@@ -116,9 +116,9 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-ppc64le
+ - TARGET: linux-ppc64le
variables:
- PLATFORM: linux-ppc64le
+ TARGET: linux-ppc64le
# RISCV64 used for `rvv`.
.codecov:linux:riscv64:
@@ -128,16 +128,16 @@
optional: true
parallel:
matrix:
- - PLATFORM: linux-riscv64
+ - TARGET: linux-riscv64
variables:
- PLATFORM: linux-riscv64
+ TARGET: linux-riscv64
QEMU_CPU: rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
# Platform coverage targets (Linux).
.pltcov:all:
rules:
- - if: "$PLATFORM =~ $ACTIVE_PLT_PATTERN"
+ - if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
.pltcov:linux:
extends: .pltcov:all
@@ -151,19 +151,19 @@
.pltcov:linux:mips:
extends: .pltcov:linux
variables:
- PLATFORM: linux-mips
+ TARGET: linux-mips
# PPC (32 bit, big endian) used for `vmx`.
.pltcov:linux:ppc:
extends: .pltcov:linux
variables:
- PLATFORM: linux-ppc
+ TARGET: linux-ppc
# PPC64 (64 bit, big endian) used for `vmx`.
.pltcov:linux:ppc64:
extends: .pltcov:linux
variables:
- PLATFORM: linux-ppc64
+ TARGET: linux-ppc64
# Platform coverage targets (Windows).
@@ -179,10 +179,10 @@
.pltcov:windows:386:
extends: .pltcov:windows
variables:
- PLATFORM: windows-386
+ TARGET: windows-386
# Windows amd64
.pltcov:windows:amd64:
extends: .pltcov:windows
variables:
- PLATFORM: windows-amd64
+ TARGET: windows-amd64
commit 05b5ecd93492e855dfc684a17b1598dc3c1ab150
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Mon Aug 26 15:10:38 2024 +0200
ci: Use env files instead of awk script
It makes per-targe environment declaration more extensible, as it's
possible now to set custom env variables only for the selected target
for the entire pipeline workflow in a centralized way.
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 08314ab..866c708 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -32,9 +32,6 @@
BUILDAH_ISOLATION: chroot
CACHE_IMAGE: ${CI_REGISTRY_IMAGE}/cache
CACHE_ARGS: --cache-from ${CACHE_IMAGE} --cache-to ${CACHE_IMAGE}
-
- PLT_LOOKUP: .gitlab-ci.d/01-docker/platform-lookup.awk
- PLT_TBL: .gitlab-ci.d/01-docker/platform.lut
before_script:
# Login to the target registry.
- echo "${CI_REGISTRY_PASSWORD}" |
@@ -64,8 +61,7 @@ docker-codecov:
- if: $PLATFORM =~ $ACTIVE_CODE_PATTERN
script:
# Prepare environment.
- - BASE_IMAGE=$(${PLT_LOOKUP} ${PLATFORM} 3 ${PLT_TBL})
- - BASE_IMAGE_TAG=$(${PLT_LOOKUP} ${PLATFORM} 4 ${PLT_TBL})
+ - ${LOAD_PLATFORM_ENV}
- FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${PLATFORM}
# Build and push the image.
@@ -73,7 +69,7 @@ docker-codecov:
--tag ${FULL_IMAGE_NAME}
--layers
${CACHE_ARGS}
- --platform=$(${PLT_LOOKUP} ${PLATFORM} 2 ${PLT_TBL})
+ --platform=${DOCKER_PLATFORM}
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
-f Dockerfile.codecov .gitlab-ci.d/01-docker/
diff --git a/.gitlab-ci.d/01-docker/platform-lookup.awk b/.gitlab-ci.d/01-docker/platform-lookup.awk
deleted file mode 100755
index 6d679f0..0000000
--- a/.gitlab-ci.d/01-docker/platform-lookup.awk
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/awk -f
-BEGIN { key = ARGV[1]; field = ARGV[2]; ARGV[1]=ARGV[2]="" }
-$1 == key { print $field }
diff --git a/.gitlab-ci.d/01-docker/platform.lut b/.gitlab-ci.d/01-docker/platform.lut
deleted file mode 100644
index cc2620a..0000000
--- a/.gitlab-ci.d/01-docker/platform.lut
+++ /dev/null
@@ -1,9 +0,0 @@
-linux-386 linux/386 docker.io/i386/debian bookworm-slim
-linux-amd64 linux/amd64 docker.io/amd64/debian bookworm-slim
-linux-arm-v5 linux/arm/v5 docker.io/arm32v5/debian bookworm-slim
-linux-arm-v7 linux/arm/v7 docker.io/arm32v7/debian bookworm-slim
-linux-arm64-v8 linux/arm64/v8 docker.io/arm64v8/debian bookworm-slim
-linux-mips64el linux/mips64el docker.io/mips64le/debian bookworm-slim
-linux-mipsel linux/mipsel docker.io/serenitycode/debian-debootstrap mipsel-bookworm-slim # There is no official mipsel image, thus custom one from debootstrap is used.
-linux-ppc64le linux/ppc64le docker.io/ppc64le/debian bookworm-slim
-linux-riscv64 linux/riscv64 docker.io/riscv64/debian sid-slim # There is no bookworm image available for riscv64.
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-386.env b/.gitlab-ci.d/01-docker/target-env/linux-386.env
new file mode 100644
index 0000000..87cc913
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-386.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/386
+BASE_IMAGE=docker.io/i386/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-amd64.env b/.gitlab-ci.d/01-docker/target-env/linux-amd64.env
new file mode 100644
index 0000000..4798622
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-amd64.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/amd64
+BASE_IMAGE=docker.io/amd64/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-arm-v5.env b/.gitlab-ci.d/01-docker/target-env/linux-arm-v5.env
new file mode 100644
index 0000000..7b1b51b
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-arm-v5.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/arm/v5
+BASE_IMAGE=docker.io/arm32v5/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-arm-v7.env b/.gitlab-ci.d/01-docker/target-env/linux-arm-v7.env
new file mode 100644
index 0000000..6b528c1
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-arm-v7.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/arm/v7
+BASE_IMAGE=docker.io/arm32v7/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-arm64-v8.env b/.gitlab-ci.d/01-docker/target-env/linux-arm64-v8.env
new file mode 100644
index 0000000..1c6173b
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-arm64-v8.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/arm64/v8
+BASE_IMAGE=docker.io/arm64v8/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-mips64el.env b/.gitlab-ci.d/01-docker/target-env/linux-mips64el.env
new file mode 100644
index 0000000..98d0372
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-mips64el.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/mips64el
+BASE_IMAGE=docker.io/mips64le/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-mipsel.env b/.gitlab-ci.d/01-docker/target-env/linux-mipsel.env
new file mode 100644
index 0000000..bb3a842
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-mipsel.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/mipsel
+BASE_IMAGE=docker.io/serenitycode/debian-debootstrap
+BASE_IMAGE_TAG=mipsel-bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-ppc64le.env b/.gitlab-ci.d/01-docker/target-env/linux-ppc64le.env
new file mode 100644
index 0000000..1aeff88
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-ppc64le.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/ppc64le
+BASE_IMAGE=docker.io/ppc64le/debian
+BASE_IMAGE_TAG=bookworm-slim
diff --git a/.gitlab-ci.d/01-docker/target-env/linux-riscv64.env b/.gitlab-ci.d/01-docker/target-env/linux-riscv64.env
new file mode 100644
index 0000000..0a91971
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/target-env/linux-riscv64.env
@@ -0,0 +1,3 @@
+DOCKER_PLATFORM=linux/riscv64
+BASE_IMAGE=docker.io/riscv64/debian
+BASE_IMAGE_TAG=sid-slim
diff --git a/.gitlab-ci.d/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index bc3bebb..d156563 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -16,6 +16,9 @@ variables:
DOCKER_TAG: latest
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
+ # Execute to load a target-specific environment.
+ LOAD_PLATFORM_ENV: source .gitlab-ci.d/01-docker/target-env/${PLATFORM}.env
+
# Enable/disable specific platforms for code coverage and platform coverage targets.
ACTIVE_CODE_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips64el|linux-mipsel|linux-ppc64le|linux-riscv64/i'
ACTIVE_PLT_PATTERN: '/linux-ppc|linux-ppc64|linux-mips|windows-386|windows-amd64/i'
More information about the xorg-commit
mailing list