2020-04-03 18:38:48 +03:00
stages :
2020-04-23 15:31:48 +03:00
- containers
- builds
2021-01-13 14:21:45 +03:00
- sanity_checks
2020-04-23 15:31:48 +03:00
2020-06-19 14:56:03 +03:00
.script_variables : &script_variables |
export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
export SCRATCH_DIR="/tmp/scratch"
export VROOT="$SCRATCH_DIR/vroot"
2020-08-18 15:55:01 +03:00
export LIBDIR="$VROOT/lib"
export LD_LIBRARY_PATH="$LIBDIR"
2020-06-19 14:56:03 +03:00
export PATH="$VROOT/bin:$PATH"
2020-08-18 15:55:01 +03:00
export PKG_CONFIG_PATH="$LIBDIR/pkgconfig"
2020-06-19 14:56:03 +03:00
2021-09-10 11:54:39 +03:00
.native_build_job :
2020-06-19 14:56:03 +03:00
script :
2022-09-30 11:50:04 +03:00
- *script_variables
2021-01-13 14:18:35 +03:00
- meson build
2021-09-10 14:37:37 +03:00
- ninja -C build dist;
2021-01-13 14:18:35 +03:00
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
rpmbuild --nodeps -ta build/meson-dist/virt-viewer-*.tar.xz;
fi
2020-06-19 14:56:03 +03:00
2022-09-30 11:50:04 +03:00
.native_build_job_prebuilt_env :
extends :
- .native_build_job
- .gitlab_native_build_job_prebuilt_env
.native_build_job_local_env :
extends :
- .native_build_job
- .gitlab_native_build_job_local_env
2021-09-10 11:54:39 +03:00
.native_git_build_job :
2020-04-23 15:31:48 +03:00
script :
2022-09-30 11:50:04 +03:00
- *script_variables
2020-04-23 15:31:48 +03:00
- 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
2020-08-18 15:55:01 +03:00
- meson build -Ddriver_libvirtd=disabled "--prefix=$VROOT" "--libdir=$LIBDIR"
- ninja -C build install
- cd ../libvirt-glib
2021-01-12 21:34:27 +03:00
- meson build --prefix="$VROOT" --libdir="$LIBDIR" -Ddocs=disabled
- $NINJA -C build install
- cd ../gtk-vnc
2020-04-23 15:31:48 +03:00
- git submodule update --init
2020-08-18 15:55:01 +03:00
- meson build --prefix="$VROOT" --libdir="$LIBDIR"
2020-04-23 15:31:48 +03:00
- $NINJA -C build install
- popd
2021-01-13 14:18:35 +03:00
- meson build
2021-09-10 14:37:37 +03:00
- ninja -C build dist;
2021-01-13 14:18:35 +03:00
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
rpmbuild --nodeps -ta build/meson-dist/virt-viewer-*.tar.xz;
fi
2020-06-19 14:56:03 +03:00
2022-09-30 11:50:04 +03:00
.native_git_build_job_prebuilt_env :
extends :
- .native_git_build_job
- .gitlab_native_build_job_prebuilt_env
.native_git_build_job_local_env :
extends :
- .native_git_build_job
- .gitlab_native_build_job_local_env
2021-09-10 11:54:39 +03:00
.cross_build_job :
2020-06-24 18:39:33 +03:00
image : $CI_REGISTRY_IMAGE/ci-$NAME:latest
cache :
paths :
- ccache/
key : "$CI_JOB_NAME"
script :
2022-09-30 11:50:04 +03:00
- *script_variables
2021-01-13 14:18:35 +03:00
- meson build $MESON_OPTS
- $NINJA -C build
2020-04-03 18:38:48 +03:00
2022-09-30 11:50:04 +03:00
.cross_build_job_prebuilt_env :
extends :
- .cross_build_job
- .gitlab_cross_build_job_prebuilt_env
.cross_build_job_local_env :
extends :
- .cross_build_job
- .gitlab_cross_build_job_local_env
2021-09-10 11:54:39 +03:00
include : '/ci/gitlab.yml'
2020-04-23 15:31:48 +03:00
2022-09-30 11:50:04 +03:00
.codestyle_job :
2021-01-13 14:21:45 +03:00
stage : sanity_checks
2021-01-13 14:18:35 +03:00
script :
2022-09-30 11:50:04 +03:00
- *script_variables
2021-01-13 14:18:35 +03:00
- 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)
2022-09-30 11:50:04 +03:00
codestyle_prebuilt_env :
extends :
- .codestyle_job
- .gitlab_native_build_job_prebuilt_env
needs :
- job : x86_64-centos-stream-8-container
optional : true
variables :
NAME : centos-stream-8
codestyle_local_env :
extends :
- .codestyle_job
- .gitlab_native_build_job_local_env
variables :
IMAGE : quay.io/centos/centos:stream8
NAME : centos-stream-8