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