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