gitlab: convert CI to use meson instead of autotools

A new 'codestyle' job is added for syntax-check, since that is not run
as part of the 'dist' target.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-01-13 11:18:35 +00:00
parent ef2a679d69
commit f03e009eb7
14 changed files with 108 additions and 66 deletions

View File

@ -35,9 +35,18 @@ stages:
before_script:
- *script_variables
script:
- ./autogen.sh --prefix="$VROOT"
- $MAKE dist
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta virt-viewer*.tar.gz ; fi
- meson build
- if test "$DIST" != "skip";
then
ninja -C build dist;
else
ninja -C build;
ninja -C build test;
fi
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
rpmbuild --nodeps -ta build/meson-dist/virt-viewer-*.tar.xz;
fi
.git_native_build_job_template: &git_native_build_job_definition
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
@ -62,10 +71,18 @@ stages:
- meson build --prefix="$VROOT" --libdir="$LIBDIR"
- $NINJA -C build install
- popd
- ./autogen.sh --prefix="$VROOT"
- $MAKE syntax-check
- $MAKE dist
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta virt-viewer*.tar.gz ; fi
- meson build
- if test "$DIST" != "skip";
then
ninja -C build dist;
else
ninja -C build;
ninja -C build test;
fi
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
rpmbuild --nodeps -ta build/meson-dist/virt-viewer-*.tar.xz;
fi
# Default cross build jobs that are always run
.git_cross_build_default_job_template: &git_cross_build_default_job_definition
@ -95,8 +112,8 @@ stages:
- meson build $MESON_OPTS --prefix="$VROOT" --libdir="$LIBDIR" -Dintrospection=disabled
- $NINJA -C build install
- popd
- ./autogen.sh $CONFIGURE_OPTS --prefix="$VROOT"
- $MAKE install
- meson build $MESON_OPTS
- $NINJA -C build
# Check that all commits are signed-off for the DCO.
# Skip on "virt-viewer" namespace, since we only need to run
@ -177,10 +194,24 @@ mingw64-fedora-rawhide-container:
NAME: fedora-rawhide-cross-mingw64
codestyle:
stage: builds
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
needs:
- x86-centos-8-container
before_script:
- *script_variables
script:
- meson build || (cat build/meson-logs/meson-log.txt && exit 1)
- meson test -C build --suite syntax-check --no-rebuild || (cat build/meson-logs/testlog.txt && exit 1)
x86-centos-7-dist-build:
<<: *dist_native_build_job_definition
variables:
NAME: centos-7
# git is too old for -C args
DIST: skip
RPM: skip
x86-centos-8-git-build:
<<: *git_native_build_job_definition

View File

