pixman: Branch 'master' - 3 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 21 03:19:12 UTC 2024
.gitlab-ci.d/01-docker.yml | 67 +++++-
.gitlab-ci.d/01-docker/Dockerfile.codecov | 4
.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux | 20 +
.gitlab-ci.d/01-docker/Dockerfile.pltcov-windows | 32 +++
.gitlab-ci.d/01-docker/platform.lut | 18 -
.gitlab-ci.d/02-build.yml | 115 +++++++----
.gitlab-ci.d/03-test.yml | 151 +++++++++++---
.gitlab-ci.d/04-summary.yml | 19 +
.gitlab-ci.d/pixman-project.yml | 13 -
.gitlab-ci.d/platform-templates.yml | 202 +++++++++++---------
.gitlab-ci.d/pltcov/meson-cross/linux-mips.meson | 13 +
.gitlab-ci.d/pltcov/meson-cross/linux-ppc.meson | 13 +
.gitlab-ci.d/pltcov/meson-cross/linux-ppc64.meson | 13 +
.gitlab-ci.d/pltcov/meson-cross/windows-386.meson | 16 +
.gitlab-ci.d/pltcov/meson-cross/windows-amd64.meson | 16 +
15 files changed, 519 insertions(+), 193 deletions(-)
New commits:
commit 4047a553d9c880fd31dfcccfc13a2ecd6704fea9
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Wed Aug 14 17:24:55 2024 +0200
ci: Add platform coverage targets
Platform coverage checks if the code builds and executes properly for
architectures that are not officially supported by Debian. They don't
contribute to general code coverage report but provide a valuable
insight if all supported platforms are working correctly.
Signed-off-by: Marek Pikuła <m.pikula at partner.samsung.com>
diff --git a/.gitlab-ci.d/02-build.yml b/.gitlab-ci.d/02-build.yml
index 46f89f9..56000ec 100644
--- a/.gitlab-ci.d/02-build.yml
+++ b/.gitlab-ci.d/02-build.yml
@@ -11,68 +11,111 @@ variables:
# Used in test stage as well.
BUILD_DIR: build
-.build:linux:
+# Applicable to all build targets.
+
+.build:all:
stage: build
variables:
- MESON_ARGS: ""
- EXTRA_C_ARGS: ""
+ # 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}
- -Db_coverage=true
- -Dc_args="-fprofile-update=atomic -DCI_HAS_ALL_MIPS_CPU_FEATURES ${EXTRA_C_ARGS}"
- ${MESON_ARGS}
+ -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}/
-build:linux:386:
+# 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:
- - .build:linux
- - .platform:linux:386
+ - .codecov-build:all
+ - .codecov:linux:386
-build:linux:amd64:
+codecov-build:linux:amd64:
extends:
- - .build:linux
- - .platform:linux:amd64
+ - .codecov-build:all
+ - .codecov:linux:amd64
-build:linux:arm:v5:
+codecov-build:linux:arm:v5:
extends:
- - .build:linux
- - .platform:linux:arm:v5
+ - .codecov-build:all
+ - .codecov:linux:arm:v5
variables:
- MESON_ARGS: -Dopenmp=disabled
+ JOB_MESON_ARGS: -Dopenmp=disabled
-build:linux:arm:v7:
+codecov-build:linux:arm:v7:
extends:
- - .build:linux
- - .platform:linux:arm:v7
+ - .codecov-build:all
+ - .codecov:linux:arm:v7
-build:linux:arm64:v8:
+codecov-build:linux:arm64:v8:
extends:
- - .build:linux
- - .platform:linux:arm64:v8
+ - .codecov-build:all
+ - .codecov:linux:arm64:v8
-build:linux:mips64el:
+codecov-build:linux:mips64el:
extends:
- - .build:linux
- - .platform:linux:mips64el
+ - .codecov-build:all
+ - .codecov:linux:mips64el
-build:linux:mipsel:
+codecov-build:linux:mipsel:
extends:
- - .build:linux
- - .platform:linux:mipsel
+ - .codecov-build:all
+ - .codecov:linux:mipsel
variables:
- MESON_ARGS: -Dopenmp=disabled
+ JOB_MESON_ARGS: -Dopenmp=disabled
+
+codecov-build:linux:ppc64le:
+ extends:
+ - .codecov-build:all
+ - .codecov:linux:ppc64le
-build:linux:ppc64le:
+codecov-build:linux:riscv64:
extends:
- - .build:linux
- - .platform:linux:ppc64le
+ - .codecov-build:all
+ - .codecov:linux:riscv64
+ variables:
+ JOB_C_ARGS: "-march=rv64gcv"
+
+# Platform coverage target build.
-build:linux:riscv64:
+.pltcov-build:all:
extends:
- - .build:linux
- - .platform:linux:riscv64
+ - .build:all
variables:
- EXTRA_C_ARGS: "-march=rv64gcv"
+ CROSS_FILE_NAME: ${PLATFORM}.meson
+ GROUP_MESON_ARGS: "--cross-file .gitlab-ci.d/pltcov/meson-cross/${CROSS_FILE_NAME}"
+
+pltcov-build:linux:
+ extends:
+ - .pltcov-build:all
+ - .pltcov:linux
+ parallel:
+ matrix:
+ - PLATFORM:
+ - linux-mips
+ - linux-ppc
+ - linux-ppc64
+
+pltcov-build:windows:
+ extends:
+ - .pltcov-build:all
+ - .pltcov:windows
+ parallel:
+ matrix:
+ - PLATFORM:
+ - windows-386
+ - windows-amd64
diff --git a/.gitlab-ci.d/03-test.yml b/.gitlab-ci.d/03-test.yml
index ba4ce54..ec0b124 100644
--- a/.gitlab-ci.d/03-test.yml
+++ b/.gitlab-ci.d/03-test.yml
@@ -23,16 +23,21 @@ variables:
COVERAGE_OUT_DIR: ${BUILD_DIR}/coverage
COVERAGE_HTML_OUT_DIR: ${COVERAGE_OUT_DIR}/html
-.test:linux:
+.test:all:
stage: test
variables:
TEST_TIMEOUT_MULTIPLIER: 20
TEST_NAME: "" # Allow to specify a set of tests to run with run variables.
script:
- - mkdir -p ${COVERAGE_OUT_DIR} ${COVERAGE_HTML_OUT_DIR}
- 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
@@ -43,12 +48,12 @@ variables:
reports:
junit: ${BUILD_DIR}/meson-logs/testlog.junit.xml
-test:linux:386:
+codecov-test:linux:386:
extends:
- - .test:linux
- - .platform:linux:386
+ - .codecov-test:linux
+ - .codecov:linux:386
needs:
- - build:linux:386
+ - codecov-build:linux:386
parallel:
matrix:
- PIXMAN_ENABLE: ["mmx"]
@@ -58,12 +63,12 @@ test:linux:386:
- PIXMAN_ENABLE: ["ssse3"]
PIXMAN_DISABLE: ["mmx sse2"]
-test:linux:amd64:
+codecov-test:linux:amd64:
extends:
- - .test:linux
- - .platform:linux:amd64
+ - .codecov-test:linux
+ - .codecov:linux:amd64
needs:
- - build:linux:amd64
+ - codecov-build:linux:amd64
parallel:
matrix:
- PIXMAN_DISABLE:
@@ -71,12 +76,12 @@ test:linux:amd64:
- "fast"
- "wholeops"
-test:linux:arm:v5:
+codecov-test:linux:arm:v5:
extends:
- - .test:linux
- - .platform:linux:arm:v5
+ - .codecov-test:linux
+ - .codecov:linux:arm:v5
needs:
- - build:linux:arm:v5
+ - codecov-build:linux:arm:v5
timeout: 3h
variables:
TEST_TIMEOUT_MULTIPLIER: 40
@@ -84,55 +89,55 @@ test:linux:arm:v5:
MESON_TESTTHREADS: 1
QCOVR_FLAGS: --gcov-ignore-parse-errors
-test:linux:arm:v7:
+codecov-test:linux:arm:v7:
extends:
- - .test:linux
- - .platform:linux:arm:v7
+ - .codecov-test:linux
+ - .codecov:linux:arm:v7
needs:
- - build:linux:arm:v7
+ - codecov-build:linux:arm:v7
-test:linux:arm64:v8:
+codecov-test:linux:arm64:v8:
extends:
- - .test:linux
- - .platform:linux:arm64:v8
+ - .codecov-test:linux
+ - .codecov:linux:arm64:v8
needs:
- - build:linux:arm64:v8
+ - codecov-build:linux:arm64:v8
-test:linux:mips64el:
+codecov-test:linux:mips64el:
extends:
- - .test:linux
- - .platform:linux:mips64el
+ - .codecov-test:linux
+ - .codecov:linux:mips64el
needs:
- - build:linux:mips64el
+ - 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"
-test:linux:mipsel:
+codecov-test:linux:mipsel:
extends:
- - .test:linux
- - .platform:linux:mipsel
+ - .codecov-test:linux
+ - .codecov:linux:mipsel
needs:
- - build:linux:mipsel
+ - codecov-build:linux:mipsel
timeout: 2h
variables:
MESON_TESTTHREADS: 1
QCOVR_FLAGS: --gcov-ignore-parse-errors
-test:linux:ppc64le:
+codecov-test:linux:ppc64le:
extends:
- - .test:linux
- - .platform:linux:ppc64le
+ - .codecov-test:linux
+ - .codecov:linux:ppc64le
needs:
- - build:linux:ppc64le
+ - codecov-build:linux:ppc64le
-test:linux:riscv64:
+codecov-test:linux:riscv64:
extends:
- - .test:linux
- - .platform:linux:riscv64
+ - .codecov-test:linux
+ - .codecov:linux:riscv64
needs:
- - build:linux:riscv64
+ - codecov-build:linux:riscv64
parallel:
matrix:
# Test correctness for different VLENs.
@@ -141,3 +146,73 @@ test:linux:riscv64:
- 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:
+ - job: pltcov-build:linux
+ parallel:
+ matrix:
+ - PLATFORM: linux-mips
+ allow_failure: true # Some tests seem to fail.
+ retry: 0
+
+pltcov-test:linux:ppc:
+ extends:
+ - .test:all
+ - .pltcov:linux:ppc
+ needs:
+ - job: pltcov-build:linux
+ parallel:
+ matrix:
+ - PLATFORM: linux-ppc
+ allow_failure: true # SIGILL for some tests
+ retry: 0
+
+pltcov-test:linux:ppc64:
+ extends:
+ - .test:all
+ - .pltcov:linux:ppc64
+ needs:
+ - job: pltcov-build:linux
+ parallel:
+ matrix:
+ - PLATFORM: linux-ppc64
+
+pltcov-test:windows:386:
+ extends:
+ - .test:all
+ - .pltcov:windows:386
+ needs:
+ - job: pltcov-build:windows
+ parallel:
+ matrix:
+ - PLATFORM: windows-386
+ 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:
+ - job: pltcov-build:windows
+ parallel:
+ matrix:
+ - PLATFORM: windows-amd64
+ parallel:
+ matrix:
+ - PIXMAN_DISABLE:
+ - ""
+ - "fast"
+ - "wholeops"
diff --git a/.gitlab-ci.d/04-summary.yml b/.gitlab-ci.d/04-summary.yml
index 3c88314..530ac36 100644
--- a/.gitlab-ci.d/04-summary.yml
+++ b/.gitlab-ci.d/04-summary.yml
@@ -10,6 +10,25 @@ summary:
name: $DOCKER_IMAGE_NAME-linux-amd64
docker:
platform: linux/amd64
+ needs:
+ - job: codecov-test:linux:386
+ optional: true
+ - job: codecov-test:linux:amd64
+ optional: true
+ - job: codecov-test:linux:arm:v5
+ optional: true
+ - job: codecov-test:linux:arm:v7
+ optional: true
+ - job: codecov-test:linux:arm64:v8
+ optional: true
+ - job: codecov-test:linux:mips64el
+ optional: true
+ - job: codecov-test:linux:mipsel
+ optional: true
+ - job: codecov-test:linux:ppc64le
+ optional: true
+ - job: codecov-test:linux:riscv64
+ optional: true
script:
- echo "Input coverage reports:" && ls ${COVERAGE_OUT_DIR}/coverage-*.json
- |
diff --git a/.gitlab-ci.d/platform-templates.yml b/.gitlab-ci.d/platform-templates.yml
index 69b6f6a..0428f2f 100644
--- a/.gitlab-ci.d/platform-templates.yml
+++ b/.gitlab-ci.d/platform-templates.yml
@@ -1,19 +1,25 @@
# Platform templates
#
# Used to provide base for multi-arch runs. Each platform can be globally
-# disabled with `PLATFORM_LINUX_...` variable. Some targets have pre-defined
-# `QEMU_CPU`, which is either the only or the default QEMU configuration for a
-# given platform.
+# 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.
-.platform:all:
+.codecov:all:
rules:
- if: "$PLATFORM =~ $ACTIVE_CODE_PATTERN"
image:
name: $DOCKER_IMAGE_NAME-$PLATFORM
# i386 is used for `mmx`, `sse2` and `ssse3` backend tests.
-.platform:linux:386:
- extends: .platform:all
+.codecov:linux:386:
+ extends: .codecov:all
# Waiting for https://gitlab.com/gitlab-org/gitlab/-/issues/423553
needs:
- job: docker-codecov
@@ -25,8 +31,8 @@
PLATFORM: linux-386
# amd64 is used for general tests.
-.platform:linux:amd64:
- extends: .platform:all
+.codecov:linux:amd64:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -37,8 +43,8 @@
PLATFORM: linux-amd64
# ARMv5 is used for `arm-simd` test.
-.platform:linux:arm:v5:
- extends: .platform:all
+.codecov:linux:arm:v5:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -52,8 +58,8 @@
QEMU_CPU: arm1136
# ARMv7 is used for ARMv7 variant of `arm-neon`.
-.platform:linux:arm:v7:
- extends: .platform:all
+.codecov:linux:arm:v7:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -64,8 +70,8 @@
PLATFORM: linux-arm-v7
# ARM64v8 is used for `arm-neon`.
-.platform:linux:arm64:v8:
- extends: .platform:all
+.codecov:linux:arm64:v8:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -76,8 +82,8 @@
PLATFORM: linux-arm64-v8
# MIPS64EL used for `loongson-mmi`.
-.platform:linux:mips64el:
- extends: .platform:all
+.codecov:linux:mips64el:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -89,8 +95,8 @@
QEMU_CPU: "Loongson-3A4000"
# MIPS (32 bit, little endian) is used for `mips-dspr2`.
-.platform:linux:mipsel:
- extends: .platform:all
+.codecov:linux:mipsel:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -103,8 +109,8 @@
QEMU_CPU: 74Kf
# PPC64LE used for `vmx`.
-.platform:linux:ppc64le:
- extends: .platform:all
+.codecov:linux:ppc64le:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -115,8 +121,8 @@
PLATFORM: linux-ppc64le
# RISCV64 used for `rvv`.
-.platform:linux:riscv64:
- extends: .platform:all
+.codecov:linux:riscv64:
+ extends: .codecov:all
needs:
- job: docker-codecov
optional: true
@@ -126,3 +132,57 @@
variables:
PLATFORM: 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"
+
+.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
+ variables:
+ PLATFORM: linux-mips
+
+# PPC (32 bit, big endian) used for `vmx`.
+.pltcov:linux:ppc:
+ extends: .pltcov:linux
+ variables:
+ PLATFORM: linux-ppc
+
+# PPC64 (64 bit, big endian) used for `vmx`.
+.pltcov:linux:ppc64:
+ extends: .pltcov:linux
+ variables:
+ PLATFORM: linux-ppc64
+
+# Platform coverage targets (Windows).
+
+.pltcov:windows:
+ extends: .pltcov:all
+ needs:
+ - job: docker-pltcov:windows
+ optional: true
+ image:
+ name: $DOCKER_IMAGE_NAME-pltcov-windows
+
+# Windows i386
+.pltcov:windows:386:
+ extends: .pltcov:windows
+ variables:
+ PLATFORM: windows-386
+
+# Windows amd64
+.pltcov:windows:amd64:
+ extends: .pltcov:windows
+ variables:
+ PLATFORM: windows-amd64
diff --git a/.gitlab-ci.d/pltcov/meson-cross/linux-mips.meson b/.gitlab-ci.d/pltcov/meson-cross/linux-mips.meson
new file mode 100644
index 0000000..4b1adcf
--- /dev/null
+++ b/.gitlab-ci.d/pltcov/meson-cross/linux-mips.meson
@@ -0,0 +1,13 @@
+[binaries]
+c = 'mips-linux-gnu-gcc'
+cpp = 'mips-linux-gnu-cpp'
+ar = 'mips-linux-gnu-ar'
+strip = 'mips-linux-gnu-strip'
+pkgconfig = 'pkg-config'
+exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/', '-cpu', '74Kf']
+
+[host_machine]
+system = 'linux'
+cpu_family = 'mips32'
+cpu = 'mips32'
+endian = 'big'
diff --git a/.gitlab-ci.d/pltcov/meson-cross/linux-ppc.meson b/.gitlab-ci.d/pltcov/meson-cross/linux-ppc.meson
new file mode 100644
index 0000000..e486eb2
--- /dev/null
+++ b/.gitlab-ci.d/pltcov/meson-cross/linux-ppc.meson
@@ -0,0 +1,13 @@
+[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']
+
+[host_machine]
+system = 'linux'
+cpu_family = 'ppc'
+cpu = 'ppc'
+endian = 'big'
diff --git a/.gitlab-ci.d/pltcov/meson-cross/linux-ppc64.meson b/.gitlab-ci.d/pltcov/meson-cross/linux-ppc64.meson
new file mode 100644
index 0000000..a07683c
--- /dev/null
+++ b/.gitlab-ci.d/pltcov/meson-cross/linux-ppc64.meson
@@ -0,0 +1,13 @@
+[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]
+system = 'linux'
+cpu_family = 'ppc64'
+cpu = 'ppc64'
+endian = 'big'
diff --git a/.gitlab-ci.d/pltcov/meson-cross/windows-386.meson b/.gitlab-ci.d/pltcov/meson-cross/windows-386.meson
new file mode 100644
index 0000000..3de8afa
--- /dev/null
+++ b/.gitlab-ci.d/pltcov/meson-cross/windows-386.meson
@@ -0,0 +1,16 @@
+[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]
+c_link_args = ['-static-libgcc']
+
+[host_machine]
+system = 'windows'
+cpu_family = 'x86'
+cpu = 'i686'
+endian = 'little'
diff --git a/.gitlab-ci.d/pltcov/meson-cross/windows-amd64.meson b/.gitlab-ci.d/pltcov/meson-cross/windows-amd64.meson
new file mode 100644
index 0000000..a7b901f
--- /dev/null
+++ b/.gitlab-ci.d/pltcov/meson-cross/windows-amd64.meson
@@ -0,0 +1,16 @@
+[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]
+c_link_args = ['-static-libgcc']
+
+[host_machine]
+system = 'windows'
+cpu_family = 'x86_64'
+cpu = 'x86_64'
+endian = 'little'
commit cbf9d7e0d3efe763135c0bdbd0582d96720228e0
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Wed Aug 14 15:22:14 2024 +0200
ci: Add architecture coverage Docker images
Add images providing an environment for architecture coverage tests.
There is a separate build for Linux and Windows, as the Windows image is
really large compared to Linux one. It decreases the execution time of
both targets, as the images needed to be pulled by runners are smaller.
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 11d68f2..21c049a 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -46,7 +46,7 @@
buildah login -u "${DOCKERHUB_USER}" --password-stdin docker.io ||
echo "Failed to login to Docker Hub."
-docker-pixman:
+docker-codecov:
extends: .docker
parallel:
matrix:
@@ -76,5 +76,37 @@ docker-pixman:
--platform=$(${PLT_LOOKUP} ${PLATFORM} 2 ${PLT_TBL})
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
- -f Dockerfile .gitlab-ci.d/01-docker/
+ -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/
+ - buildah push ${FULL_IMAGE_NAME}
+
+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"
+ variables:
+ TARGET: linux
+
+docker-pltcov:windows:
+ extends: .docker-pltcov
+ rules:
+ - if: "'windows-386' =~ $ACTIVE_PLT_PATTERN"
+ - if: "'windows-amd64' =~ $ACTIVE_PLT_PATTERN"
+ variables:
+ TARGET: windows
diff --git a/.gitlab-ci.d/01-docker/Dockerfile b/.gitlab-ci.d/01-docker/Dockerfile.codecov
similarity index 91%
rename from .gitlab-ci.d/01-docker/Dockerfile
rename to .gitlab-ci.d/01-docker/Dockerfile.codecov
index 4593750..a2f9be5 100644
--- a/.gitlab-ci.d/01-docker/Dockerfile
+++ b/.gitlab-ci.d/01-docker/Dockerfile.codecov
@@ -1,9 +1,9 @@
ARG BASE_IMAGE=docker.io/debian
# Debian Sid is requried for official riscv64 support.
-ARG BASE_IMAGE_TAG=sid-slim
+ARG BASE_IMAGE_TAG=bookworm-slim
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
-LABEL org.opencontainers.image.title="Pixman build environment" \
+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
diff --git a/.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux b/.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux
new file mode 100644
index 0000000..2491712
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/Dockerfile.pltcov-linux
@@ -0,0 +1,20 @@
+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
new file mode 100644
index 0000000..c75591e
--- /dev/null
+++ b/.gitlab-ci.d/01-docker/Dockerfile.pltcov-windows
@@ -0,0 +1,32 @@
+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/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index ad7cf41..f094a93 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -16,8 +16,9 @@ variables:
DOCKER_TAG: latest
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
- # Enable/disable specific platforms for code coverage targets.
+ # 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'
workflow:
rules:
diff --git a/.gitlab-ci.d/platform-templates.yml b/.gitlab-ci.d/platform-templates.yml
index 6732dbb..69b6f6a 100644
--- a/.gitlab-ci.d/platform-templates.yml
+++ b/.gitlab-ci.d/platform-templates.yml
@@ -16,7 +16,7 @@
extends: .platform:all
# Waiting for https://gitlab.com/gitlab-org/gitlab/-/issues/423553
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -28,7 +28,7 @@
.platform:linux:amd64:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -40,7 +40,7 @@
.platform:linux:arm:v5:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -55,7 +55,7 @@
.platform:linux:arm:v7:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -67,7 +67,7 @@
.platform:linux:arm64:v8:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -79,7 +79,7 @@
.platform:linux:mips64el:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -92,7 +92,7 @@
.platform:linux:mipsel:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -106,7 +106,7 @@
.platform:linux:ppc64le:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
@@ -118,7 +118,7 @@
.platform:linux:riscv64:
extends: .platform:all
needs:
- - job: docker-pixman
+ - job: docker-codecov
optional: true
parallel:
matrix:
commit c35e47bd8832a103a10bb222a2b29aa2ca83ee8b
Author: Marek Pikuła <m.pikula at partner.samsung.com>
Date: Wed Aug 14 18:18:43 2024 +0200
ci: Increase granularity of Docker build selection
Now, it's possible to selectively disable Docker image builds. Before,
it was only possible to disable build/test jobs for a given
architecture.
diff --git a/.gitlab-ci.d/01-docker.yml b/.gitlab-ci.d/01-docker.yml
index a0b67f9..11d68f2 100644
--- a/.gitlab-ci.d/01-docker.yml
+++ b/.gitlab-ci.d/01-docker.yml
@@ -4,7 +4,7 @@
# later easily used with properly configured Docker (which uses binfmt and QEMU
# underneath).
-docker-pixman:
+.docker:
stage: docker
image: quay.io/buildah/stable
rules:
@@ -45,30 +45,35 @@ docker-pixman:
- echo "${DOCKERHUB_PASSWORD}" |
buildah login -u "${DOCKERHUB_USER}" --password-stdin docker.io ||
echo "Failed to login to Docker Hub."
+
+docker-pixman:
+ extends: .docker
parallel:
matrix:
- PLATFORM:
- - linux/386
- - linux/amd64
- - linux/arm/v5
- - linux/arm/v7
- - linux/arm64/v8
- - linux/mips64el
- - linux/mipsel
- - linux/ppc64le
- - linux/riscv64
+ - linux-386
+ - linux-amd64
+ - linux-arm-v5
+ - linux-arm-v7
+ - linux-arm64-v8
+ - linux-mips64el
+ - linux-mipsel
+ - linux-ppc64le
+ - linux-riscv64
+ rules:
+ - if: $PLATFORM =~ $ACTIVE_CODE_PATTERN
script:
# Prepare environment.
- - BASE_IMAGE=$(${PLT_LOOKUP} ${PLATFORM} 2 ${PLT_TBL})
- - BASE_IMAGE_TAG=$(${PLT_LOOKUP} ${PLATFORM} 3 ${PLT_TBL})
- - FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-$(echo ${PLATFORM} | sed "s|/|-|g")
+ - BASE_IMAGE=$(${PLT_LOOKUP} ${PLATFORM} 3 ${PLT_TBL})
+ - BASE_IMAGE_TAG=$(${PLT_LOOKUP} ${PLATFORM} 4 ${PLT_TBL})
+ - FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${PLATFORM}
# Build and push the image.
- buildah bud
--tag ${FULL_IMAGE_NAME}
--layers
${CACHE_ARGS}
- --platform=${PLATFORM}
+ --platform=$(${PLT_LOOKUP} ${PLATFORM} 2 ${PLT_TBL})
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
-f Dockerfile .gitlab-ci.d/01-docker/
diff --git a/.gitlab-ci.d/01-docker/platform.lut b/.gitlab-ci.d/01-docker/platform.lut
index d55819c..cc2620a 100644
--- a/.gitlab-ci.d/01-docker/platform.lut
+++ b/.gitlab-ci.d/01-docker/platform.lut
@@ -1,9 +1,9 @@
-linux/386 docker.io/i386/debian bookworm-slim
-linux/amd64 docker.io/amd64/debian bookworm-slim
-linux/arm/v5 docker.io/arm32v5/debian bookworm-slim
-linux/arm/v7 docker.io/arm32v7/debian bookworm-slim
-linux/arm64/v8 docker.io/arm64v8/debian bookworm-slim
-linux/mips64el docker.io/mips64le/debian bookworm-slim
-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 docker.io/ppc64le/debian bookworm-slim
-linux/riscv64 docker.io/riscv64/debian sid-slim # There is no bookworm image available for riscv64.
+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/pixman-project.yml b/.gitlab-ci.d/pixman-project.yml
index 06115f0..ad7cf41 100644
--- a/.gitlab-ci.d/pixman-project.yml
+++ b/.gitlab-ci.d/pixman-project.yml
@@ -16,16 +16,8 @@ variables:
DOCKER_TAG: latest
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
- # Enable/disable specific platforms.
- PLATFORM_LINUX_386: true
- PLATFORM_LINUX_AMD64: true
- PLATFORM_LINUX_ARM_V5: true
- PLATFORM_LINUX_ARM_V7: true
- PLATFORM_LINUX_ARM64_V8: true
- PLATFORM_LINUX_MIPS64EL: true
- PLATFORM_LINUX_MIPSEL: true
- PLATFORM_LINUX_PPC64LE: true
- PLATFORM_LINUX_RISCV64: true
+ # Enable/disable specific platforms for code 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'
workflow:
rules:
diff --git a/.gitlab-ci.d/platform-templates.yml b/.gitlab-ci.d/platform-templates.yml
index 908b6fd..6732dbb 100644
--- a/.gitlab-ci.d/platform-templates.yml
+++ b/.gitlab-ci.d/platform-templates.yml
@@ -5,148 +5,124 @@
# `QEMU_CPU`, which is either the only or the default QEMU configuration for a
# given platform.
+.platform:all:
+ rules:
+ - if: "$PLATFORM =~ $ACTIVE_CODE_PATTERN"
+ image:
+ name: $DOCKER_IMAGE_NAME-$PLATFORM
+
# i386 is used for `mmx`, `sse2` and `ssse3` backend tests.
.platform:linux:386:
+ extends: .platform:all
+ # Waiting for https://gitlab.com/gitlab-org/gitlab/-/issues/423553
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/386
- rules:
- - if: $PLATFORM_LINUX_386 == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-386
- docker:
- platform: linux/386
+ - PLATFORM: linux-386
+ variables:
+ PLATFORM: linux-386
# amd64 is used for general tests.
.platform:linux:amd64:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/amd64
- rules:
- - if: $PLATFORM_LINUX_AMD64 == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-amd64
- docker:
- platform: linux/amd64
+ - PLATFORM: linux-amd64
+ variables:
+ PLATFORM: linux-amd64
# ARMv5 is used for `arm-simd` test.
.platform:linux:arm:v5:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/arm/v5
- rules:
- - if: $PLATFORM_LINUX_ARM_V5 == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-arm-v5
- docker:
- platform: linux/arm/v5
+ - PLATFORM: linux-arm-v5
variables:
+ PLATFORM: 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`.
.platform:linux:arm:v7:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/arm/v7
- rules:
- - if: $PLATFORM_LINUX_ARM_V7 == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-arm-v7
- docker:
- platform: linux/arm/v7
+ - PLATFORM: linux-arm-v7
+ variables:
+ PLATFORM: linux-arm-v7
# ARM64v8 is used for `arm-neon`.
.platform:linux:arm64:v8:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/arm64/v8
- rules:
- - if: $PLATFORM_LINUX_ARM64_V8 == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-arm64-v8
- docker:
- platform: linux/arm64/v8
+ - PLATFORM: linux-arm64-v8
+ variables:
+ PLATFORM: linux-arm64-v8
# MIPS64EL used for `loongson-mmi`.
.platform:linux:mips64el:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/mips64el
- rules:
- - if: $PLATFORM_LINUX_MIPS64EL == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-mips64el
- docker:
- platform: linux/mips64el
+ - PLATFORM: linux-mips64el
variables:
+ PLATFORM: linux-mips64el
QEMU_CPU: "Loongson-3A4000"
# MIPS (32 bit, little endian) is used for `mips-dspr2`.
.platform:linux:mipsel:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/mipsel
- rules:
- - if: $PLATFORM_LINUX_MIPSEL == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-mipsel
- docker:
- platform: linux/mipsel
+ - PLATFORM: linux-mipsel
variables:
+ PLATFORM: linux-mipsel
# As written in the code comment, it's the only supported CPU.
QEMU_CPU: 74Kf
# PPC64LE used for `vmx`.
.platform:linux:ppc64le:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/ppc64le
- rules:
- - if: $PLATFORM_LINUX_PPC64LE == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-ppc64le
- docker:
- platform: linux/ppc64le
+ - PLATFORM: linux-ppc64le
+ variables:
+ PLATFORM: linux-ppc64le
# RISCV64 used for `rvv`.
.platform:linux:riscv64:
+ extends: .platform:all
needs:
- job: docker-pixman
optional: true
parallel:
matrix:
- - PLATFORM: linux/riscv64
- rules:
- - if: $PLATFORM_LINUX_RISCV64 == "true"
- image:
- name: $DOCKER_IMAGE_NAME-linux-riscv64
- docker:
- platform: linux/riscv64
+ - PLATFORM: linux-riscv64
variables:
+ PLATFORM: linux-riscv64
QEMU_CPU: rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
More information about the xorg-commit
mailing list