Skip to content

Commit

Permalink
meson: update .gitlab-ci.yml file
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
  • Loading branch information
phrdina committed Aug 3, 2020
1 parent cf56686 commit 4be700f
Show file tree
Hide file tree
Showing 29 changed files with 325 additions and 67 deletions.
58 changes: 32 additions & 26 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ stages:
- sanity_checks

.script_variables: &script_variables |
export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
export CCACHE_MAXSIZE="500M"
Expand Down Expand Up @@ -51,10 +50,25 @@ stages:
before_script:
- *script_variables
script:
- mkdir build
- cd build
- ../autogen.sh || (cat config.log && exit 1)
- $MAKE distcheck
- meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build dist

# Default native build job only for CentOS 7 that is always run
# meson dist fails on CentOS 7 because of old git that fails to clone
# from shallow git repository which is done when running meson dist
.native_build_centos_7_job_template: &native_build_centos_7_job_definition
stage: builds
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
before_script:
- *script_variables
script:
- meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
- ninja -C build test

# Jobs that we delegate to Cirrus CI because they require an operating
# system other than Linux. These jobs will only run if the required
Expand Down Expand Up @@ -86,6 +100,8 @@ stages:
-e "s|[@]PKGS@|$PKGS|g"
-e "s|[@]MAKE@|$MAKE|g"
-e "s|[@]PYTHON@|$PYTHON|g"
-e "s|[@]PIP@|$PIP|g"
-e "s|[@]PYPI_PKGS@|$PYPI_PKGS|g"
<ci/cirrus/build.yml >ci/cirrus/$NAME.yml
- cat ci/cirrus/$NAME.yml
- cirrus-run ci/cirrus/$NAME.yml
Expand All @@ -104,10 +120,8 @@ stages:
before_script:
- *script_variables
script:
- mkdir build
- cd build
- ../autogen.sh $CONFIGURE_OPTS || (cat config.log && exit 1)
- $MAKE
- meson build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build


# Native container build jobs
Expand Down Expand Up @@ -285,7 +299,7 @@ x64-debian-sid:
NAME: debian-sid

x64-centos-7:
<<: *native_build_job_definition
<<: *native_build_centos_7_job_definition
variables:
NAME: centos-7

Expand Down Expand Up @@ -440,12 +454,8 @@ website:
before_script:
- *script_variables
script:
- mkdir build
- cd build
- ../autogen.sh --prefix=$(pwd)/../vroot || (cat config.log && exit 1)
- $MAKE -C docs
- $MAKE -C docs install
- cd ..
- meson build --prefix=$(pwd)/vroot || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build install-web
- mv vroot/share/doc/libvirt/html/ website
artifacts:
expose_as: 'Website'
Expand All @@ -462,10 +472,9 @@ codestyle:
before_script:
- *script_variables
script:
- mkdir build
- cd build
- ../autogen.sh || (cat config.log && exit 1)
- $MAKE syntax-check
- meson build || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build libvirt-pot-dep
- meson test -C build --suite syntax-check --no-rebuild || (cat build/meson-logs/testlog.txt && exit 1)


