-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
72 lines (66 loc) · 1.9 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
variables:
GIT_DEPTH: 100
stages:
- containers
- builds
- sanity_checks
.script_variables: &script_variables |
export SCRATCH_DIR="/tmp/scratch"
export VROOT="$SCRATCH_DIR/vroot"
export LIBDIR="$VROOT/lib"
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
export CCACHE_MAXSIZE="500M"
export PATH="$CCACHE_WRAPPERSDIR:$VROOT/bin:$PATH"
export PKG_CONFIG_PATH="$LIBDIR/pkgconfig"
export LD_LIBRARY_PATH="$LIBDIR"
.native_git_build_job:
extends:
- .gitlab_native_build_job
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
script:
- *script_variables
- pushd "$PWD"
- mkdir -p "$SCRATCH_DIR"
- cd "$SCRATCH_DIR"
- git clone --depth 1 https://gitlab.com/libvirt/libvirt.git
- cd libvirt
- meson setup build -Ddriver_libvirtd=disabled "--prefix=$VROOT" "--libdir=$LIBDIR"
- ninja -C build install
- popd
- meson build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build dist;
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
rpmbuild --nodeps --define "_without_mingw 1" -ta build/meson-dist/libvirt-glib-*.tar.xz;
fi
.native_build_job:
extends:
- .gitlab_native_build_job
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
script:
- *script_variables
- meson setup build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build dist;
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
rpmbuild --nodeps --define "_without_mingw 1" -ta build/meson-dist/libvirt-glib-*.tar.xz;
fi
.cross_build_job:
extends:
- .gitlab_cross_build_job
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
script:
- *script_variables
- meson build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
include: '/ci/gitlab.yml'