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