@ -2,20 +2,17 @@
#
# $ lcitool dockerfile centos-7 libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM registry.centos.org/centos:7
RUN yum update -y && \
echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \
yum install -y epel-release && \
yum install -y \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
gcc \
gettext-devel \
git \
glib2-devel \
glibc-common \
@ -29,7 +26,11 @@ RUN yum update -y && \
libxml2 \
libxml2-devel \
make \
ninja-build \
pkgconfig \
python3-pip \
python3-setuptools \
python3-wheel \
rest-devel \
rpm-build \
spice-gtk3-devel \
@ -41,6 +42,10 @@ RUN yum update -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
RUN pip3 install \
meson==0.54.0
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja-build"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile centos-8 libvirt+minimal,libvirt-glib,gtk-vnc,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM docker.io/library/centos:8
RUN dnf update -y && \
@ -11,8 +11,6 @@ RUN dnf update -y && \
dnf install -y centos-release-advanced-virtualization && \
dnf install -y epel-release && \
dnf install -y \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
@ -20,7 +18,6 @@ RUN dnf update -y && \
gcc \
gdk-pixbuf2-devel \
gettext \
gettext-devel \
git \
glib2-devel \
glibc-devel \

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile centos-stream libvirt+minimal,libvirt-glib,gtk-vnc,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM docker.io/library/centos:8
RUN dnf update -y && \
@ -12,8 +12,6 @@ RUN dnf update -y && \
dnf install -y centos-release-advanced-virtualization && \
dnf install -y epel-release && \
dnf install -y \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
@ -21,7 +19,6 @@ RUN dnf update -y && \
gcc \
gdk-pixbuf2-devel \
gettext \
gettext-devel \
git \
glib2-devel \
glibc-devel \

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile debian-10 libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM docker.io/library/debian:10-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
@ -10,9 +10,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
autoconf \
automake \
autopoint \
bash-completion \
ca-certificates \
ccache \
@ -34,7 +31,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-utils \
locales \
make \
pkgconf && \
ninja-build \
pkgconf \
python3-pip \
python3-setuptools \
python3-wheel && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
@ -44,6 +45,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
RUN pip3 install \
meson==0.54.0
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile debian-sid libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM docker.io/library/debian:sid-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
@ -10,9 +10,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
autoconf \
automake \
autopoint \
bash-completion \
ca-certificates \
ccache \
@ -34,6 +31,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-utils \
locales \
make \
meson \
ninja-build \
pkgconf && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
@ -46,4 +45,5 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile fedora-32 libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM registry.fedoraproject.org/fedora:32
RUN dnf install -y nosync && \
@ -17,13 +17,10 @@ exec "$@"' > /usr/bin/nosync && \
chmod +x /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
gcc \
gettext-devel \
git \
glib2-devel \
glibc-langpack-en \
@ -37,6 +34,8 @@ exec "$@"' > /usr/bin/nosync && \
libxml2 \
libxml2-devel \
make \
meson \
ninja-build \
pkgconfig \
rest-devel \
rpm-build \
@ -51,4 +50,5 @@ exec "$@"' > /usr/bin/nosync && \
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile fedora-33 libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM registry.fedoraproject.org/fedora:33
RUN dnf install -y nosync && \
@ -17,13 +17,10 @@ exec "$@"' > /usr/bin/nosync && \
chmod +x /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
gcc \
gettext-devel \
git \
glib2-devel \
glibc-langpack-en \
@ -37,6 +34,8 @@ exec "$@"' > /usr/bin/nosync && \
libxml2 \
libxml2-devel \
make \
meson \
ninja-build \
pkgconfig \
rest-devel \
rpm-build \
@ -51,4 +50,5 @@ exec "$@"' > /usr/bin/nosync && \
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile --cross mingw32 fedora-rawhide libvirt,libvirt-glib,gtk-vnc,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM registry.fedoraproject.org/fedora:rawhide
RUN dnf install -y nosync && \
@ -19,8 +19,6 @@ exec "$@"' > /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
augeas \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
@ -30,7 +28,6 @@ exec "$@"' > /usr/bin/nosync && \
dwarves \
ebtables \
firewalld-filesystem \
gettext-devel \
git \
glibc-langpack-en \
gtk-doc \
@ -102,5 +99,4 @@ ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV ABI "i686-w64-mingw32"
ENV CONFIGURE_OPTS "--host=i686-w64-mingw32"
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw32.meson"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile --cross mingw64 fedora-rawhide libvirt,libvirt-glib,gtk-vnc,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM registry.fedoraproject.org/fedora:rawhide
RUN dnf install -y nosync && \
@ -19,8 +19,6 @@ exec "$@"' > /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
augeas \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
@ -30,7 +28,6 @@ exec "$@"' > /usr/bin/nosync && \
dwarves \
ebtables \
firewalld-filesystem \
gettext-devel \
git \
glibc-langpack-en \
gtk-doc \
@ -102,5 +99,4 @@ ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV ABI "x86_64-w64-mingw32"
ENV CONFIGURE_OPTS "--host=x86_64-w64-mingw32"
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile fedora-rawhide libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM registry.fedoraproject.org/fedora:rawhide
RUN dnf install -y nosync && \
@ -18,13 +18,10 @@ exec "$@"' > /usr/bin/nosync && \
nosync dnf update -y --nogpgcheck fedora-gpg-keys && \
nosync dnf update -y && \
nosync dnf install -y \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
gcc \
gettext-devel \
git \
glib2-devel \
glibc-langpack-en \
@ -38,6 +35,8 @@ exec "$@"' > /usr/bin/nosync && \
libxml2 \
libxml2-devel \
make \
meson \
ninja-build \
pkgconfig \
rest-devel \
rpm-build \
@ -52,4 +51,5 @@ exec "$@"' > /usr/bin/nosync && \
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,18 +2,15 @@
#
# $ lcitool dockerfile opensuse-152 libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM registry.opensuse.org/opensuse/leap:15.2
RUN zypper update -y && \
zypper install -y \
autoconf \
automake \
bash-completion \
ca-certificates \
ccache \
gcc \
gettext-devel \
git \
glib2-devel \
glibc-locale \
@ -28,7 +25,11 @@ RUN zypper update -y && \
libxml2 \
libxml2-devel \
make \
ninja \
pkgconfig \
python3-pip \
python3-setuptools \
python3-wheel \
rpm-build \
spice-gtk-devel \
vte-devel && \
@ -38,6 +39,10 @@ RUN zypper update -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
RUN pip3 install \
meson==0.54.0
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile ubuntu-1804 libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM docker.io/library/ubuntu:18.04
RUN export DEBIAN_FRONTEND=noninteractive && \
@ -10,9 +10,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
autoconf \
automake \
autopoint \
bash-completion \
ca-certificates \
ccache \
@ -33,7 +30,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-utils \
locales \
make \
pkgconf && \
ninja-build \
pkgconf \
python3-pip \
python3-setuptools \
python3-wheel && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
@ -43,6 +44,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
RUN pip3 install \
meson==0.54.0
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

View File

@ -2,7 +2,7 @@
#
# $ lcitool dockerfile ubuntu-2004 libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/860993e19c005848fde8087941acdbd7ffdcf295
# https://gitlab.com/libvirt/libvirt-ci/-/commit/318adcadcf442daba1883f5046ad1970b65e5ca0
FROM docker.io/library/ubuntu:20.04
RUN export DEBIAN_FRONTEND=noninteractive && \
@ -10,9 +10,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
autoconf \
automake \
autopoint \
bash-completion \
ca-certificates \
ccache \
@ -33,7 +30,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-utils \
locales \
make \
pkgconf && \
ninja-build \
pkgconf \
python3-pip \
python3-setuptools \
python3-wheel && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
@ -43,6 +44,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
RUN pip3 install \
meson==0.54.0
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"