-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
81 lines (75 loc) · 2.28 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
73
74
75
76
77
78
79
80
81
stages:
- containers
- builds
- sanity_checks
.multilib: &multilib |
if test -d "/usr/lib64"; then
multilib=lib64
else
multilib=lib
fi
.native-environment: &native-environment |
export VIRT_PREFIX="$HOME/build/libvirt"
export PATH="$VIRT_PREFIX/bin:$PATH"
export C_INCLUDE_PATH="$VIRT_PREFIX/include"
export LD_LIBRARY_PATH="$VIRT_PREFIX/$multilib"
export PKG_CONFIG_PATH="$VIRT_PREFIX/$multilib/pkgconfig"
export XDG_DATA_DIRS="$VIRT_PREFIX/share:/usr/share:/usr/local/share"
export GI_TYPELIB_PATH="$VIRT_PREFIX/$multilib/girepository-1.0"
export OSINFO_SYSTEM_DIR="$VIRT_PREFIX/share/osinfo"
export MAKEFLAGS="-j $(getconf _NPROCESSORS_ONLN)"
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
export CCACHE_MAXSIZE="50M"
export PATH="$CCACHE_WRAPPERSDIR:$PATH"
.mingw-environment: &mingw-environment |
export VIRT_PREFIX="$VIRT_PREFIX/$ABI/sys-root/mingw"
export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
.native_build_job:
extends:
- .gitlab_native_build_job
cache:
paths:
- ccache
key: "$CI_JOB_NAME"
script:
- *multilib
- *native-environment
- HERE=$PWD
- cd /tmp/
- git clone https://gitlab.com/libosinfo/osinfo-db.git
- cd osinfo-db
- mkdir build
- cd build
- $MAKE -f ../Makefile VPATH=..
- $MAKE -f ../Makefile VPATH=.. check
- $MAKE -f ../Makefile VPATH=.. install OSINFO_DB_TARGET="--system"
- cd $HERE
- mkdir build
- cd build
- meson .. . --prefix=$VIRT_PREFIX --werror || ( cat meson-logs/meson-log.txt ; exit 1)
- $NINJA
- $NINJA install
- meson test --print-errorlogs
- $NINJA dist
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
rpmbuild --nodeps --define '_without_mingw 1' -ta meson-dist/*.tar.xz;
fi
.cross_build_job:
extends:
- .gitlab_cross_build_job
cache:
paths:
- ccache
key: "$CI_JOB_NAME"
script:
- *multilib
- *native-environment
- *mingw-environment
- mkdir build
- cd build
- meson .. . $MESON_OPTS --prefix=$VIRT_PREFIX -Denable-gtk-doc=false -Denable-tests=false -Denable-introspection=disabled -Denable-vala=disabled --werror || ( cat meson-logs/meson-log.txt ; exit 1)
- $NINJA
- $NINJA install
include: '/ci/gitlab.yml'