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