subprojects: update glib-networking to 2.74.0 and switch to file wrap
[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: 'main'
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       --check-bugs
476       --dump-on-failure
477       --mute
478       --shuffle
479       --no-display
480       --meson-no-rebuild
481       --timeout-factor "${TIMEOUT_FACTOR}"
482       --fail-on-testlist-change
483       -l "${CI_PROJECT_DIR}/validate-logs/"
484       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
485       ${EXTRA_VALIDATE_ARGS}
486   after_script:
487     - mv build/meson-logs/ meson-logs
488   artifacts:
489     expire_in: '14 days'
490     when: always
491     paths:
492       - 'meson-logs/'
493       - 'validate-logs'
494     reports:
495       junit:
496         - "validate-logs/*.xml"
497
498 .test fedora x86_64:
499   extends:
500     - '.fedora image'
501     - '.fdo.suffixed-image@fedora'
502     - '.test'
503   needs:
504     - "trigger"
505     - "fedora amd64 docker"
506   tags: ['gstreamer']
507
508 check fedora:
509   extends: '.test fedora x86_64'
510   variables:
511     TEST_SUITE: "check.gst*"
512
513 integration testsuites fedora:
514   extends: '.test fedora x86_64'
515   parallel: 8
516   variables:
517     EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
518     TEST_SUITE: "validate ges"
519
520 # gstreamer-full:
521 gstreamer-full static build:
522   extends: '.build fedora x86_64'
523   stage: 'build'
524   variables:
525     MESON_ARGS: >
526       --default-library=static
527       -Ddoc=disabled
528       $MESON_GST_WERROR
529
530   script:
531   - *build
532   - meson test -C build -v test-gst-full
533   artifacts:
534     expire_in: "7 days"
535     when: "always"
536     paths:
537       - 'meson-logs/'
538
539 gstreamer-full-minimal static build:
540   extends: 'gstreamer-full static build'
541   stage: 'build'
542   variables:
543     MESON_ARGS: >
544       --default-library=static
545       -Ddoc=disabled
546       -Dgstreamer:gst_debug=false
547       -Dauto_features=disabled
548       -Dgstreamer:check=enabled
549       -Dtests=enabled
550       -Dgst-plugins-base:alsa=enabled
551       -Dgst-plugins-base:typefind=enabled
552       -Dgst-plugins-base:pbtypes=enabled
553       -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
554       -Dgst-full-typefind-functions=typefindfunctions:wav,flv
555       -Dgst-full-device-providers=alsa:alsadeviceprovider
556       -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
557       $MESON_GST_WERROR
558
559   script:
560   - *build
561   - meson test -C build -v test-gst-full
562   - 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"
563   - strip build/libgstreamer-full-1.0.so
564   - ls -l build/libgstreamer-full-1.0.so
565   artifacts:
566     expire_in: "7 days"
567     when: "always"
568     paths:
569       - 'meson-logs/'
570
571 # Valgrind
572 .valgrind fedora x86_64:
573   extends: '.test fedora x86_64'
574   stage: 'test'
575   variables:
576     EXTRA_VALIDATE_ARGS: "--valgrind"
577
578 valgrind core:
579   extends: '.valgrind fedora x86_64'
580   variables:
581     TEST_SUITE: "check.gstreamer\\..*"
582   rules:
583     - changes:
584       - "*"
585       - scripts/*
586       - ci/**/*
587       - subprojects/gst-devtools/**/*
588       - subprojects/gstreamer/**/*
589
590 valgrind base:
591   extends: '.valgrind fedora x86_64'
592   variables:
593     TEST_SUITE: "check.gst-plugins-base\\..*"
594   rules:
595     - changes:
596       - "*"
597       - scripts/*
598       - ci//**/*
599       - subprojects/gst-devtools/**/*
600       - subprojects/gstreamer/**/*
601       - subprojects/gst-plugins-base/**/*
602
603 valgrind good:
604   extends: '.valgrind fedora x86_64'
605   variables:
606     TEST_SUITE: "check.gst-plugins-good\\..*"
607     # take longer time due to splitmux unit test
608     TIMEOUT_FACTOR: "4"
609   rules:
610     - changes:
611       - "*"
612       - scripts/*
613       - ci/**/*
614       - subprojects/gst-devtools/**/*
615       - subprojects/gstreamer/**/*
616       - subprojects/gst-plugins-base/**/*
617       - subprojects/gst-plugins-good/**/*
618
619 valgrind ugly:
620   extends: '.valgrind fedora x86_64'
621   variables:
622     TEST_SUITE: "check.gst-plugins-ugly\\..*"
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       - subprojects/gst-plugins-ugly/**/*
633
634 valgrind bad:
635   extends: '.valgrind fedora x86_64'
636   variables:
637     TEST_SUITE: "check.gst-plugins-bad\\..*"
638   rules:
639     - changes:
640       - "*"
641       - scripts/*
642       - ci/**/*
643       - subprojects/gst-devtools/**/*
644       - subprojects/gstreamer/**/*
645       - subprojects/gst-plugins-base/**/*
646       - subprojects/gst-plugins-good/**/*
647       - subprojects/gst-plugins-bad/**/*
648
649 valgrind ges:
650   extends: '.valgrind fedora x86_64'
651   variables:
652     TEST_SUITE: "check.gst-editing-services\\..*"
653   rules:
654     - changes:
655       - "*"
656       - scripts/*
657       - ci/**/*
658       - subprojects/gst-devtools/**/*
659       - subprojects/gstreamer/**/*
660       - subprojects/gst-plugins-base/**/*
661       - subprojects/gst-plugins-good/**/*
662       - subprojects/gst-plugins-bad/**/*
663       - subprojects/gst-editing-services/**/*
664       - subprojects/gst-python/**/*
665
666 # ---- Integration ----- #
667
668 .documentation:
669   extends: '.build fedora x86_64'
670   variables:
671     MESON_ARGS: *simple_build
672     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
673     # Disable werror for the docs build, we don't need it
674     MESON_GST_WERROR: ''
675     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
676   script:
677   - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
678   - export RUSTUP_HOME='/usr/local/rustup'
679
680   - ci/scripts/handle-subprojects-cache.py subprojects/
681   - echo $MESON_ARGS
682   - meson build/ $MESON_ARGS
683   - ccache --show-stats
684
685   - ./gst-env.py ninja -C build/ plugins_doc_caches
686   # Ignore modifications to wrap files made by meson
687   - git checkout subprojects/*.wrap
688   - ./ci/scripts/check-documentation-diff.py
689
690   - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
691   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
692
693   artifacts:
694     when: always
695     expire_in: "7 days"
696     paths:
697     - documentation/
698     - plugins-cache-diffs/
699
700 #
701 # This jobs runs in gstreamer namespace when after the merge into main branch.
702 # The produced artifact is later used to automatically update the web page.
703 #
704 documentation:
705   stage: integrate
706   extends:
707     - '.documentation'
708   needs:
709     - "fedora amd64 docker"
710   rules:
711     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
712
713 #
714 # This job is run in users namespace to validate documentation before merging
715 # MR.
716 #
717 build documentation:
718   extends:
719     - '.documentation'
720   stage: build
721   needs:
722     - "trigger"
723     - "fedora amd64 docker"
724   rules:
725     # Never run post merge, we have the `documentation` always running for that
726     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
727       when: never
728     - changes:
729       - .gitlab-ci.yml
730       - ci/gitlab/*.py
731       - subprojects/*.wrap
732       - subprojects/gst-docs/**/*
733       - subprojects/gst-devtools/**/*
734       - subprojects/gst-editing-services/**/*
735       - subprojects/gst-libav/**/*
736       - subprojects/gst-omx/**/*
737       - subprojects/gst-plugins-bad/**/*
738       - subprojects/gst-plugins-base/**/*
739       - subprojects/gst-plugins-good/**/*
740       - subprojects/gst-plugins-ugly/**/*
741       - subprojects/gstreamer/**/*
742       - subprojects/gstreamer-vaapi/**/*
743       - subprojects/gst-rtsp-server/**/*
744
745 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
746 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
747 cerbero trigger:
748   stage: build
749   timeout: '4h'
750   tags:
751     - placeholder-job
752   extends:
753     - '.fedora image'
754     - '.fdo.suffixed-image@fedora'
755   needs:
756     - "trigger"
757     - "fedora amd64 docker"
758   script:
759     - ci/gitlab/trigger_cerbero_pipeline.py
760
761   rules:
762     # Never run post merge
763     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
764       when: never
765     - changes:
766       - .gitlab-ci.yml
767       - ci/gitlab/*.py
768       - subprojects/gst-devtools/**/*
769       - subprojects/gst-editing-services/**/*
770       - subprojects/gst-libav/**/*
771       - subprojects/gst-plugins-bad/**/*
772       - subprojects/gst-plugins-base/**/*
773       - subprojects/gst-plugins-good/**/*
774       - subprojects/gst-plugins-ugly/**/*
775       - subprojects/gst-python/**/*
776       - subprojects/gstreamer/**/*
777       - subprojects/gst-rtsp-server/**/*
778       - subprojects/gst-examples/**/*