mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-01 02:16:14 +01:00
Merge branch 'wip/smcv/i386-ci' into 'main'
Add a CI job for Debian stable i386 (32-bit) See merge request GNOME/glib!4358
This commit is contained in:
commit
e53659d546
@ -14,6 +14,7 @@ variables:
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v39.5"
|
||||
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7"
|
||||
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v23"
|
||||
DEBIAN_I386_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable-i386:v2"
|
||||
ALPINE_IMAGE: "registry.gitlab.gnome.org/gnome/glib/alpine:v7"
|
||||
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v39.5"
|
||||
GOBJECT_INTROSPECTION_TAG: "1.80.1"
|
||||
@ -245,12 +246,10 @@ fedora-x86_64:
|
||||
- "_coverage"
|
||||
- "_reference"
|
||||
|
||||
debian-stable-x86_64:
|
||||
.build-debian:
|
||||
extends:
|
||||
- .build-linux
|
||||
- .only-default
|
||||
- .with-git
|
||||
image: $DEBIAN_IMAGE
|
||||
stage: build
|
||||
needs: []
|
||||
before_script:
|
||||
@ -281,6 +280,21 @@ debian-stable-x86_64:
|
||||
- "_build/glib/glibconfig.h"
|
||||
- "_build/meson-logs"
|
||||
|
||||
debian-stable-x86_64:
|
||||
extends:
|
||||
- .build-debian
|
||||
# We don't need to run this job too often, because the combination of
|
||||
# fedora-x86_64 and debian-stable-i386 should cover more or less
|
||||
# everything that this job does
|
||||
- .only-schedules-or-manual
|
||||
image: $DEBIAN_IMAGE
|
||||
|
||||
debian-stable-i386:
|
||||
extends:
|
||||
- .build-debian
|
||||
- .only-default
|
||||
image: $DEBIAN_I386_IMAGE
|
||||
|
||||
hurd-i386:
|
||||
extends:
|
||||
- .only-schedules-or-manual
|
||||
|
@ -1,4 +1,5 @@
|
||||
FROM debian:bookworm
|
||||
ARG ARCHITECTURE_PREFIX=
|
||||
FROM ${ARCHITECTURE_PREFIX}debian:bookworm
|
||||
|
||||
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
bindfs \
|
||||
@ -73,6 +74,24 @@ ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
||||
|
||||
RUN pip3 install --break-system-packages meson==1.4.2
|
||||
|
||||
# ninja-build 1.11.1 didn't build with large file support on 32-bit,
|
||||
# breaking the i386 image when used with overlayfs.
|
||||
# The fix from upstream 1.12.0 was backported to Debian in 1.11.1-2,
|
||||
# but too late for Debian 12. https://bugs.debian.org/1041897
|
||||
RUN if [ "$(dpkg --print-architecture)" = i386 ]; then \
|
||||
apt-get install --no-install-recommends -qq -y \
|
||||
debhelper \
|
||||
re2c \
|
||||
&& mkdir /run/build \
|
||||
&& git clone --depth=1 -b debian/1.11.1-2 https://salsa.debian.org/debian/ninja-build.git /run/build/ninja-build \
|
||||
&& cd /run/build/ninja-build \
|
||||
&& git checkout e39b5f01229311916302300449d951735e4a3e3f \
|
||||
&& dpkg-buildpackage -B -Pnodoc \
|
||||
&& dpkg -i ../*.deb \
|
||||
&& cd / \
|
||||
&& rm -fr /run/build; \
|
||||
fi
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
||||
|
@ -67,6 +67,11 @@ if [ $print_help == 1 ]; then
|
||||
echo " list - List available images"
|
||||
echo " help - This help message"
|
||||
echo ""
|
||||
echo "Options"
|
||||
echo ""
|
||||
echo " --base-version NUM - Image is version NUM"
|
||||
echo " --no-login - Don't log in to registry"
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -80,6 +85,8 @@ if [ $list == 1 ]; then
|
||||
|
||||
echo -e " \\e[1;39m$basename\\e[0m"
|
||||
done
|
||||
# Special cases that don't have their own Dockerfile
|
||||
echo -e " \\e[1;39mdebian-stable-i386\\e[0m"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -89,8 +96,25 @@ if [ -z "${base}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$base.Dockerfile" ]; then
|
||||
echo -e "\\e[1;31mERROR\\e[0m: Dockerfile for '$base' not found"
|
||||
case "$base" in
|
||||
(debian-stable-i386)
|
||||
dockerfile=debian-stable
|
||||
arch=386
|
||||
if [ "$DOCKER_CMD" = "podman" ]; then
|
||||
arch_prefix=docker.io/i386/
|
||||
else
|
||||
arch_prefix=i386/
|
||||
fi
|
||||
;;
|
||||
(*)
|
||||
dockerfile="$base"
|
||||
arch=""
|
||||
arch_prefix=""
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -f "$dockerfile.Dockerfile" ]; then
|
||||
echo -e "\\e[1;31mERROR\\e[0m: Dockerfile for '$dockerfile' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -108,8 +132,10 @@ if [ $build == 1 ]; then
|
||||
--build-arg HOST_USER_ID="$UID" \
|
||||
--build-arg COVERITY_SCAN_PROJECT_NAME="${COVERITY_SCAN_PROJECT_NAME}" \
|
||||
--build-arg COVERITY_SCAN_TOKEN="${COVERITY_SCAN_TOKEN}" \
|
||||
${arch_prefix+--build-arg ARCHITECTURE_PREFIX="${arch_prefix}"} \
|
||||
${arch+--arch="$arch"} \
|
||||
--tag "${TAG}" \
|
||||
--file "${base}.Dockerfile" .
|
||||
--file "${dockerfile}.Dockerfile" .
|
||||
exit $?
|
||||
fi
|
||||
|
||||
@ -127,6 +153,7 @@ fi
|
||||
if [ $run == 1 ]; then
|
||||
echo -e "\\e[1;32mRUNNING\\e[0m: ${base} as ${TAG}"
|
||||
$DOCKER_CMD run \
|
||||
${arch+--arch="$arch"} \
|
||||
--rm \
|
||||
--volume "$(pwd)/..:/home/user/app" \
|
||||
--workdir "/home/user/app" \
|
||||
|
Loading…
Reference in New Issue
Block a user