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