-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
80 lines (74 loc) · 1.91 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
stages:
- containers
- builds
- docs
- sanity_checks
.git_build_vars: &git_build_vars |
export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
export SCRATCH_DIR="/tmp/scratch"
export VROOT="$SCRATCH_DIR/vroot"
export LIBDIR="$VROOT/lib"
export LD_LIBRARY_PATH="$LIBDIR"
export PATH="$VROOT/bin:$PATH"
export PKG_CONFIG_PATH="$LIBDIR/pkgconfig"
.native_build_job:
extends:
- .gitlab_native_build_job
script:
- *git_build_vars
- pushd "$PWD"
- mkdir -p "$SCRATCH_DIR"
- cd "$SCRATCH_DIR"
- git clone --depth 1 https://gitlab.com/libvirt/libvirt.git
- cd libvirt
- meson build -Ddriver_libvirtd=disabled "--prefix=$VROOT" "--libdir=$LIBDIR"
- ninja -C build install
- popd
- perl Build.PL
- perl Build
- perl Build test
- perl Build install
- perl Build dist
- if test -x /usr/bin/rpmbuild ;
then
rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta Sys-Virt*.tar.gz ;
mv rpmbuild/RPMS/x86_64/ libvirt-perl-rpms ;
fi
- mv "$SCRATCH_DIR" scratch
include: '/ci/gitlab.yml'
api_reference_job:
stage: docs
extends:
- .gitlab_native_build_job
needs:
- job: x86_64-almalinux-9-container
optional: true
variables:
TARGET_BASE_IMAGE: docker.io/library/almalinux:9
NAME: almalinux-9
script:
- mkdir apiref
- perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go lib apiref
artifacts:
expose_as: 'API Reference'
name: 'apiref'
when: on_success
expire_in: 30 days
paths:
- apiref
api_coverage_job:
stage: sanity_checks
extends:
- .gitlab_native_build_job
needs:
- job: x86_64-almalinux-9
artifacts: true
script:
- *git_build_vars
- mv scratch "$SCRATCH_DIR"
- perl Build.PL
- TEST_MAINTAINER=1 perl Build test
variables:
TARGET_BASE_IMAGE: docker.io/library/almalinux:9
NAME: almalinux-9
allow_failure: true