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