Commit 34a23b5d authored by Philip Withnall's avatar Philip Withnall

ci: Cache subproject files in the CI images

This avoids them being re-downloaded on every CI run, which saves time
and bandwidth, and avoids the occasional spurious CI failure if they
can’t be downloaded because of network connectivity problems.

This requires bumping the Meson dependency on the Docker images to
0.50.0 for `meson subprojects download` and the fix in
https://github.com/mesonbuild/meson/commit/47b9c1a564756ac48a55da9a7c4d91787399c645.
The dependency of gnome-software outside the CI environment is unchanged.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent 95c8c042
Pipeline #194696 failed with stage
in 1 minute and 15 seconds
......@@ -8,10 +8,15 @@ cache:
variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 2
G_MESSAGES_DEBUG: all
MESON_COMMON_OPTIONS: "--buildtype debug --prefix /usr"
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --prefix /usr"
.build:
before_script:
- cp -r $HOME/subprojects/* subprojects/
fedora-x86_64:
image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v1
extends: .build
image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v2
stage: build
except:
- tags
......@@ -36,7 +41,8 @@ fedora-x86_64:
- "_build/${CI_JOB_NAME}-report.xml"
debian-stable-x86_64:
image: registry.gitlab.gnome.org/gnome/gnome-software/debian-stable:v1
extends: .build
image: registry.gitlab.gnome.org/gnome/gnome-software/debian-stable:v2
stage: build
except:
- tags
......
#!/bin/bash
set -e
git clone https://gitlab.gnome.org/GNOME/gnome-software.git
meson subprojects download --sourcedir gnome-software
rm gnome-software/subprojects/*.wrap
mv gnome-software/subprojects/ .
rm -rf gnome-software
......@@ -49,10 +49,16 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
xz-utils \
&& rm -rf /usr/share/doc/* /usr/share/man/*
RUN pip3 install meson==0.47.0
RUN pip3 install meson==0.50.0
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
USER user
WORKDIR /home/user
COPY cache-subprojects.sh .
RUN ./cache-subprojects.sh
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
......@@ -54,10 +54,16 @@ RUN dnf -y install \
zlib-devel \
&& dnf clean all
RUN pip3 install meson==0.47.0
RUN pip3 install meson==0.50.0
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
USER user
WORKDIR /home/user
COPY cache-subprojects.sh .
RUN ./cache-subprojects.sh
ENV LANG C.UTF-8
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment