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