# This artifact published by this job is downloaded to push to Weblate
Expand All @@ -479,12 +488,9 @@ potfile:
before_script:
- *script_variables
script:
- mkdir build
- cd build
- ../autogen.sh || (cat config.log && exit 1)
- $MAKE -C src generated-sources
- $MAKE -C po libvirt.pot
- cd ..
- meson build || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build libvirt-pot-dep
- ninja -C build libvirt-pot
- cp po/libvirt.pot libvirt.pot
artifacts:
expose_as: 'Potfile'
Expand Down
9 changes: 4 additions & 5 deletions ci/cirrus/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ env:
build_task:
install_script:
- @INSTALL_COMMAND@ @PKGS@
- @PIP@ install @PYPI_PKGS@
clone_script:
- git clone --depth 100 "$CI_REPOSITORY_URL" .
- git fetch origin "$CI_COMMIT_REF_NAME"
- git reset --hard "$CI_COMMIT_SHA"
build_script:
- mkdir build
- cd build
- ../autogen.sh --prefix=$(pwd)/install-root
- if test "$(uname)" = "FreeBSD"; then $MAKE -j3 distcheck; fi
- if test "$(uname)" = "Darwin"; then $MAKE -j3 && $MAKE -j3 install && $MAKE -j3 dist; fi
- meson build --prefix=$(pwd)/install-root
- if test "$(uname)" = "FreeBSD"; then ninja -C build dist; fi
- if test "$(uname)" = "Darwin"; then ninja -C build && ninja -C build install; fi
4 changes: 3 additions & 1 deletion ci/cirrus/libvirt-freebsd-12.vars
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ CCACHE='/usr/local/bin/ccache'
MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
PYTHON='/usr/local/bin/python3'
PKGS='augeas autoconf automake avahi bash bash-completion ca_root_nss ccache chrony cppi curl cyrus-sasl dbus diskscrub dnsmasq fusefs-libs gdb gettext gettext-tools git glib gmake gnutls hal libpcap libpciaccess libssh libssh2 libtool libxml2 libxslt lsof meson ncurses ninja p5-App-cpanminus patch perl5 pkgconf polkit py37-docutils py37-flake8 py37-pip py37-setuptools py37-wheel python3 qemu-utils radvd readline screen sudo vim yajl'
PIP='/usr/local/bin/pip-3.7'
PKGS='augeas autoconf automake avahi bash bash-completion ca_root_nss ccache chrony cppi curl cyrus-sasl dbus diskscrub dnsmasq fusefs-libs gdb gettext gettext-tools git glib gmake gnutls hal libpcap libpciaccess libssh libssh2 libtool libxml2 libxslt lsof ncurses ninja p5-App-cpanminus patch perl5 pkgconf polkit py37-docutils py37-flake8 py37-pip py37-setuptools py37-wheel python3 qemu-utils radvd readline screen sudo vim yajl'
PYPI_PKGS='meson==0.54.0'
4 changes: 3 additions & 1 deletion ci/cirrus/libvirt-macos-1015.vars
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ CCACHE='/usr/local/bin/ccache'
MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
PYTHON='/usr/local/bin/python3'
PKGS='augeas autoconf automake bash bash-completion ccache cpanminus cppi curl dbus dnsmasq docutils flake8 gdb gettext git glib gnutls gpatch libiscsi libpcap libssh libssh2 libtool libxml2 libxslt lsof make meson ncurses ninja perl pkg-config python3 qemu readline rpcgen screen scrub vim xz yajl'
PIP='/usr/local/bin/pip3'
PKGS='augeas autoconf automake bash bash-completion ccache cpanminus cppi curl dbus dnsmasq docutils flake8 gdb gettext git glib gnutls gpatch libiscsi libpcap libssh libssh2 libtool libxml2 libxslt lsof make ncurses ninja perl pkg-config python3 qemu readline rpcgen screen scrub vim xz yajl'
PYPI_PKGS='meson==0.54.0'
2 changes: 1 addition & 1 deletion ci/containers/libvirt-centos-7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ WEiJKtQrZDJloqtyi/mmRa1VsV7RYR0VPJjhK/R8EQ7Ysshy\n\
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)

RUN pip3 install \
meson==0.49.0
meson==0.54.0

ENV LANG "en_US.UTF-8"

Expand Down
4 changes: 3 additions & 1 deletion ci/containers/libvirt-centos-8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ RUN dnf install 'dnf-command(config-manager)' -y && \
lsof \
lvm2 \
make \
meson \
net-tools \
netcf-devel \
nfs-utils \
Expand Down Expand Up @@ -102,6 +101,9 @@ RUN dnf install 'dnf-command(config-manager)' -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"
Expand Down
4 changes: 3 additions & 1 deletion ci/containers/libvirt-centos-stream.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ RUN dnf install -y centos-release-stream && \
lsof \
lvm2 \
make \
meson \
net-tools \
netcf-devel \
nfs-utils \
Expand Down Expand Up @@ -103,6 +102,9 @@ RUN dnf install -y centos-release-stream && \
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"
Expand Down
19 changes: 17 additions & 2 deletions ci/containers/libvirt-debian-10-cross-aarch64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
lsof \
lvm2 \
make \
meson \
net-tools \
nfs-common \
ninja-build \
Expand Down Expand Up @@ -111,7 +110,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libyajl-dev:arm64 \
xfslibs-dev:arm64 && \
apt-get autoremove -y && \
apt-get autoclean -y
apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
echo "[binaries]\n\
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'aarch64'\n\
cpu = 'aarch64'\n\
endian = 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu

