Merge branch 'wip/hadess/update-docker-packages' into 'master'

ci: Update Docker packages

See merge request GNOME/glib!1281
This commit is contained in:
Philip Withnall 2020-02-07 14:02:58 +00:00
commit bf6c018475
5 changed files with 39 additions and 30 deletions

View File

@ -10,7 +10,7 @@ cache:
- _ccache/
variables:
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v7"
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v8"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v6"
ANDROID_IMAGE: "registry.gitlab.gnome.org/gnome/glib/android-ndk:v2"
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v2"
@ -126,9 +126,6 @@ installed-tests:
image: $FEDORA_IMAGE
stage: build
script:
# FIXME Install xdg-desktop-portal build deps before compiling glib,
# so it doesn't overwrite our own glib build
- sudo dnf install -y autoconf automake gettext-devel libtool diffutils fontconfig-devel json-glib-devel geoclue2-devel pipewire-devel fuse-devel make
# dtrace is disabled because it breaks the static-link.py test
- meson ${MESON_COMMON_OPTIONS}
--werror
@ -151,17 +148,12 @@ installed-tests:
# FIXME install newer gobject-introspection
# with GMemoryMonitor support, see:
# https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/193
- sudo dnf install -y meson flex bison python3-devel
- git clone --single-branch https://gitlab.gnome.org/GNOME/gobject-introspection.git
- cd gobject-introspection
- /usr/bin/meson _build --prefix=/usr --libdir=/usr/lib64
- ninja -C _build
- sudo ninja -C _build install
- cd ..
# FIXME: Add update until stable https://bodhi.fedoraproject.org/updates/FEDORA-2019-e830287661
- sudo dnf upgrade -y --enablerepo=updates-testing --advisory=FEDORA-2019-e830287661
# FIXME: Add update until stable https://bodhi.fedoraproject.org/updates/FEDORA-2019-161b129d4d
- sudo dnf upgrade -y --enablerepo=updates-testing --advisory=FEDORA-2019-161b129d4d
# Work-around https://gitlab.gnome.org/GNOME/gnome-desktop-testing/merge_requests/2
- mkdir -p _build/installed-tests-report/logs/
- GLIB_TEST_COMPILATION=1 gnome-desktop-testing-runner

View File

@ -1,6 +1,7 @@
FROM fedora:30
RUN dnf -y install \
RUN dnf -y update \
&& dnf -y install \
bindfs \
clang \
clang-analyzer \
@ -31,7 +32,7 @@ RUN dnf -y install \
glibc-langpack-pl \
glibc-langpack-ru \
glibc-langpack-tr \
gnome-desktop-testing \
"gnome-desktop-testing >= 2018.1" \
gtk-doc \
itstool \
lcov \
@ -43,7 +44,7 @@ RUN dnf -y install \
ncurses-compat-libs \
ninja-build \
pcre-devel \
python3-dbusmock \
"python3-dbusmock >= 0.18.3-2" \
python3-pygments \
python3-wheel \
shared-mime-info \
@ -54,6 +55,22 @@ RUN dnf -y install \
xdg-desktop-portal \
xz \
zlib-devel \
&& dnf -y install \
meson \
flex \
bison \
python3-devel \
autoconf \
automake \
gettext-devel \
libtool \
diffutils \
fontconfig-devel \
json-glib-devel \
geoclue2-devel \
pipewire-devel \
fuse-devel \
make \
&& dnf clean all
RUN pip3 install meson==0.52.1

View File

@ -15,6 +15,16 @@ read_arg() {
fi
}
SUDO_CMD="sudo"
if `docker -v | grep -q podman` ; then
# Using podman
SUDO_CMD=""
# Docker is actually implemented by podman, and its OCI output
# is incompatible with some of the dockerd instances on GitLab
# CI runners.
export BUILDAH_FORMAT=docker
fi
set -e
build=0
@ -88,18 +98,8 @@ fi
TAG="registry.gitlab.gnome.org/gnome/glib/${base}:${base_version}"
if [ $build == 1 ]; then
if docker --help |& grep -q podman; then
# Docker is actually implemented by podman, and its OCI output
# is incompatible with some of the dockerd instances on GitLab
# CI runners.
format="--format docker"
else
format=""
fi
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
sudo docker build \
${format} \
$SUDO_CMD docker build \
--build-arg HOST_USER_ID="$UID" \
--tag "${TAG}" \
--file "${base}.Dockerfile" .
@ -110,16 +110,16 @@ if [ $push == 1 ]; then
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
if [ $no_login == 0 ]; then
sudo docker login registry.gitlab.gnome.org
$SUDO_CMD docker login registry.gitlab.gnome.org
fi
sudo docker push $TAG
$SUDO_CMD docker push $TAG
exit $?
fi
if [ $run == 1 ]; then
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
sudo docker run \
$SUDO_CMD docker run \
--rm \
--volume "$(pwd)/..:/home/user/app" \
--workdir "/home/user/app" \

View File

@ -75,7 +75,7 @@ class TestLowMemoryMonitor(dbusmock.DBusTestCase):
self.dbusmock.EmitWarning(100)
# Wait 2 seconds or until warning
timeout = 2
while timeout > 0 or self.last_warning != 100:
while timeout > 0 and self.last_warning != 100:
time.sleep(0.5)
timeout -= 0.5
self.main_context.iteration(False)
@ -84,7 +84,7 @@ class TestLowMemoryMonitor(dbusmock.DBusTestCase):
self.dbusmock.EmitWarning(255)
# Wait 2 seconds or until warning
timeout = 2
while timeout > 0 or self.last_warning != 255:
while timeout > 0 and self.last_warning != 255:
time.sleep(0.5)
timeout -= 0.5
self.main_context.iteration(False)

View File

@ -91,7 +91,7 @@ class TestLowMemoryMonitorPortal(dbusmock.DBusTestCase):
self.dbusmock.EmitWarning(100)
# Wait 2 seconds or until warning
timeout = 2
while timeout > 0 or self.last_warning != 100:
while timeout > 0 and self.last_warning != 100:
time.sleep(0.5)
timeout -= 0.5
self.main_context.iteration(False)
@ -100,7 +100,7 @@ class TestLowMemoryMonitorPortal(dbusmock.DBusTestCase):
self.dbusmock.EmitWarning(255)
# Wait 2 seconds or until warning
timeout = 2
while timeout > 0 or self.last_warning != 255:
while timeout > 0 and self.last_warning != 255:
time.sleep(0.5)
timeout -= 0.5
self.main_context.iteration(False)