-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.gitlab-ci.yml
108 lines (97 loc) · 2.74 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
variables:
DEBIAN_FRONTEND: noninteractive
MESON_BUILD_DIR: _build
DOCS_BUILD_DIR: _reference
TARBALL_ARTIFACT_PATH: ${MESON_BUILD_DIR}/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz
include:
- component: "gitlab.gnome.org/GNOME/citemplates/release-service@master"
inputs:
job-stage: release
dist-job-name: build:dist:ubuntu
tarball-artifact-path: ${TARBALL_ARTIFACT_PATH}
stages:
- build
- deploy
- release
.build:ubuntu:base:
image: ubuntu:devel
before_script:
# Disable installing of manpages and docs
- |
cat <<"EOF" | tee /etc/dpkg/dpkg.cfg.d/01_nodoc
# Delete man pages
path-exclude=/usr/share/man/*
# Delete docs
path-exclude=/usr/share/doc/*
path-include=/usr/share/doc/*/copyright
EOF
# Disable installing of locale files
- |
cat <<"EOF" | tee /etc/dpkg/dpkg.cfg.d/01_nolocales
# Delete locales
path-exclude=/usr/share/locale/*
EOF
- apt-get update
# Install eatmydata
- apt install -y -q eatmydata
- mkdir -p "/usr/local/libexec/dt-deb-action"
- ln -s /usr/bin/eatmydata /usr/local/libexec/dt-deb-action/dpkg
- echo 'Dir::Bin::dpkg /usr/local/libexec/dt-deb-action/dpkg;' >
/etc/apt/apt.conf.d/00dt-deb-action-eatmydata
- apt-get install -q -y --no-install-recommends
gobject-introspection
libgdk-pixbuf2.0-dev
libgirepository1.0-dev
libglib2.0-dev
libgtk-3-dev
libpopt-dev
xmlto
meson
ninja-build
python3-pip
python3-setuptools
xsltproc
docbook-xsl-ns
gi-docgen
script:
- meson setup ${MESON_BUILD_DIR} -Ddocbook_docs=enabled
build:ubuntu:
stage: build
extends:
- .build:ubuntu:base
script:
- !reference [".build:ubuntu:base", "script"]
- meson install -C ${MESON_BUILD_DIR}
- mv ${MESON_BUILD_DIR}/docs/reference/libnotify-0 ${DOCS_BUILD_DIR}
artifacts:
expose_as: "Build artifacts"
paths:
- ${MESON_BUILD_DIR}/docs/notification-spec.html
- ${DOCS_BUILD_DIR}
- ${MESON_BUILD_DIR}/meson-logs
build:dist:ubuntu:
stage: build
extends:
- .build:ubuntu:base
before_script:
- !reference [".build:ubuntu:base", "before_script"]
- apt-get install -q -y git
script:
- !reference [".build:ubuntu:base", "script"]
- meson dist -C "${MESON_BUILD_DIR}" --include-subprojects
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: "always"
paths:
- "${TARBALL_ARTIFACT_PATH}"
pages:
stage: deploy
script:
- mkdir public
- mv ${DOCS_BUILD_DIR}/* public/
artifacts:
when: on_success
paths:
- public
# https://github.com/linux-test-project/lcov/issues/58
allow_failure: true