mirrored from git://anongit.freedesktop.org/gstreamer/orc
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
382 lines (354 loc) · 11.6 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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
stages:
- build
- deploy
variables:
MESON_ARGS: --werror --fatal-meson-warnings
workflow:
# https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
rules:
- if: '$CI_PIPELINE_SOURCE == "schedules" || $CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == "true"'
- if: '$CI_COMMIT_TAG'
#
# Global CI policy
#
# This can be used to configure global behaviour our our jobs.
#
default:
retry:
max: 2
when:
- 'runner_system_failure'
- 'stuck_or_timeout_failure'
- 'scheduler_failure'
- 'api_failure'
interruptible: true
.debian:
image: 'debian:stable-slim'
stage: build
variables:
DEPENDENCIES: >
meson
ninja-build
build-essential
before_script:
- apt-get update
- apt-get install --yes ${DEPENDENCIES}
script:
- meson setup $MESON_ARGS build/
- meson compile --verbose -C build/
- meson test -C build/
- meson test -C build/ --benchmark
- ORC_DEBUG=2 ./build/tools/orc-bugreport
- meson install -C build/
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
expire_in: '5 days'
when: 'always'
paths:
- "build/meson-logs/*txt"
alpine 3.20 ppc64le:
stage: build
tags:
- 'orc-alpine-ppc64'
script:
- apk add git build-base linux-headers meson
- meson setup $MESON_ARGS -Dorc-backend=altivec build/
- meson compile --verbose -C build/
- meson test -C build/
- ORC_DEBUG=2 ./build/tools/orc-bugreport
- meson install -C build/
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
expire_in: '5 days'
when: 'always'
paths:
- "build/meson-logs/*txt"
debian sid:
extends: '.debian'
image: 'debian:sid-slim'
debian sid arm64:
extends: '.debian'
image: 'debian:sid-slim'
tags:
- 'gstreamer-arm64-linux-docker'
debian bullseye arm64:
extends: '.debian'
image: 'debian:bullseye-slim'
tags:
- 'gstreamer-arm64-linux-docker'
debian bookworm arm64:
extends: '.debian'
image: 'debian:bookworm-slim'
tags:
- 'gstreamer-arm64-linux-docker'
# https://gitlab.freedesktop.org/gstreamer/orc/-/issues/41
# https://gitlab.freedesktop.org/gstreamer/orc/-/issues/45
variables:
DEPENDENCIES: >
meson
ninja-build
build-essential
gcc-11
CC: gcc-11
CXX: g++-11
.build windows:
image: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2023-04-21.0-main'
stage: 'build'
tags:
- 'docker'
- 'windows'
- '2022'
variables:
# Make sure any failure in PowerShell scripts is fatal
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
ErrorActionPreference: 'Stop'
WarningPreference: 'Stop'
MESON_ARGS: ' '
before_script:
# Make sure meson is up to date, so we don't need to rebuild the image with each release
- pip3 install -U meson ninja
script:
# Set the code page to UTF-8
- chcp 65001
# For some reason, options are separated by newline instead of space, so we
# have to replace them first.
- $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
# Gitlab executes PowerShell in docker, but VsDevCmd.bat is a batch script.
# Environment variables substitutions is done by PowerShell before calling
# cmd.exe, that's why we use $env:FOO instead of %FOO%
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH -app_platform=$env:PLAT &&
meson setup build $env:MESON_ARGS &&
meson compile --verbose -C build &&
meson test -C build &&
meson test -C build --benchmark"
vs2019 amd64:
extends: '.build windows'
variables:
ARCH: 'amd64'
PLAT: 'Desktop'
vs2019 x86:
extends: '.build windows'
variables:
ARCH: 'x86'
PLAT: 'Desktop'
vs2019 cross-arm64 UWP:
extends: '.build windows'
variables:
ARCH: 'arm64'
PLAT: 'UWP'
MESON_ARGS: >
--cross-file ci/vs2019-arm64-uwp-cross-file.txt
--native-file ci/vs2019-x64-native-file.txt
vs2019 cross-arm UWP:
extends: '.build windows'
# Known to not work, but maybe we'll want it later
when: 'manual'
allow_failure: true
variables:
ARCH: 'arm'
PLAT: 'UWP'
MESON_ARGS: >
--cross-file ci/vs2019-arm-uwp-cross-file.txt
--native-file ci/vs2019-x64-native-file.txt
msys2:
extends: '.build windows'
when: 'manual'
allow_failure: true
script:
# XXX: Copied from https://gitlab.freedesktop.org/gstreamer/gst-ci/blob/master/gitlab/ci_template.yml#L487
- $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin"
- C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
- C:\msys64\usr\bin\bash -c "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
- echo "Updating MSYS2"
- C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm || echo Update failed, ignoring"
- echo "Killing all MSYS2 processes"
- taskkill /F /FI "MODULES eq msys-2.0.dll"
- echo "Completing MSYS2 update"
- C:\msys64\usr\bin\bash -c "pacman -Suu --noconfirm"
- echo "Installing needed MSYS2 packages"
- C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
- C:\msys64\usr\bin\bash -c "meson setup build $env:MESON_ARGS &&
meson compile --verbose -C build &&
meson test -C build &&
meson test -C build --benchmark"
macos arm64:
image: "registry.freedesktop.org/gstreamer/gstreamer/macos-arm64/14-sonoma:2023-10-25.0"
stage: 'build'
tags:
- gst-mac-arm
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
expire_in: '5 days'
when: 'always'
paths:
- "build/meson-logs/*txt"
before_script:
- pip3 install --upgrade pip
- export PATH=${PATH}:/Users/gst-ci/Library/Python/3.9/bin
# Need to install certificates for python
- pip3 install --upgrade certifi
# Make sure meson and ninja are up to date
- pip3 install -U meson ninja
script:
- export PATH=${PATH}:/Users/gst-ci/Library/Python/3.9/bin
- CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH}
- meson setup build --werror -Dc_args='-Werror=unguarded-availability-new'
- meson compile --verbose -C build
- meson test -C build
- meson test -C build --benchmark
- ORC_DEBUG=2 ./build/tools/orc-bugreport
macos x86_64:
stage: 'build'
tags:
- gst-macos-13
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
expire_in: '5 days'
when: 'always'
paths:
- "build/meson-logs/*txt"
before_script:
- pip3 install --upgrade pip
# Need to install certificates for python
- pip3 install --upgrade certifi
# Anther way to install certificates
- open /Applications/Python\ 3.8/Install\ Certificates.command
# Make sure meson and ninja are up to date
- pip3 install -U meson ninja
script:
- CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH}
- meson setup build --werror -Dc_args='-Werror=unguarded-availability-new'
- meson compile --verbose -C build
- meson test -C build
- meson test -C build --benchmark
- ORC_DEBUG=2 ./build/tools/orc-bugreport
ios cross-arm64:
stage: 'build'
tags:
- gst-ios-16
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
expire_in: '5 days'
when: 'always'
paths:
- "build/meson-logs/*txt"
before_script:
- pip3 install --upgrade pip
# Need to install certificates for python
- pip3 install --upgrade certifi
# Anther way to install certificates
- open /Applications/Python\ 3.8/Install\ Certificates.command
# Make sure meson and ninja are up to date
- pip3 install -U meson ninja
script:
- CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH}
- |
cat > ios-cross-file.txt <<EOF
[host_machine]
system = 'darwin'
cpu_family = 'aarch64'
cpu = 'aarch64'
endian = 'little'
[properties]
c_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0', '-Werror=unguarded-availability-new']
c_link_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0']
[binaries]
ar = '$(xcrun --find --sdk iphoneos ar)'
c = '$(xcrun --find --sdk iphoneos clang)'
cpp = '$(xcrun --find --sdk iphoneos clang++)'
ranlib = '$(xcrun --find --sdk iphoneos ranlib)'
strip = '$(xcrun --find --sdk iphoneos strip)'
pkgconfig = 'false'
EOF
- meson setup --werror -Dorc-test=disabled -Db_bitcode=true --cross-file ios-cross-file.txt build
- meson compile --verbose -C build
.build android:
image: 'registry.freedesktop.org/gstreamer/cerbero/android:2023-05-31.0'
stage: 'build'
tags:
- 'gstreamer'
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
expire_in: '5 days'
when: 'always'
paths:
- "build/meson-logs/*.txt"
variables:
ANDROID_SDK: '/android/sdk'
ANDROID_NDK: '/android/ndk'
ANDROID_API: '28'
TOOLCHAIN: "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64"
before_script:
- dnf install -y python3-pip gcc ninja-build
- pip3 install --user meson
script:
- export PATH="$HOME/.local/bin:$PATH"
- |
cat > android-cross-file.txt <<EOF
[host_machine]
system = 'android'
cpu_family = '$ARCH'
cpu = '$ARCH'
endian = 'little'
[constants]
toolchain = '$TOOLCHAIN'
clang_arch = '$CLANG_ARCH'
android_host = '$ANDROID_HOST'
android_api = '$ANDROID_API'
[properties]
sys_root = '$ANDROID_NDK/sysroot'
[binaries]
ar = toolchain + '/bin/llvm-ar'
c = [toolchain + '/bin/clang', '-target', clang_arch + '-linux-' + android_host + android_api]
cpp = [toolchain + '/bin/clang++', '-target', clang_arch + '-linux-' + android_host + android_api]
ranlib = toolchain + '/bin/llvm-ranlib'
strip = toolchain + '/bin/llvm-strip'
pkgconfig = 'false'
EOF
- meson setup --werror --cross-file android-cross-file.txt build
- meson compile --verbose -C build
android arm64 cross:
extends: '.build android'
stage: 'build'
variables:
ARCH: 'aarch64'
CLANG_ARCH: 'aarch64'
ANDROID_HOST: 'android'
android armv7 cross:
extends: '.build android'
stage: 'build'
variables:
ARCH: 'arm'
CLANG_ARCH: 'armv7a'
ANDROID_HOST: 'androideabi'
# https://docs.gitlab.com/ee/user/project/pages/#how-it-works
# GitLab automatically deploys the `public/` folder from an
# artifact generated by the job named `pages`.
pages:
image: 'debian:stable'
stage: 'deploy'
#needs: [ 'docs' ]
interruptible: false
before_script:
- apt update
- apt-get install --yes meson ninja-build build-essential gtk-doc-tools
script:
- meson -Dgtk_doc=enabled b
- ninja -C b orc-doc
- mkdir -p public/docs/latest/
- mv b/doc/html/* public/docs/latest/
- ls -R1 public
artifacts:
paths:
# The folder that contains the files to be exposed at the Page URL
- public
when: 'manual'
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
when: 'manual'