-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
76 lines (70 loc) · 1.83 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
stages:
- containers
- builds
- pages
- sanity_checks
.native_git_build_job:
extends:
- .gitlab_native_build_job
script:
- 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"
- 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
- ./autogen.sh ${CONFIGURE_ARGS}
- make distcheck
after_script:
- find -name test-suite.log | xargs cat
- find -name runtests.sh.log | xargs cat
.native_build_job:
extends:
- .gitlab_native_build_job
script:
- export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
- ./autogen.sh ${CONFIGURE_ARGS}
- make distcheck
after_script:
- find -name test-suite.log | xargs cat
- find -name runtests.sh.log | xargs cat
website_job:
extends:
- .gitlab_native_build_job
needs:
- job: x86_64-ubuntu-2204-container
optional: true
script:
- mkdir /tmp/web
- ./autogen.sh --with-html-dir=/tmp/web ${CONFIGURE_ARGS}
- make
- make install
- mv /tmp/web/libvirt-php*/html website
artifacts:
paths:
- website
variables:
NAME: ubuntu-2204
pages:
stage: pages
dependencies:
- website_job
script:
- mv website public
artifacts:
paths:
- public
rules:
- if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: on_success
- when: never
include: '/ci/gitlab.yml'