ci: Install Media Foundations on the windows container
[platform/upstream/gstreamer.git] / .gitlab-ci.yml
1 include:
2   - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/fedora.yml"
3   - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/debian.yml"
4
5 stages:
6   - 'trigger'
7   - 'build docker'
8   - 'preparation'
9   - 'pre-build'
10   - 'build'
11   - 'test'
12   # Use the resulting binaries
13   - 'integrate'
14
15 variables:
16   GIT_DEPTH: 1
17
18   # Branch to track for modules that have no ref specified in the manifest
19   GST_UPSTREAM_BRANCH: 'main'
20
21   ###
22   # IMPORTANT
23   # These are the version tags for the docker images the CI runs against.
24   # If you are hacking on them or need a them to rebuild, its enough
25   # to change any part of the string of the image you want.
26   ###
27   FEDORA_TAG:  '2022-03-14.0'
28   INDENT_TAG: '2022-03-07.1'
29   WINDOWS_TAG: "2022-05-09.0"
30
31   GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
32   FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
33
34   FEDORA_AMD64_SUFFIX:  'amd64/fedora'
35   INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
36   WINDOWS_AMD64_SUFFIX: 'amd64/windows'
37   WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
38
39   FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
40   WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
41   WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
42
43   RUST_MINIMUM_VERSION: '1.57.0'
44   RUST_LATEST_VERSION: '1.60.0'
45
46   WINDOWS_RUST_MINIMUM_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
47   WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
48
49   WINDOWS_RUST_LATEST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
50   WINDOWS_RUST_LATEST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
51
52   MESON_BUILDTYPE_ARGS: --default-library=both
53   DEFAULT_MESON_ARGS: >
54     -Dlibnice:tests=disabled
55     -Dlibnice:examples=disabled
56     -Dopenh264:tests=disabled
57     -Dpygobject:tests=false
58     -Dpython=enabled
59     -Dlibav=enabled
60     -Dugly=enabled
61     -Dbad=enabled
62     -Ddevtools=enabled
63     -Dges=enabled
64     -Drtsp_server=enabled
65     -Dvaapi=enabled
66     -Dsharp=disabled
67     -Dgpl=enabled
68
69   MESON_GST_WERROR: >
70     -Dgstreamer:werror=true
71     -Dgst-plugins-base:werror=true
72     -Dgst-plugins-good:werror=true
73     -Dgst-plugins-ugly:werror=true
74     -Dgst-plugins-bad:werror=true
75     -Dgst-rtsp-server:werror=true
76     -Dgst-libav:werror=true
77     -Dgst-examples:werror=true
78     -Dgst-editing-services:werror=true
79     -Dgst-docs:werror=true
80     -Dgst-omx:werror=true
81     -Dgst-devtools:werror=true
82     -Dgst-python:werror=true
83     -Dgstreamer-vaapi:werror=true
84     -Dgstreamer-sharp:werror=true
85
86 workflow:
87   # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
88   rules:
89     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
90       variables:
91         GIT_FETCH_EXTRA_FLAGS: '--no-tags'
92     - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
93       when: never
94     - if: '$CI_COMMIT_TAG'
95     - if: '$CI_COMMIT_BRANCH'
96       variables:
97         GIT_FETCH_EXTRA_FLAGS: '--no-tags'
98
99 #
100 # Global CI policy
101 #
102 # This can be used to configure global behaviour our our jobs.
103 #
104 default:
105   retry:
106     max: 2
107     when:
108       - 'runner_system_failure'
109       - 'stuck_or_timeout_failure'
110       - 'scheduler_failure'
111       - 'api_failure'
112   interruptible: true
113
114 # This is an empty job that is used to trigger the pipeline.
115 trigger:
116   image: alpine:latest
117   stage: 'trigger'
118   variables:
119     GIT_STRATEGY: none
120   script:
121     - echo "Trigger job done, now running the pipeline."
122   rules:
123     # If the MR is assigned to the Merge bot, trigger the pipeline automatically
124     - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
125     # Require explicit action to trigger tests post merge
126     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
127       when: 'manual'
128     # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
129     # to avoid wasting CI resources
130     - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
131       when: 'manual'
132       allow_failure: false
133
134 .fedora image:
135   variables:
136     FDO_DISTRIBUTION_VERSION: '31'
137     FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
138     FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
139     FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
140
141 fedora amd64 docker:
142   extends:
143     - '.fedora image'
144     - '.fdo.container-build@fedora'
145   stage: 'build docker'
146   needs:
147     - "trigger"
148   tags:
149     - 'packet.net'
150
151 .gst-indent image:
152   variables:
153     FDO_DISTRIBUTION_VERSION: 'stretch'
154     FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
155     FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
156     FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
157     FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
158
159 gst-indent amd64 docker:
160   extends:
161     - '.gst-indent image'
162     - '.fdo.container-build@debian'
163   stage: 'build docker'
164   # Do not depend on the trigger, as we want to run indent always
165   needs: []
166
167 windows amd64 docker:
168   stage: "build docker"
169   needs:
170     - "trigger"
171   timeout: '3h'
172   variables:
173     # Unlike the buildah/linux jobs, this file
174     # needs to be relative to docker/windows/ subdir
175     # as it makes life easier in the powershell script
176     #
177     # We also don't need a CONTEXT_DIR var as its also
178     # hardcoded to be docker/windows/
179     DOCKERFILE: "ci/docker/windows/Dockerfile"
180   tags:
181     - windows
182     - shell
183     - "2022"
184   script:
185     # We need to pass an array and to resolve the env vars, so we can't use a variable:
186     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
187
188     - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
189     - |
190       if (!($?)) {
191         echo "Failed to build the image"
192         Exit 1
193       }
194
195 .windows rust docker build:
196   stage: 'build docker'
197   needs:
198     - job: 'windows amd64 docker'
199       artifacts: false
200   variables:
201     # Unlike the buildah/linux jobs, this file
202     # needs to be relative to docker/windows/ subdir
203     # as it makes life easier in the powershell script
204     #
205     # We also don't need a CONTEXT_DIR var as its also
206     # hardcoded to be docker/windows/
207     DOCKERFILE: 'ci/docker/windows/rust.Dockerfile'
208   tags:
209     - 'windows'
210     - 'shell'
211     - '2022'
212   script:
213     # We need to pass an array and to resolve the env vars, so we can't use a variable:
214     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
215
216     - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
217     - |
218       if (!($?)) {
219         echo "Failed to build the image"
220         Exit 1
221       }
222
223 windows rust amd64 docker latest stable:
224   extends: '.windows rust docker build'
225   variables:
226     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
227     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
228     RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
229
230 windows rust amd64 docker minimum supported version:
231   extends: '.windows rust docker build'
232   variables:
233     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
234     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
235     RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
236
237
238
239 # ---- Preparation ----- #
240 #
241 # gst-indent!!
242 #
243 gst indent:
244   extends:
245     - '.gst-indent image'
246     - '.fdo.suffixed-image@debian'
247   stage: 'preparation'
248   needs:
249     - job: 'gst-indent amd64 docker'
250       artifacts: false
251   script:
252     - ./scripts/check-format-c
253     - ./scripts/format-csharp --check
254   rules:
255     # Don't check indentation on post merge pipelines
256     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
257       when: 'manual'
258     - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
259       when: 'always'
260
261 #
262 # build setup templates
263 #
264 .build_template: &build
265   - ci/scripts/handle-subprojects-cache.py subprojects/
266   # Update subprojects to respect `.wrap` content
267   - meson subprojects update --reset
268   - echo $MESON_ARGS
269   - meson build/ $MESON_ARGS
270   - ninja -C build/
271   - ccache --show-stats
272
273 .build_ccache_vars:
274   variables:
275     CCACHE_COMPILERCHECK: 'content'
276     CCACHE_COMPRESS: 'true'
277     CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
278     CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
279     # shared across everything really
280     CCACHE_MAXSIZE: '10G'
281     CARGO_HOME: '/cache/gstreamer/cargo'
282
283 .base_modules_changes: &modules_changes
284   - .gitlab-ci.yml
285   - gst-env.py
286   - ci/gitlab/*.py
287   - meson.build
288   - subprojects/*.wrap
289   - subprojects/gst-devtools/**/*
290   - subprojects/gst-editing-services/**/*
291   - subprojects/gst-integration-testsuites/**/*
292   - subprojects/gst-libav/**/*
293   - subprojects/gst-omx/**/*
294   - subprojects/gst-plugins-bad/**/*
295   - subprojects/gst-plugins-base/**/*
296   - subprojects/gst-plugins-good/**/*
297   - subprojects/gst-plugins-ugly/**/*
298   - subprojects/gst-python/**/*
299   - subprojects/gstreamer/**/*
300   - subprojects/gstreamer-sharp/**/*
301   - subprojects/gstreamer-vaapi/**/*
302   - subprojects/gst-rtsp-server/**/*
303
304 .simple_fedora_build: &simple_build >-
305   ${DEFAULT_MESON_ARGS}
306   -Dsharp=enabled
307   -Domx=enabled
308   -Dgst-omx:target=generic
309   -Ddoc=disabled
310   -Drs=disabled
311   ${MESON_BUILDTYPE_ARGS}
312   ${MESON_GST_WERROR}
313
314 .build:
315   stage: 'build'
316   extends:
317     - '.build_ccache_vars'
318   needs:
319     - "trigger"
320   # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
321   # Also need to take into account I/O of pulling docker images and uploading artifacts
322   timeout: '45min'
323   variables:
324     MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
325   script:
326     *build
327   after_script:
328     - mv build/meson-logs/ meson-logs
329   artifacts:
330     expire_in: "7 days"
331     when: "always"
332     paths:
333       - 'meson-logs/'
334   rules:
335     # If this matches, it means the pipeline is running against either the main
336     # or a stable branch, so make it manual
337     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
338       when: manual
339     - changes:
340         *modules_changes
341
342 .build fedora x86_64:
343   extends:
344     - '.fedora image'
345     - '.fdo.suffixed-image@fedora'
346     - '.build'
347   needs:
348     - "fedora amd64 docker"
349   variables:
350     MESON_ARGS: *simple_build
351
352 build nodebug fedora x86_64:
353   extends:
354     - '.fedora image'
355     - '.fdo.suffixed-image@fedora'
356     - '.build'
357   needs:
358     - "fedora amd64 docker"
359   variables:
360     MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
361
362 build clang fedora x86_64:
363   extends: '.build fedora x86_64'
364   variables:
365     CC: 'ccache clang'
366     CXX: 'ccache clang++'
367
368 .build windows:
369   image: $WINDOWS_IMAGE
370   stage: 'build'
371   tags:
372     - 'docker'
373     - 'windows'
374     - '2022'
375   needs:
376     - "windows amd64 docker"
377   timeout: '45min'
378   variables:
379     MESON_ARGS: >
380       ${DEFAULT_MESON_ARGS}
381       -Dpython=disabled
382       -Dlibav=disabled
383       -Dvaapi=disabled
384       -Dgst-plugins-base:pango=enabled
385       -Dgst-plugins-good:cairo=enabled
386     # Needs to not be empty otherwise the newline -> space replace command in
387     # `script:` will fail
388     MESON_CROSS_ARGS: ' '
389   rules:
390     # If this matches, it means the pipeline is running against either the main
391     # or a stable branch, so make it manual
392     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
393       when: manual
394     - changes:
395         *modules_changes
396   script:
397     # Make sure powershell exits on errors
398     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
399     - $ErrorActionPreference = "Stop"
400
401     # Set the code page to UTF-8
402     - chcp 65001
403
404     - ci/scripts/handle-subprojects-cache.py subprojects/
405     # For some reason, options are separated by newline instead of space, so we
406     # have to replace them first.
407     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
408     - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
409     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
410         meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
411         ninja -C build"
412   # XXX: Re-enable when uploading stops timing out
413   #artifacts:
414   #  expire_in: "7 days"
415   #  when: "always"
416   #  paths:
417   #    - 'build/meson-logs/'
418   #    - 'vslogs.zip'
419
420 build vs2019 amd64:
421   extends: '.build windows'
422   variables:
423     ARCH: 'amd64'
424
425 build vs2019 x86:
426   extends: '.build windows'
427   variables:
428     ARCH: 'x86'
429
430 build vs2019 arm64 uwp:
431   extends: '.build windows'
432   variables:
433     ARCH: 'arm64'
434     # pango pulls in cairo which pulls in pixman which doesn't build because of
435     # https://github.com/mesonbuild/meson/issues/9889
436     MESON_CROSS_ARGS: >
437       -Dgst-plugins-base:pango=disabled
438       -Dgst-plugins-good:cairo=disabled
439       -Dgst-devtools:cairo=disabled
440       --cross-file ci/meson/vs2019-arm64-cross-file.txt
441       --native-file ci/meson/vs2019-x64-native-file.txt
442
443 build msys2 :
444   extends: '.build windows'
445   timeout: '60min'
446   rules:
447     - changes:
448         *modules_changes
449       allow_failure: true
450       when: 'manual'
451   script:
452     # Make sure powershell exits on errors
453     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
454     - $ErrorActionPreference = "Stop"
455
456     # Set the code page to UTF-8
457     - chcp 65001
458
459     # Configure MSYS2 to use the UCRT64 environment, start in the same directory
460     # and inherit PATH
461     - $env:MSYSTEM = "UCRT64"
462     - $env:CHERE_INVOKING = "1"
463     - $env:MSYS2_PATH_TYPE = "inherit"
464     # For some reason, options are separated by newline instead of space, so we
465     # have to replace them first.
466     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
467     # Replace forward slashes with backwards so bash doesn't complain
468     - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
469     - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
470
471 # ---- Tests ----- #
472
473 .test:
474   stage: 'test'
475   extends:
476     - '.build_ccache_vars'
477   needs:
478     - "trigger"
479   variables:
480     MESON_ARGS: *simple_build
481
482     # Disable colored output to avoid weird rendering issues
483     GST_DEBUG_NO_COLOR: "true"
484     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
485     GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
486     TIMEOUT_FACTOR: "2"
487     CARGO_HOME: "/cache/gstreamer/cargo"
488     # Enable the fault handler so we get backtraces on segfaults.
489     # any non-empty string will do
490     PYTHONFAULTHANDLER: "enabled"
491   rules:
492     - changes:
493         *modules_changes
494   script:
495     - *build
496
497     - echo "-> Running ${TEST_SUITE}"
498     - >
499       ./gst-env.py
500       gst-validate-launcher ${TEST_SUITE}
501       --check-bugs
502       --dump-on-failure
503       --mute
504       --shuffle
505       --no-display
506       --meson-no-rebuild
507       --timeout-factor "${TIMEOUT_FACTOR}"
508       --fail-on-testlist-change
509       -l "${CI_PROJECT_DIR}/validate-logs/"
510       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
511       ${EXTRA_VALIDATE_ARGS}
512   after_script:
513     - mv build/meson-logs/ meson-logs
514   artifacts:
515     expire_in: '14 days'
516     when: always
517     paths:
518       - 'meson-logs/'
519       - 'validate-logs'
520     reports:
521       junit:
522         - "validate-logs/*.xml"
523
524 .test fedora x86_64:
525   extends:
526     - '.fedora image'
527     - '.fdo.suffixed-image@fedora'
528     - '.test'
529   needs:
530     - "fedora amd64 docker"
531   tags: ['gstreamer']
532
533 check fedora:
534   extends: '.test fedora x86_64'
535   variables:
536     TEST_SUITE: "check.gst*"
537
538 integration testsuites fedora:
539   extends: '.test fedora x86_64'
540   parallel: 4
541   variables:
542     EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
543     TEST_SUITE: "validate ges"
544
545 # gstreamer-full:
546 gstreamer-full static build:
547   extends: '.build fedora x86_64'
548   stage: 'build'
549   variables:
550     MESON_ARGS: >
551       --default-library=static
552       -Ddoc=disabled
553       $MESON_GST_WERROR
554
555   script:
556   - *build
557   - meson test -C build -v test-gst-full
558   artifacts:
559     expire_in: "7 days"
560     when: "always"
561     paths:
562       - 'meson-logs/'
563
564 gstreamer-full-minimal static build:
565   extends: 'gstreamer-full static build'
566   stage: 'build'
567   variables:
568     MESON_ARGS: >
569       --default-library=static
570       -Ddoc=disabled
571       -Dgstreamer:gst_debug=false
572       -Dauto_features=disabled
573       -Dgstreamer:check=enabled
574       -Dtests=enabled
575       -Dgst-plugins-base:alsa=enabled
576       -Dgst-plugins-base:typefind=enabled
577       -Dgst-plugins-base:pbtypes=enabled
578       -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
579       -Dgst-full-typefind-functions=typefindfunctions:wav,flv
580       -Dgst-full-device-providers=alsa:alsadeviceprovider
581       -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
582       $MESON_GST_WERROR
583
584   script:
585   - *build
586   - meson test -C build -v test-gst-full
587   - meson test -C build test-gst-full-features --test-args "-e filesrc,identity,fakesink -E filesink,capsfilter -t audio/x-wav -T video/vivo -d alsadeviceprovider -D v4l2deviceprovider -l GstVideoMultiviewFlagsSet"
588   - strip build/libgstreamer-full-1.0.so
589   - ls -l build/libgstreamer-full-1.0.so
590   artifacts:
591     expire_in: "7 days"
592     when: "always"
593     paths:
594       - 'meson-logs/'
595
596 # Valgrind
597 .valgrind fedora x86_64:
598   extends: '.test fedora x86_64'
599   stage: 'test'
600   variables:
601     EXTRA_VALIDATE_ARGS: "--valgrind"
602
603 valgrind core:
604   extends: '.valgrind fedora x86_64'
605   variables:
606     TEST_SUITE: "check.gstreamer\\..*"
607   rules:
608     - changes:
609       - "*"
610       - scripts/*
611       - ci/**/*
612       - subprojects/gst-devtools/**/*
613       - subprojects/gstreamer/**/*
614
615 valgrind base:
616   extends: '.valgrind fedora x86_64'
617   variables:
618     TEST_SUITE: "check.gst-plugins-base\\..*"
619   rules:
620     - changes:
621       - "*"
622       - scripts/*
623       - ci//**/*
624       - subprojects/gst-devtools/**/*
625       - subprojects/gstreamer/**/*
626       - subprojects/gst-plugins-base/**/*
627
628 valgrind good:
629   extends: '.valgrind fedora x86_64'
630   variables:
631     TEST_SUITE: "check.gst-plugins-good\\..*"
632     # take longer time due to splitmux unit test
633     TIMEOUT_FACTOR: "4"
634   rules:
635     - changes:
636       - "*"
637       - scripts/*
638       - ci/**/*
639       - subprojects/gst-devtools/**/*
640       - subprojects/gstreamer/**/*
641       - subprojects/gst-plugins-base/**/*
642       - subprojects/gst-plugins-good/**/*
643
644 valgrind ugly:
645   extends: '.valgrind fedora x86_64'
646   variables:
647     TEST_SUITE: "check.gst-plugins-ugly\\..*"
648   rules:
649     - changes:
650       - "*"
651       - scripts/*
652       - ci/**/*
653       - subprojects/gst-devtools/**/*
654       - subprojects/gstreamer/**/*
655       - subprojects/gst-plugins-base/**/*
656       - subprojects/gst-plugins-good/**/*
657       - subprojects/gst-plugins-ugly/**/*
658
659 valgrind bad:
660   extends: '.valgrind fedora x86_64'
661   variables:
662     TEST_SUITE: "check.gst-plugins-bad\\..*"
663   rules:
664     - changes:
665       - "*"
666       - scripts/*
667       - ci/**/*
668       - subprojects/gst-devtools/**/*
669       - subprojects/gstreamer/**/*
670       - subprojects/gst-plugins-base/**/*
671       - subprojects/gst-plugins-good/**/*
672       - subprojects/gst-plugins-bad/**/*
673
674 valgrind ges:
675   extends: '.valgrind fedora x86_64'
676   variables:
677     TEST_SUITE: "check.gst-editing-services\\..*"
678   rules:
679     - changes:
680       - "*"
681       - scripts/*
682       - ci/**/*
683       - subprojects/gst-devtools/**/*
684       - subprojects/gstreamer/**/*
685       - subprojects/gst-plugins-base/**/*
686       - subprojects/gst-plugins-good/**/*
687       - subprojects/gst-plugins-bad/**/*
688       - subprojects/gst-editing-services/**/*
689       - subprojects/gst-python/**/*
690
691 # ---- Integration ----- #
692
693 .documentation:
694   image: $FEDORA_DOCS_IMAGE
695   extends:
696     - '.build_ccache_vars'
697   variables:
698     MESON_ARGS: *simple_build
699     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
700     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
701   script:
702   # FIXME: should rebuild the image with newer versions!
703   - pip3 install --upgrade hotdoc
704   - pip3 install --upgrade meson
705   - *build
706   - ./gst-env.py ninja -C build/ plugins_doc_caches
707   # Ignore modifications to wrap files made by meson
708   - git checkout subprojects/*.wrap
709   - ./ci/scripts/check-documentation-diff.py
710   - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
711   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
712
713   artifacts:
714     when: always
715     expire_in: "7 days"
716     paths:
717     - documentation/
718     - plugins-cache-diffs/
719
720 #
721 # This jobs runs in gstreamer namespace when after the merge into main branch.
722 # The produced artifact is later used to automatically update the web page.
723 #
724 documentation:
725   stage: integrate
726   extends:
727     - '.documentation'
728   needs: []
729   rules:
730     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
731
732 #
733 # This job is run in users namespace to validate documentation before merging
734 # MR.
735 #
736 build documentation:
737   extends:
738     - '.documentation'
739   stage: build
740   needs:
741     - "trigger"
742   rules:
743     # Never run post merge, we have the `documentation` always running for that
744     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
745       when: never
746     - changes:
747       - .gitlab-ci.yml
748       - ci/gitlab/*.py
749       - subprojects/*.wrap
750       - subprojects/gst-docs/**/*
751       - subprojects/gst-devtools/**/*
752       - subprojects/gst-editing-services/**/*
753       - subprojects/gst-libav/**/*
754       - subprojects/gst-omx/**/*
755       - subprojects/gst-plugins-bad/**/*
756       - subprojects/gst-plugins-base/**/*
757       - subprojects/gst-plugins-good/**/*
758       - subprojects/gst-plugins-ugly/**/*
759       - subprojects/gstreamer/**/*
760       - subprojects/gstreamer-vaapi/**/*
761       - subprojects/gst-rtsp-server/**/*
762
763 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
764 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
765 cerbero trigger:
766   stage: build
767   timeout: '3h'
768   tags:
769     - placeholder-job
770   extends:
771     - '.fedora image'
772     - '.fdo.suffixed-image@fedora'
773   needs:
774     - "fedora amd64 docker"
775   script:
776     - ci/gitlab/trigger_cerbero_pipeline.py
777
778   rules:
779     # Never run post merge
780     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
781       when: never
782     - changes:
783       - .gitlab-ci.yml
784       - ci/gitlab/*.py
785       - subprojects/gst-devtools/**/*
786       - subprojects/gst-editing-services/**/*
787       - subprojects/gst-libav/**/*
788       - subprojects/gst-plugins-bad/**/*
789       - subprojects/gst-plugins-base/**/*
790       - subprojects/gst-plugins-good/**/*
791       - subprojects/gst-plugins-ugly/**/*
792       - subprojects/gst-python/**/*
793       - subprojects/gstreamer/**/*
794       - subprojects/gst-rtsp-server/**/*
795       - subprojects/gst-examples/**/*