RUN pip3 install \
meson==0.54.0

ENV LANG "en_US.UTF-8"

Expand All @@ -123,3 +137,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

ENV ABI "aarch64-linux-gnu"
ENV CONFIGURE_OPTS "--host=aarch64-linux-gnu"
ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
19 changes: 17 additions & 2 deletions ci/containers/libvirt-debian-10-cross-armv6l.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
lsof \
lvm2 \
make \
meson \
net-tools \
nfs-common \
ninja-build \
Expand Down Expand Up @@ -110,7 +109,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libyajl-dev:armel \
xfslibs-dev:armel && \
apt-get autoremove -y && \
apt-get autoclean -y
apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
echo "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'arm'\n\
endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabi

RUN pip3 install \
meson==0.54.0

ENV LANG "en_US.UTF-8"

Expand All @@ -122,3 +136,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

ENV ABI "arm-linux-gnueabi"
ENV CONFIGURE_OPTS "--host=arm-linux-gnueabi"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabi"
19 changes: 17 additions & 2 deletions ci/containers/libvirt-debian-10-cross-armv7l.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
lsof \
lvm2 \
make \
meson \
net-tools \
nfs-common \
ninja-build \
Expand Down Expand Up @@ -111,7 +110,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libyajl-dev:armhf \
xfslibs-dev:armhf && \
apt-get autoremove -y && \
apt-get autoclean -y
apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
echo "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'armhf'\n\
endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabihf

RUN pip3 install \
meson==0.54.0

ENV LANG "en_US.UTF-8"

Expand All @@ -123,3 +137,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

ENV ABI "arm-linux-gnueabihf"
ENV CONFIGURE_OPTS "--host=arm-linux-gnueabihf"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
19 changes: 17 additions & 2 deletions ci/containers/libvirt-debian-10-cross-i686.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
lsof \
lvm2 \
make \
meson \
net-tools \
nfs-common \
ninja-build \
Expand Down Expand Up @@ -110,7 +109,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libyajl-dev:i386 \
xfslibs-dev:i386 && \
apt-get autoremove -y && \
apt-get autoclean -y
apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
echo "[binaries]\n\
c = '/usr/bin/i686-linux-gnu-gcc'\n\
ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/i686-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'x86'\n\
cpu = 'i686'\n\
endian = 'little'" > /usr/local/share/meson/cross/i686-linux-gnu

RUN pip3 install \
meson==0.54.0

ENV LANG "en_US.UTF-8"

Expand All @@ -122,3 +136,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

ENV ABI "i686-linux-gnu"
ENV CONFIGURE_OPTS "--host=i686-linux-gnu"
ENV MESON_OPTS "--cross-file=i686-linux-gnu"
19 changes: 17 additions & 2 deletions ci/containers/libvirt-debian-10-cross-mips.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
lsof \
lvm2 \
make \
meson \
net-tools \
nfs-common \
ninja-build \
Expand Down Expand Up @@ -110,7 +109,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libyajl-dev:mips \
xfslibs-dev:mips && \
apt-get autoremove -y && \
apt-get autoclean -y
apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
echo "[binaries]\n\
c = '/usr/bin/mips-linux-gnu-gcc'\n\
ar = '/usr/bin/mips-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/mips-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/mips-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips'\n\
cpu = 'mips'\n\
endian = 'little'" > /usr/local/share/meson/cross/mips-linux-gnu

RUN pip3 install \
meson==0.54.0

ENV LANG "en_US.UTF-8"

Expand All @@ -122,3 +136,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"

ENV ABI "mips-linux-gnu"
ENV CONFIGURE_OPTS "--host=mips-linux-gnu"
ENV MESON_OPTS "--cross-file=mips-linux-gnu"
Loading

0 comments on commit 4be700f

Please sign in to comment.