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