ci: stop automatically running tests post-merge
[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     # Require explicit action to trigger tests post merge
127     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
128       when: 'manual'
129     # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
130     # to avoid wasting CI resources
131     - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
132       when: 'manual'
133       allow_failure: false
134
135 .fedora image:
136   variables:
137     FDO_DISTRIBUTION_VERSION: '31'
138     FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
139     FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
140     FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
141
142 fedora amd64 docker:
143   extends:
144     - '.fedora image'
145     - '.fdo.container-build@fedora'
146   stage: 'build docker'
147   needs:
148     - "trigger"
149   tags:
150     - 'packet.net'
151
152 .gst-indent image:
153   variables:
154     FDO_DISTRIBUTION_VERSION: 'stretch'
155     FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
156     FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
157     FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
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     - "1809"
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   rules:
201     - if: '$CI_PROJECT_NAME == "gst-ci"'
202   variables:
203     # Unlike the buildah/linux jobs, this file
204     # needs to be relative to docker/windows/ subdir
205     # as it makes life easier in the powershell script
206     #
207     # We also don't need a CONTEXT_DIR var as its also
208     # hardcoded to be docker/windows/
209     DOCKERFILE: 'docker/windows/rust.Dockerfile'
210   tags:
211     - 'windows'
212     - 'shell'
213     - '1809'
214   script:
215     # We need to pass an array and to resolve the env vars, so we can't use a variable:
216     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
217
218     - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
219     - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
220     - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
221
222     - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
223     - |
224       if (!($?)) {
225         echo "Failed to build the image"
226         Exit 1
227       }
228
229 windows rust amd64 docker latest stable:
230   extends: '.windows rust docker build'
231   variables:
232     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
233     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
234     RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
235
236 windows rust amd64 docker minimum supported version:
237   extends: '.windows rust docker build'
238   variables:
239     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
240     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
241     RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
242
243
244
245 # ---- Preparation ----- #
246 #
247 # gst-indent!!
248 #
249 gst indent:
250   extends:
251     - '.gst-indent image'
252     - '.fdo.suffixed-image@debian'
253   stage: 'preparation'
254   needs:
255     - job: 'gst-indent amd64 docker'
256       artifacts: false
257   script:
258     # man indent. grep RETURN VALUE, grab a beer on my behalf...
259     - indent --version || true
260     - ./scripts/gst-indent-all
261     - |
262       if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
263           echo "Code is properly formatted"
264       else
265           git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
266           echo 'style diverges, please run gst-indent first'
267           exit 1
268       fi
269
270 #
271 # build setup templates
272 #
273 .build_template: &build
274   - ci/scripts/handle-subprojects-cache.py subprojects/
275   # Update subprojects to respect `.wrap` content
276   - meson subprojects update --reset
277   - echo $MESON_ARGS
278   - meson build/ $MESON_ARGS
279   - ninja -C build/
280   - ccache --show-stats
281
282 .build_ccache_vars:
283   variables:
284     CCACHE_COMPILERCHECK: 'content'
285     CCACHE_COMPRESS: 'true'
286     CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
287     CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
288     # shared across everything really
289     CCACHE_MAXSIZE: '10G'
290     CARGO_HOME: '/cache/gstreamer/cargo'
291
292 .base_modules_changes: &modules_changes
293   - .gitlab-ci.yml
294   - ci/gitlab/*.py
295   - meson.build
296   - subprojects/*.wrap
297   - subprojects/gst-devtools/**/*
298   - subprojects/gst-editing-services/**/*
299   - subprojects/gst-integration-testsuites/**/*
300   - subprojects/gst-libav/**/*
301   - subprojects/gst-omx/**/*
302   - subprojects/gst-plugins-bad/**/*
303   - subprojects/gst-plugins-base/**/*
304   - subprojects/gst-plugins-good/**/*
305   - subprojects/gst-plugins-ugly/**/*
306   - subprojects/gst-python/**/*
307   - subprojects/gstreamer/**/*
308   - subprojects/gstreamer-sharp/**/*
309   - subprojects/gstreamer-vaapi/**/*
310   - subprojects/gst-rtsp-server/**/*
311
312 .simple_fedora_build: &simple_build >-
313   ${DEFAULT_MESON_ARGS}
314   -Dsharp=enabled
315   -Domx=enabled
316   -Dgst-omx:target=generic
317   -Ddoc=disabled
318   -Drs=disabled
319   ${MESON_BUILDTYPE_ARGS}
320   ${MESON_GST_WERROR}
321
322 .build:
323   stage: 'build'
324   extends:
325     - '.build_ccache_vars'
326   needs:
327     - "trigger"
328   # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
329   # Also need to take into account I/O of pulling docker images and uploading artifacts
330   timeout: '45min'
331   variables:
332     MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
333   script:
334     *build
335   after_script:
336     - mv build/meson-logs/ meson-logs
337   artifacts:
338     expire_in: "7 days"
339     when: "always"
340     paths:
341       - 'meson-logs/'
342   rules:
343     # If this matches, it means the pipeline is running against either the main
344     # or a stable branch, so make it manual
345     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
346       when: manual
347     - changes:
348         *modules_changes
349
350 .build fedora x86_64:
351   extends:
352     - '.fedora image'
353     - '.fdo.suffixed-image@fedora'
354     - '.build'
355   needs:
356     - "fedora amd64 docker"
357   variables:
358     MESON_ARGS: *simple_build
359
360 build nodebug fedora x86_64:
361   extends:
362     - '.fedora image'
363     - '.fdo.suffixed-image@fedora'
364     - '.build'
365   needs:
366     - "fedora amd64 docker"
367   variables:
368     MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
369
370 build clang fedora x86_64:
371   extends: '.build fedora x86_64'
372   variables:
373     CC: 'ccache clang'
374     CXX: 'ccache clang++'
375
376 .build windows:
377   image: $WINDOWS_IMAGE
378   stage: 'build'
379   tags:
380     - 'docker'
381     - 'windows'
382     - '1809'
383   needs:
384     - "windows amd64 docker"
385   timeout: '45min'
386   variables:
387     MESON_ARGS: >
388       ${DEFAULT_MESON_ARGS}
389       -Dpython=disabled
390       -Dlibav=disabled
391       -Dvaapi=disabled
392       -Dgst-plugins-base:pango=enabled
393       -Dgst-plugins-good:cairo=enabled
394     # Needs to not be empty otherwise the newline -> space replace command in
395     # `script:` will fail
396     MESON_CROSS_ARGS: ' '
397   rules:
398     # If this matches, it means the pipeline is running against either the main
399     # or a stable branch, so make it manual
400     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
401       when: manual
402     - changes:
403         *modules_changes
404   script:
405     - ci/scripts/handle-subprojects-cache.py subprojects/
406     # For some reason, options are separated by newline instead of space, so we
407     # have to replace them first.
408     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
409     - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
410     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
411         meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
412         ninja -C build"
413   # XXX: Re-enable when uploading stops timing out
414   #artifacts:
415   #  expire_in: "7 days"
416   #  when: "always"
417   #  paths:
418   #    - 'build/meson-logs/'
419   #    - 'vslogs.zip'
420
421 build vs2019 amd64:
422   extends: '.build windows'
423   variables:
424     ARCH: 'amd64'
425
426 build vs2019 x86:
427   extends: '.build windows'
428   variables:
429     ARCH: 'x86'
430
431 build vs2019 arm64 uwp:
432   extends: '.build windows'
433   variables:
434     ARCH: 'arm64'
435     # pango pulls in cairo which pulls in pixman which doesn't build because of
436     # https://github.com/mesonbuild/meson/issues/9889
437     MESON_CROSS_ARGS: >
438       -Dgst-plugins-base:pango=disabled
439       -Dgst-plugins-good:cairo=disabled
440       -Dgst-devtools:cairo=disabled
441       --cross-file ci/meson/vs2019-arm64-cross-file.txt
442       --native-file ci/meson/vs2019-x64-native-file.txt
443
444 build msys2 :
445   extends: '.build windows'
446   timeout: '60min'
447   rules:
448     - changes:
449         *modules_changes
450       allow_failure: true
451       when: 'manual'
452   script:
453     # Make sure powershell exits on errors
454     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
455     - $ErrorActionPreference = "Stop"
456
457     # Configure MSYS2 to use the UCRT64 environment, start in the same directory
458     # and inherit PATH
459     - $env:MSYSTEM = "UCRT64"
460     - $env:CHERE_INVOKING = "1"
461     - $env:MSYS2_PATH_TYPE = "inherit"
462     # For some reason, options are separated by newline instead of space, so we
463     # have to replace them first.
464     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
465     # Replace forward slashes with backwards so bash doesn't complain
466     - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
467     - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
468
469 # ---- Tests ----- #
470
471 .test:
472   stage: 'test'
473   extends:
474     - '.build_ccache_vars'
475   needs:
476     - "trigger"
477   variables:
478     MESON_ARGS: *simple_build
479
480     # Disable colored output to avoid weird rendering issues
481     GST_DEBUG_NO_COLOR: "true"
482     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
483     GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
484     TIMEOUT_FACTOR: "2"
485     CARGO_HOME: "/cache/gstreamer/cargo"
486     # Enable the fault handler so we get backtraces on segfaults.
487     # any non-empty string will do
488     PYTHONFAULTHANDLER: "enabled"
489   rules:
490     - changes:
491         *modules_changes
492   script:
493     - *build
494
495     - echo "-> Running ${TEST_SUITE}"
496     - >
497       ./gst-env.py
498       gst-validate-launcher ${TEST_SUITE}
499       --check-bugs
500       --dump-on-failure
501       --mute
502       --shuffle
503       --no-display
504       --meson-no-rebuild
505       --timeout-factor "${TIMEOUT_FACTOR}"
506       --fail-on-testlist-change
507       -l "${CI_PROJECT_DIR}/validate-logs/"
508       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
509       ${EXTRA_VALIDATE_ARGS}
510   after_script:
511     - mv build/meson-logs/ meson-logs
512   artifacts:
513     expire_in: '14 days'
514     when: always
515     paths:
516       - 'meson-logs/'
517       - 'validate-logs'
518     reports:
519       junit:
520         - "validate-logs/*.xml"
521
522 .test fedora x86_64:
523   extends:
524     - '.fedora image'
525     - '.fdo.suffixed-image@fedora'
526     - '.test'
527   needs:
528     - "fedora amd64 docker"
529   tags: ['gstreamer']
530
531 check fedora:
532   extends: '.test fedora x86_64'
533   variables:
534     TEST_SUITE: "check.gst*"
535
536 integration testsuites fedora:
537   extends: '.test fedora x86_64'
538   parallel: 4
539   variables:
540     EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
541     TEST_SUITE: "validate ges"
542
543 # gstreamer-full:
544 gstreamer-full static build:
545   extends: '.build fedora x86_64'
546   stage: 'build'
547   variables:
548     MESON_ARGS: >
549       --default-library=static
550       -Ddoc=disabled
551       $MESON_GST_WERROR
552
553   script:
554   - *build
555   - meson test -C build -v test-gst-full
556   artifacts:
557     expire_in: "7 days"
558     when: "always"
559     paths:
560       - 'meson-logs/'
561
562 gstreamer-full-minimal static build:
563   extends: 'gstreamer-full static build'
564   stage: 'build'
565   variables:
566     MESON_ARGS: >
567       --default-library=static
568       -Ddoc=disabled
569       -Dgstreamer:gst_debug=false
570       -Dauto_features=disabled
571       -Dgstreamer:check=enabled
572       -Dtests=enabled
573       -Dgst-plugins-base:alsa=enabled
574       -Dgst-plugins-base:typefind=enabled
575       -Dgst-plugins-base:pbtypes=enabled
576       -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
577       -Dgst-full-typefind-functions=typefindfunctions:wav,flv
578       -Dgst-full-device-providers=alsa:alsadeviceprovider
579       -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
580       $MESON_GST_WERROR
581
582   script:
583   - *build
584   - meson test -C build -v test-gst-full
585   - 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"
586   - strip build/libgstreamer-full-1.0.so
587   - ls -l build/libgstreamer-full-1.0.so
588   artifacts:
589     expire_in: "7 days"
590     when: "always"
591     paths:
592       - 'meson-logs/'
593
594 # Valgrind
595 .valgrind fedora x86_64:
596   extends: '.test fedora x86_64'
597   stage: 'test'
598   variables:
599     EXTRA_VALIDATE_ARGS: "--valgrind"
600
601 valgrind core:
602   extends: '.valgrind fedora x86_64'
603   variables:
604     TEST_SUITE: "check.gstreamer\\..*"
605   rules:
606     - changes:
607       - "*"
608       - scripts/*
609       - ci/**/*
610       - subprojects/gst-devtools/**/*
611       - subprojects/gstreamer/**/*
612
613 valgrind base:
614   extends: '.valgrind fedora x86_64'
615   variables:
616     TEST_SUITE: "check.gst-plugins-base\\..*"
617   rules:
618     - changes:
619       - "*"
620       - scripts/*
621       - ci//**/*
622       - subprojects/gst-devtools/**/*
623       - subprojects/gstreamer/**/*
624       - subprojects/gst-plugins-base/**/*
625
626 valgrind good:
627   extends: '.valgrind fedora x86_64'
628   variables:
629     TEST_SUITE: "check.gst-plugins-good\\..*"
630     # take longer time due to splitmux unit test
631     TIMEOUT_FACTOR: "4"
632   rules:
633     - changes:
634       - "*"
635       - scripts/*
636       - ci/**/*
637       - subprojects/gst-devtools/**/*
638       - subprojects/gstreamer/**/*
639       - subprojects/gst-plugins-base/**/*
640       - subprojects/gst-plugins-good/**/*
641
642 valgrind ugly:
643   extends: '.valgrind fedora x86_64'
644   variables:
645     TEST_SUITE: "check.gst-plugins-ugly\\..*"
646   rules:
647     - changes:
648       - "*"
649       - scripts/*
650       - ci/**/*
651       - subprojects/gst-devtools/**/*
652       - subprojects/gstreamer/**/*
653       - subprojects/gst-plugins-base/**/*
654       - subprojects/gst-plugins-good/**/*
655       - subprojects/gst-plugins-ugly/**/*
656
657 valgrind bad:
658   extends: '.valgrind fedora x86_64'
659   variables:
660     TEST_SUITE: "check.gst-plugins-bad\\..*"
661   rules:
662     - changes:
663       - "*"
664       - scripts/*
665       - ci/**/*
666       - subprojects/gst-devtools/**/*
667       - subprojects/gstreamer/**/*
668       - subprojects/gst-plugins-base/**/*
669       - subprojects/gst-plugins-good/**/*
670       - subprojects/gst-plugins-bad/**/*
671
672 valgrind ges:
673   extends: '.valgrind fedora x86_64'
674   variables:
675     TEST_SUITE: "check.gst-editing-services\\..*"
676   rules:
677     - changes:
678       - "*"
679       - scripts/*
680       - ci/**/*
681       - subprojects/gst-devtools/**/*
682       - subprojects/gstreamer/**/*
683       - subprojects/gst-plugins-base/**/*
684       - subprojects/gst-plugins-good/**/*
685       - subprojects/gst-plugins-bad/**/*
686       - subprojects/gst-editing-services/**/*
687       - subprojects/gst-python/**/*
688
689 # ---- Integration ----- #
690
691 .documentation:
692   image: $FEDORA_DOCS_IMAGE
693   extends:
694     - '.build_ccache_vars'
695   variables:
696     MESON_ARGS: *simple_build
697     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
698     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
699   script:
700   # FIXME: should rebuild the image with newer versions!
701   - pip3 install --upgrade hotdoc
702   - pip3 install --upgrade meson
703   - *build
704   - ./gst-env.py ninja -C build/ plugins_doc_caches
705   # Ignore modifications to wrap files made by meson
706   - git checkout subprojects/*.wrap
707   - ./ci/scripts/check-documentation-diff.py
708   - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
709   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
710
711   artifacts:
712     when: always
713     expire_in: "7 days"
714     paths:
715     - documentation/
716     - plugins-cache-diffs/
717
718 #
719 # This jobs runs in gstreamer namespace when after the merge into main branch.
720 # The produced artifact is later used to automatically update the web page.
721 #
722 documentation:
723   stage: integrate
724   extends:
725     - '.documentation'
726   needs: []
727   rules:
728     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
729
730 #
731 # This job is run in users namespace to validate documentation before merging
732 # MR.
733 #
734 build documentation:
735   extends:
736     - '.documentation'
737   stage: build
738   needs:
739     - "trigger"
740   rules:
741     # Never run post merge, we have the `documentation` always running for that
742     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
743       when: never
744     - changes:
745       - .gitlab-ci.yml
746       - ci/gitlab/*.py
747       - subprojects/*.wrap
748       - subprojects/gst-docs/**/*
749       - subprojects/gst-devtools/**/*
750       - subprojects/gst-editing-services/**/*
751       - subprojects/gst-libav/**/*
752       - subprojects/gst-omx/**/*
753       - subprojects/gst-plugins-bad/**/*
754       - subprojects/gst-plugins-base/**/*
755       - subprojects/gst-plugins-good/**/*
756       - subprojects/gst-plugins-ugly/**/*
757       - subprojects/gstreamer/**/*
758       - subprojects/gstreamer-vaapi/**/*
759       - subprojects/gst-rtsp-server/**/*
760
761 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
762 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
763 cerbero trigger:
764   stage: build
765   timeout: '3h'
766   tags:
767     - placeholder-job
768   extends:
769     - '.fedora image'
770     - '.fdo.suffixed-image@fedora'
771   needs:
772     - "fedora amd64 docker"
773   script:
774     - ci/gitlab/trigger_cerbero_pipeline.py
775
776   rules:
777     # Never run post merge
778     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
779       when: never
780     - changes:
781       - .gitlab-ci.yml
782       - ci/gitlab/*.py
783       - subprojects/gst-devtools/**/*
784       - subprojects/gst-editing-services/**/*
785       - subprojects/gst-libav/**/*
786       - subprojects/gst-plugins-bad/**/*
787       - subprojects/gst-plugins-base/**/*
788       - subprojects/gst-plugins-good/**/*
789       - subprojects/gst-plugins-ugly/**/*
790       - subprojects/gst-python/**/*
791       - subprojects/gstreamer/**/*
792       - subprojects/gst-rtsp-server/**/*
793       - subprojects/gst-examples/**/*