forked from PipeWire/wireplumber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
312 lines (290 loc) · 8.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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
stages:
- container
- container_coverity
- build
- analysis
- pages
variables:
FDO_UPSTREAM_REPO: 'pipewire/wireplumber'
# change to build against a different tag or branch of pipewire
PIPEWIRE_HEAD: 'master'
# ci-templates as of Mar 24th 2023
.templates_sha: &templates_sha dd90ac0d7a03b574eb4f18d7358083f0c97825f3
include:
- project: 'freedesktop/ci-templates'
ref: *templates_sha
file: '/templates/fedora.yml'
- project: 'freedesktop/ci-templates'
ref: *templates_sha
file: '/templates/ubuntu.yml'
- project: 'freedesktop/ci-templates'
ref: *templates_sha
file: '/templates/alpine.yml'
.fedora:
variables:
# Update this tag when you want to trigger a rebuild
FDO_DISTRIBUTION_TAG: '2023-03-24.1'
FDO_DISTRIBUTION_VERSION: '37'
# findutils: used by the .build script below
# dbus-devel: required by pipewire
# dbus-daemon: required by GDBus unit tests
# pip, doxygen: required for documentation
# ShellCheck, diffutils: required by the CI
FDO_DISTRIBUTION_PACKAGES: >-
findutils
gcc
gcc-c++
git
meson
glib2-devel
gobject-introspection-devel
dbus-devel
dbus-daemon
python3-pip
doxygen
ShellCheck
diffutils
# install Sphinx and Breathe to generate documentation
# also install glib2-doc (required to make documentation links to GLib work)
# manually, to remove the 'tsflags=nodocs' flag that is enabled by default
# in the fedora docker image
FDO_DISTRIBUTION_EXEC: >-
pip3 install lxml Sphinx sphinx-rtd-theme breathe ;
dnf -y install glib2-doc --setopt='tsflags='
.ubuntu:
variables:
# Update this tag when you want to trigger a rebuild
FDO_DISTRIBUTION_TAG: '2023-03-24.1'
FDO_DISTRIBUTION_VERSION: '20.04'
FDO_DISTRIBUTION_PACKAGES: >-
debhelper-compat
findutils
git
ninja-build
pkg-config
python3-pip
dbus
libdbus-1-dev
libglib2.0-dev
liblua5.3-dev
libgirepository1.0-dev
doxygen
python3-lxml
FDO_DISTRIBUTION_EXEC: >-
pip3 install meson
.alpine:
variables:
# Update this tag when you want to trigger a rebuild
FDO_DISTRIBUTION_TAG: '2023-03-24.1'
FDO_DISTRIBUTION_VERSION: '3.15'
FDO_DISTRIBUTION_PACKAGES: >-
dbus
dbus-dev
doxygen
elogind-dev
findutils
g++
gcc
git
glib-dev
gobject-introspection-dev
lua5.4-dev
meson
py3-lxml
samurai
.coverity:
variables:
FDO_REPO_SUFFIX: 'coverity'
FDO_BASE_IMAGE: registry.freedesktop.org/$FDO_UPSTREAM_REPO/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_PACKAGES: >-
curl
FDO_DISTRIBUTION_EXEC: >-
mkdir -p /opt ;
cd /opt ;
curl -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/cxx/linux64
--form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN ;
tar xf /tmp/cov-analysis-linux64.tgz ;
mv cov-analysis-linux64-* coverity ;
rm /tmp/cov-analysis-linux64.tgz
only:
variables:
- $COVERITY
.not_coverity:
except:
variables:
- $COVERITY
.build:
before_script:
# setup the environment
- export BUILD_ID="$CI_JOB_ID"
- export PREFIX="$PWD/prefix-$BUILD_ID"
- export PW_BUILD_DIR="$PWD/build-pipewire-$BUILD_ID"
- |
if [ -n "$FDO_CI_CONCURRENT" ]; then
NINJA_ARGS="-j$FDO_CI_CONCURRENT $NINJA_ARGS"
export NINJA_ARGS
fi
# Build pipewire
# Fedora also ships that, but without the test plugins that we need...
- git clone --depth=1 --branch="$PIPEWIRE_HEAD"
https://gitlab.freedesktop.org/pipewire/pipewire.git
- meson "$PW_BUILD_DIR" pipewire --prefix="$PREFIX"
-Dpipewire-alsa=disabled -Dpipewire-jack=disabled
-Dalsa=disabled -Dv4l2=disabled -Djack=disabled -Dbluez5=disabled
-Dvulkan=disabled -Dgstreamer=disabled -Dsystemd=disabled
-Ddocs=disabled -Dman=disabled -Dexamples=disabled -Dpw-cat=disabled
-Dsdl2=disabled -Dsndfile=disabled -Dlibpulse=disabled -Davahi=disabled
-Decho-cancel-webrtc=disabled -Dsession-managers=[]
-Dvideotestsrc=enabled -Daudiotestsrc=enabled -Dtest=enabled
- ninja $NINJA_ARGS -C "$PW_BUILD_DIR" install
# misc environment only for wireplumber
- export WP_BUILD_DIR="$PWD/build-wireplumber-$BUILD_ID"
- export PKG_CONFIG_PATH="$(dirname $(find "$PREFIX" -name 'libpipewire-*.pc')):$PKG_CONFIG_PATH"
script:
# Build wireplumber
- meson "$WP_BUILD_DIR" . --prefix="$PREFIX" $BUILD_OPTIONS
- cd "$WP_BUILD_DIR"
- ninja $NINJA_ARGS
- ninja $NINJA_ARGS test
- ninja $NINJA_ARGS install
artifacts:
name: wireplumber-$CI_COMMIT_SHA
when: always
paths:
- build-*/meson-logs
- prefix-*
container_fedora:
extends:
- .fedora
- .fdo.container-build@fedora
stage: container
variables:
GIT_STRATEGY: none
container_ubuntu:
extends:
- .ubuntu
- .fdo.container-build@ubuntu
stage: container
variables:
GIT_STRATEGY: none
container_alpine:
extends:
- .alpine
- .fdo.container-build@alpine
stage: container
variables:
GIT_STRATEGY: none
container_coverity:
extends:
- .fedora
- .coverity
- .fdo.container-build@fedora
stage: container_coverity
variables:
GIT_STRATEGY: none
build_on_fedora_with_docs:
extends:
- .fedora
- .not_coverity
- .fdo.distribution-image@fedora
- .build
stage: build
variables:
BUILD_OPTIONS: -Dintrospection=enabled -Ddoc=enabled -Dsystem-lua=false
build_on_fedora_no_docs:
extends:
- .fedora
- .not_coverity
- .fdo.distribution-image@fedora
- .build
stage: build
variables:
BUILD_OPTIONS: -Dintrospection=enabled -Ddoc=disabled -Dsystem-lua=false
build_on_ubuntu_with_gir:
extends:
- .ubuntu
- .not_coverity
- .fdo.distribution-image@ubuntu
- .build
stage: build
variables:
BUILD_OPTIONS: -Dintrospection=enabled -Ddoc=disabled -Dsystem-lua=true
build_on_ubuntu_no_gir:
extends:
- .ubuntu
- .not_coverity
- .fdo.distribution-image@ubuntu
- .build
stage: build
variables:
BUILD_OPTIONS: -Dintrospection=disabled -Ddoc=disabled -Dsystem-lua=true
build_on_alpine:
extends:
- .alpine
- .not_coverity
- .fdo.distribution-image@alpine
- .build
stage: build
variables:
BUILD_OPTIONS: -Dintrospection=enabled -Ddoc=disabled -Dsystem-lua=true -Delogind=disabled
build_with_coverity:
extends:
- .fedora
- .coverity
- .fdo.suffixed-image@fedora
- .build
stage: analysis
script:
- export PATH=/opt/coverity/bin:$PATH
- meson "$WP_BUILD_DIR" . --prefix="$PREFIX"
-Dintrospection=disabled -Ddoc=disabled
- cov-configure --config coverity_conf.xml
--comptype gcc --compiler cc --template
--xml-option=append_arg@C:--ppp_translator
--xml-option=append_arg@C:"replace/GLIB_(DEPRECATED|AVAILABLE)_ENUMERATOR_IN_\d_\d\d(_FOR\(\w+\)|)\s+=/ ="
- cov-build --dir cov-int --config coverity_conf.xml ninja $NINJA_ARGS -C "$WP_BUILD_DIR"
- tar caf wireplumber.tar.gz cov-int
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
--form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
--form file=@wireplumber.tar.gz --form version="`git describe --tags`"
--form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID "
artifacts:
name: wireplumber-coverity-$CI_COMMIT_SHA
when: always
paths:
- build-*/meson-logs
- cov-int/build-log.txt
shellcheck:
extends:
- .fedora
- .not_coverity
- .fdo.distribution-image@fedora
stage: analysis
script:
- shellcheck $(git grep -l "#\!/.*bin/.*sh")
linguas_check:
extends:
- .fedora
- .not_coverity
- .fdo.distribution-image@fedora
stage: analysis
script:
- cd po
- cat LINGUAS | sort > LINGUAS.sorted
- ls *.po | sed s/.po//g | sort > LINGUAS.new
- diff -u LINGUAS.sorted LINGUAS.new
- rm -f LINGUAS.*
pages:
extends:
- .not_coverity
stage: pages
dependencies:
- build_on_fedora_with_docs
script:
- mkdir public
- cp -R prefix-*/share/doc/wireplumber/html/* public/
artifacts:
paths:
- public
only:
- master