gitlab: add coverage of mingw builds

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-06-24 16:39:33 +01:00
parent a0f4d1490a
commit 82a0612cc8
4 changed files with 285 additions and 0 deletions

View File

@ -70,6 +70,41 @@ stages:
- $MAKE dist
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta virt-viewer*.tar.gz ; fi
# Default cross build jobs that are always run
.git_cross_build_default_job_template: &git_cross_build_default_job_definition
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
stage: builds
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
before_script:
- *script_variables
- export PATH=/usr/$ABI/sys-root/mingw/bin:$PATH
script:
- pushd "$PWD"
- mkdir -p "$SCRATCH_DIR"
- cd "$SCRATCH_DIR"
- git clone --depth 1 https://gitlab.com/libvirt/libvirt.git
- git clone --depth 1 https://gitlab.com/libvirt/libvirt-glib.git
- git clone --depth 1 https://gitlab.gnome.org/GNOME/gtk-vnc.git
- cd libvirt
- mkdir build
- cd build
- ../autogen.sh $CONFIGURE_OPTS --prefix="$VROOT" --libdir="$VROOT/lib" --without-libvirtd
- $MAKE install
- cd ../../libvirt-glib
- mkdir build
- cd build
- ../autogen.sh $CONFIGURE_OPTS --prefix="$VROOT" --libdir="$VROOT/lib"
- $MAKE install
- cd ../../gtk-vnc
- git submodule update --init
- meson build $MESON_OPTS --prefix="$VROOT" --libdir="$VROOT/lib" -Dintrospection=false -Dwith-vala=false
- $NINJA -C build install
- popd
- ./autogen.sh $CONFIGURE_OPTS --prefix="$VROOT"
- $MAKE install
# Check that all commits are signed-off for the DCO.
# Skip on "virt-viewer" namespace, since we only need to run
@ -144,6 +179,16 @@ x86-ubuntu-2004-container:
variables:
NAME: ubuntu-2004
mingw32-fedora-rawhide-container:
<<: *container_job_definition
variables:
NAME: fedora-rawhide-cross-mingw32
mingw64-fedora-rawhide-container:
<<: *container_job_definition
variables:
NAME: fedora-rawhide-cross-mingw64
x86-centos-7-dist-build:
<<: *dist_native_build_job_definition
@ -207,3 +252,25 @@ x86-ubuntu-2004-dist-build:
<<: *dist_native_build_job_definition
variables:
NAME: ubuntu-2004
mingw32-fedora-rawhide-git-build:
<<: *git_cross_build_default_job_definition
variables:
NAME: fedora-rawhide-cross-mingw32
artifacts:
name: 'x86-msi'
when: on_success
expire_in: 30 days
paths:
- data/virt-viewer-x86*.msi.pot
mingw64-fedora-rawhide-git-build:
<<: *git_cross_build_default_job_definition
variables:
NAME: fedora-rawhide-cross-mingw64
artifacts:
name: 'x64-msi'
when: on_success
expire_in: 30 days
paths:
- data/virt-viewer-x64*.msi.pot

View File

@ -0,0 +1,105 @@
FROM fedora:rawhide
RUN dnf update -y --nogpgcheck fedora-gpg-keys && \
dnf update -y && \
dnf install -y \
augeas \
autoconf \
automake \
bash \
bash-completion \
ca-certificates \
ccache \
chrony \
cppi \
dnsmasq \
dwarves \
ebtables \
gcc \
gdb \
gettext-devel \
git \
glibc-langpack-en \
gtk-doc \
icoutils \
intltool \
iproute \
iproute-tc \
iscsi-initiator-utils \
kmod \
libtool \
libwsman-devel \
libxml2 \
libxslt \
lsof \
lvm2 \
make \
meson \
net-tools \
nfs-utils \
ninja-build \
numad \
parted \
patch \
perl \
perl-App-cpanminus \
polkit \
python3 \
python3-docutils \
python3-flake8 \
python3-pip \
python3-setuptools \
python3-wheel \
qemu-img \
radvd \
rpcgen \
rpm-build \
screen \
scrub \
sheepdog \
strace \
sudo \
vala \
vim \
zfs-fuse && \
dnf autoremove -y && \
dnf clean all -y && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-$(basename /usr/bin/gcc)
RUN dnf install -y \
mingw32-curl \
mingw32-dbus \
mingw32-dlfcn \
mingw32-gcc \
mingw32-gdk-pixbuf \
mingw32-gettext \
mingw32-glib2 \
mingw32-gnutls \
mingw32-gstreamer1-plugins-bad-free \
mingw32-gstreamer1-plugins-good \
mingw32-gtk3 \
mingw32-headers \
mingw32-libgcrypt \
mingw32-libgovirt \
mingw32-libssh2 \
mingw32-libxml2 \
mingw32-pkg-config \
mingw32-portablexdr \
mingw32-readline \
mingw32-rest \
mingw32-spice-gtk3 && \
dnf clean all -y
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
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

@ -0,0 +1,105 @@
FROM fedora:rawhide
RUN dnf update -y --nogpgcheck fedora-gpg-keys && \
dnf update -y && \
dnf install -y \
augeas \
autoconf \
automake \
bash \
bash-completion \
ca-certificates \
ccache \
chrony \
cppi \
dnsmasq \
dwarves \
ebtables \
gcc \
gdb \
gettext-devel \
git \
glibc-langpack-en \
gtk-doc \
icoutils \
intltool \
iproute \
iproute-tc \
iscsi-initiator-utils \
kmod \
libtool \
libwsman-devel \
libxml2 \
libxslt \
lsof \
lvm2 \
make \
meson \
net-tools \
nfs-utils \
ninja-build \
numad \
parted \
patch \
perl \
perl-App-cpanminus \
polkit \
python3 \
python3-docutils \
python3-flake8 \
python3-pip \
python3-setuptools \
python3-wheel \
qemu-img \
radvd \
rpcgen \
rpm-build \
screen \
scrub \
sheepdog \
strace \
sudo \
vala \
vim \
zfs-fuse && \
dnf autoremove -y && \
dnf clean all -y && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-$(basename /usr/bin/gcc)
RUN dnf install -y \
mingw64-curl \
mingw64-dbus \
mingw64-dlfcn \
mingw64-gcc \
mingw64-gdk-pixbuf \
mingw64-gettext \
mingw64-glib2 \
mingw64-gnutls \
mingw64-gstreamer1-plugins-bad-free \
mingw64-gstreamer1-plugins-good \
mingw64-gtk3 \
mingw64-headers \
mingw64-libgcrypt \
mingw64-libgovirt \
mingw64-libssh2 \
mingw64-libxml2 \
mingw64-pkg-config \
mingw64-portablexdr \
mingw64-readline \
mingw64-rest \
mingw64-spice-gtk3 && \
dnf clean all -y
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
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

@ -18,6 +18,14 @@ HOSTS=$($LCITOOL hosts | grep -v freebsd | sed -e 's/libvirt-//')
for host in $HOSTS
do
if test "$host" = "fedora-rawhide"
then
for cross in mingw32 mingw64
do
$LCITOOL dockerfile libvirt-$host libvirt,libvirt-glib,gtk-vnc,virt-viewer --cross $cross >$host-cross-$cross.Dockerfile
done
fi
if test "$host" = "centos-8" || test "$host" = "centos-stream"
then
$LCITOOL dockerfile libvirt-$host libvirt+minimal,libvirt-glib,gtk-vnc,virt-viewer > $host.Dockerfile