Revert "ci: Split base and core valgrind on different runners"
[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   # Branch to track for modules that have no ref specified in the manifest
17   GST_UPSTREAM_BRANCH: 'main'
18   ORC_UPSTREAM_BRANCH: 'master'
19
20   ###
21   # IMPORTANT
22   # These are the version tags for the docker images the CI runs against.
23   # If you are hacking on them or need a them to rebuild, its enough
24   # to change any part of the string of the image you want.
25   ###
26   FEDORA_TAG:  '2021-10-05.0'
27   INDENT_TAG: '2021-10-04.0'
28   WINDOWS_TAG: "2021-10-12.0"
29
30   GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
31   FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
32
33   FEDORA_AMD64_SUFFIX:  'amd64/fedora'
34   INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
35   WINDOWS_AMD64_SUFFIX: 'amd64/windows'
36   WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
37
38   FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
39   WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
40   WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
41
42   RUST_MINIMUM_VERSION: '1.54.0'
43   RUST_LATEST_VERSION: '1.55.0'
44
45   WINDOWS_RUST_MINIMUM_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
46   WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
47
48   WINDOWS_RUST_LATEST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
49   WINDOWS_RUST_LATEST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
50
51   MESON_BUILDTYPE_ARGS: --default-library=both
52   DEFAULT_MESON_ARGS: >
53     -Dlibnice:tests=disabled
54     -Dlibnice:examples=disabled
55     -Dopenh264:tests=disabled
56     -Dpygobject:tests=false
57     -Dpython=enabled
58     -Dlibav=enabled
59     -Dugly=enabled
60     -Dbad=enabled
61     -Ddevtools=enabled
62     -Dges=enabled
63     -Drtsp_server=enabled
64     -Dvaapi=enabled
65     -Dsharp=disabled
66     -Dgpl=enabled
67
68   MESON_GST_WERROR: >
69     -Dgstreamer:werror=true
70     -Dgst-plugins-base:werror=true
71     -Dgst-plugins-good:werror=true
72     -Dgst-plugins-ugly:werror=true
73     -Dgst-plugins-bad:werror=true
74     -Dgst-rtsp-server:werror=true
75     -Dgst-libav:werror=true
76     -Dgst-examples:werror=true
77     -Dgst-editing-services:werror=true
78     -Dgst-docs:werror=true
79     -Dgst-omx:werror=true
80     -Dgst-devtools:werror=true
81     -Dgst-python:werror=true
82     -Dgstreamer-vaapi:werror=true
83     -Dgstreamer-sharp:werror=true
84
85 workflow:
86   # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
87   rules:
88     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
89     - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
90       when: never
91     - if: '$CI_COMMIT_BRANCH'
92
93 #
94 # Global CI policy
95 #
96 # This can be used to configure global behaviour our our jobs.
97 #
98 default:
99   retry:
100     max: 2
101     when:
102       - 'runner_system_failure'
103       - 'stuck_or_timeout_failure'
104       - 'scheduler_failure'
105       - 'api_failure'
106   interruptible: true
107
108 # This is an empty job that is used to trigger the pipeline.
109 trigger:
110   image: alpine:latest
111   stage: 'trigger'
112   script:
113     - echo "Trigger job done, now running the pipeline."
114   rules:
115     # If the MR is assigned to the Merge bot, trigger the pipeline automatically
116     - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
117     # Alway run tests post merged
118     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
119     # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
120     # to avoid wasting CI resources
121     - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
122       when: 'manual'
123       allow_failure: false
124
125 .fedora image:
126   variables:
127     FDO_DISTRIBUTION_VERSION: '31'
128     FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
129     FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
130     FDO_DISTRIBUTION_EXEC: 'DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH bash ci/docker/fedora/prepare.sh'
131
132 fedora amd64 docker:
133   extends:
134     - '.fedora image'
135     - '.fdo.container-build@fedora'
136   stage: 'build docker'
137   needs:
138     - "trigger"
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
147 gst-indent amd64 docker:
148   extends:
149     - '.gst-indent image'
150     - '.fdo.container-build@debian'
151   stage: 'build docker'
152   # Do not depend on the trigger, as we want to run indent always
153   needs: []
154
155 windows amd64 docker:
156   stage: "build docker"
157   needs:
158     - "trigger"
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     - "1809"
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 .windows rust docker build:
183   stage: 'build docker'
184   needs:
185     - job: 'windows amd64 docker'
186       artifacts: false
187   rules:
188     - if: '$CI_PROJECT_NAME == "gst-ci"'
189   variables:
190     # Unlike the buildah/linux jobs, this file
191     # needs to be relative to docker/windows/ subdir
192     # as it makes life easier in the powershell script
193     #
194     # We also don't need a CONTEXT_DIR var as its also
195     # hardcoded to be docker/windows/
196     DOCKERFILE: 'docker/windows/rust.Dockerfile'
197   tags:
198     - 'windows'
199     - 'shell'
200     - '1809'
201   script:
202     # We need to pass an array and to resolve the env vars, so we can't use a variable:
203     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
204
205     - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
206     - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
207     - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
208
209     - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
210     - |
211       if (!($?)) {
212         echo "Failed to build the image"
213         Exit 1
214       }
215
216 windows rust amd64 docker latest stable:
217   extends: '.windows rust docker build'
218   variables:
219     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
220     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
221     RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
222
223 windows rust amd64 docker minimum supported version:
224   extends: '.windows rust docker build'
225   variables:
226     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
227     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
228     RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
229
230
231
232 # ---- Preparation ----- #
233 #
234 # gst-indent!!
235 #
236 gst indent:
237   extends:
238     - '.gst-indent image'
239     - '.fdo.suffixed-image@debian'
240   stage: 'preparation'
241   needs:
242     - job: 'gst-indent amd64 docker'
243       artifacts: false
244   script:
245     # man indent. grep RETURN VALUE, grab a beer on my behalf...
246     - indent --version || true
247     - ./scripts/gst-indent-all
248     - |
249       if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
250           echo "Code is properly formatted"
251       else
252           git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
253           echo 'style diverges, please run gst-indent first'
254           exit 1
255       fi
256
257 #
258 # build setup templates
259 #
260 .build_template: &build
261   - echo $MESON_ARGS
262
263   - meson build/ $MESON_ARGS
264   - ninja -C build/
265   - ccache --show-stats
266
267 .build_ccache_vars:
268   variables:
269     CCACHE_COMPILERCHECK: 'content'
270     CCACHE_COMPRESS: 'true'
271     CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
272     CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
273     # shared across everything really
274     CCACHE_MAXSIZE: '10G'
275     CARGO_HOME: '/cache/gstreamer/cargo'
276
277 .base_modules_changes: &modules_changes
278   - .gitlab-ci.yml
279   - meson.build
280   - subprojects/*.wrap
281   - subprojects/gst-devtools/**/*
282   - subprojects/gst-editing-services/**/*
283   - subprojects/gst-integration-testsuites/**/*
284   - subprojects/gst-libav/**/*
285   - subprojects/gst-omx/**/*
286   - subprojects/gst-plugins-bad/**/*
287   - subprojects/gst-plugins-base/**/*
288   - subprojects/gst-plugins-good/**/*
289   - subprojects/gst-plugins-ugly/**/*
290   - subprojects/gst-python/**/*
291   - subprojects/gstreamer/**/*
292   - subprojects/gstreamer-sharp/**/*
293   - subprojects/gstreamer-vaapi/**/*
294   - subprojects/gst-rtsp-server/**/*
295
296 .simple_fedora_build: &simple_build >-
297   ${DEFAULT_MESON_ARGS}
298   -Dsharp=enabled
299   -Domx=enabled
300   -Dgst-omx:target=generic
301   -Ddoc=disabled
302   -Drs=disabled
303   ${MESON_BUILDTYPE_ARGS}
304   ${MESON_GST_WERROR}
305
306 .build:
307   stage: 'build'
308   extends:
309     - '.build_ccache_vars'
310   needs:
311     - "trigger"
312   # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
313   # Also need to take into account I/O of pulling docker images and uploading artifacts
314   timeout: '45min'
315   variables:
316     MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
317   before_script:
318     - export RUSTUP_HOME="/usr/local/rustup"
319     - export CARGO_HOME="/usr/local/cargo"
320     - export PATH="/usr/local/cargo/bin:$PATH"
321
322     - ci/scripts/handle-subprojects-cache.py subprojects/
323     # Update subprojects to respect `.wrap` content
324     - meson subprojects update --reset
325   script:
326     *build
327   after_script:
328     - mv build/meson-logs/ meson-logs
329   artifacts:
330     expire_in: "7 days"
331     when: "always"
332     paths:
333       - 'meson-logs/'
334   rules:
335     # If this matches, it means the pipeline is running against either the main
336     # or a stable branch, so make it manual
337     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
338       when: manual
339     - changes:
340         *modules_changes
341
342 .build fedora x86_64:
343   extends:
344     - '.fedora image'
345     - '.fdo.suffixed-image@fedora'
346     - '.build'
347   needs:
348     - "fedora amd64 docker"
349   variables:
350     MESON_ARGS: *simple_build
351
352 build nodebug fedora x86_64:
353   extends:
354     - '.fedora image'
355     - '.fdo.suffixed-image@fedora'
356     - '.build'
357   needs:
358     - "fedora amd64 docker"
359   variables:
360     MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
361
362 build static fedora x86_64:
363   extends: '.build fedora x86_64'
364   variables:
365     MESON_BUILDTYPE_ARGS: >
366       --default-library=static
367       -Dintrospection=disabled
368       -Ddoc=disabled
369       -Dpython=auto
370
371 build static nodebug fedora x86_64:
372   extends: 'build nodebug fedora x86_64'
373   variables:
374     MESON_BUILDTYPE_ARGS: >
375       --default-library=static
376       -Dintrospection=disabled
377       -Ddoc=disabled
378       -Dpython=auto
379
380 build clang fedora x86_64:
381   extends: '.build fedora x86_64'
382   variables:
383     CC: 'ccache clang'
384     CXX: 'ccache clang++'
385
386 .build windows:
387   image: $WINDOWS_IMAGE
388   stage: 'build'
389   tags:
390     - 'docker'
391     - 'windows'
392     - '1809'
393   needs:
394     - "windows amd64 docker"
395   timeout: '45min'
396   variables:
397     MESON_ARGS: >
398       ${DEFAULT_MESON_ARGS}
399       -Dpython=disabled
400       -Dlibav=disabled
401       -Dvaapi=disabled
402       -Dgst-plugins-base:pango=enabled
403       -Dgst-plugins-good:cairo=enabled
404   rules:
405     # If this matches, it means the pipeline is running against either the main
406     # or a stable branch, so make it manual
407     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
408       when: manual
409     - changes:
410         *modules_changes
411   before_script:
412     - ci/scripts/handle-subprojects-cache.py subprojects/
413   script:
414     # For some reason, options are separated by newline instead of space, so we
415     # have to replace them first.
416     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
417     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
418         meson build $env:MESON_ARGS &&
419         ninja -C build"
420   # XXX: Re-enable when uploading stops timing out
421   #artifacts:
422   #  expire_in: "7 days"
423   #  when: "always"
424   #  paths:
425   #    - 'build/meson-logs/'
426
427 build vs2017 amd64:
428   extends: '.build windows'
429   variables:
430     ARCH: 'amd64'
431
432 build vs2017 x86:
433   extends: '.build windows'
434   variables:
435     ARCH: 'x86'
436
437 build msys2 :
438   extends: '.build windows'
439   timeout: '60min'
440   rules:
441     - changes:
442         *modules_changes
443       allow_failure: true
444       when: 'manual'
445   script:
446     # Make sure powershell exists on errors
447     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
448     - $ErrorActionPreference = "Stop"
449
450     # Configure MSYS2 to use the UCRT64 environment, start in the same directory
451     # and inherit PATH
452     - $env:MSYSTEM = "UCRT64"
453     - $env:CHERE_INVOKING = "1"
454     - $env:MSYS2_PATH_TYPE = "inherit"
455     # For some reason, options are separated by newline instead of space, so we
456     # have to replace them first.
457     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
458     # Replace forward slashes with backwards so bash doesn't complain
459     - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
460     - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
461
462 # ---- Tests ----- #
463
464 .test:
465   stage: 'test'
466   extends:
467     - '.build_ccache_vars'
468   needs:
469     - "trigger"
470   variables:
471     MESON_ARGS: *simple_build
472
473     # Disable colored output to avoid weird rendering issues
474     GST_DEBUG_NO_COLOR: "true"
475     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
476     GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
477     TIMEOUT_FACTOR: "2"
478     CARGO_HOME: "/cache/gstreamer/cargo"
479     # Enable the fault handler so we get backtraces on segfaults.
480     # any non-empty string will do
481     PYTHONFAULTHANDLER: "enabled"
482   rules:
483     - changes:
484         *modules_changes
485   script:
486     - *build
487
488     - echo "-> Running ${TEST_SUITE}"
489     - >
490       ./gst-env.py
491       gst-validate-launcher ${TEST_SUITE}
492       --check-bugs
493       --dump-on-failure
494       --mute
495       --shuffle
496       --no-display
497       --meson-no-rebuild
498       --timeout-factor "${TIMEOUT_FACTOR}"
499       --fail-on-testlist-change
500       -l "${CI_PROJECT_DIR}/validate-logs/"
501       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
502       ${EXTRA_VALIDATE_ARGS}
503   after_script:
504     - mv build/meson-logs/ meson-logs
505   artifacts:
506     expire_in: '14 days'
507     when: always
508     paths:
509       - 'meson-logs/'
510       - 'validate-logs'
511     reports:
512       junit:
513         - "validate-logs/*.xml"
514
515 .test fedora x86_64:
516   extends:
517     - '.fedora image'
518     - '.fdo.suffixed-image@fedora'
519     - '.test'
520   needs:
521     - "fedora amd64 docker"
522   tags: ['gstreamer']
523
524 check fedora:
525   extends: '.test fedora x86_64'
526   variables:
527     TEST_SUITE: "check.gst*"
528
529 integration testsuites fedora:
530   extends: '.test fedora x86_64'
531   parallel: 4
532   variables:
533     EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
534     TEST_SUITE: "validate ges"
535
536 # gstreamer-full:
537 gstreamer-full:
538   extends: 'build static fedora x86_64'
539   stage: integrate
540   variables:
541     MESON_ARGS: >
542       --default-library=static
543       -Ddoc=disabled
544       $MESON_GST_WERROR
545
546   script:
547   - *build
548   - meson test -C build -v test-gst-full
549   artifacts:
550     expire_in: "7 days"
551     when: "always"
552     paths:
553       - 'meson-logs/'
554
555 gstreamer-full-minimal:
556   extends: 'build static fedora x86_64'
557   stage: integrate
558   variables:
559     MESON_ARGS: >
560       --default-library=static
561       -Dauto_features=disabled
562       -Dgstreamer:check=enabled
563       -Dtests=enabled
564       -Dgst-plugins-base:alsa=enabled
565       -Dgst-plugins-base:typefind=enabled
566       -Dgst-plugins-base:pbtypes=enabled
567       -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
568       -Dgst-full-typefind-functions=typefindfunctions:wav,flv
569       -Dgst-full-device-providers=alsa:alsadeviceprovider
570       -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
571       $MESON_GST_WERROR
572
573   script:
574   - *build
575   - meson test -C build -v test-gst-full
576   - meson test -C build test-gst-full-features --test-args "-e filesrc,identity,fakesink -E filesink,capsfilter -t audio/x-wav -T video/vivo -d alsadeviceprovider -D v4l2deviceprovider -l GstVideoMultiviewFlagsSet"
577   - strip build/libgstreamer-full-1.0.so
578   - ls -l build/libgstreamer-full-1.0.so
579   artifacts:
580     expire_in: "7 days"
581     when: "always"
582     paths:
583       - 'meson-logs/'
584
585 # Valgrind
586 .valgrind fedora x86_64:
587   extends: '.test fedora x86_64'
588   stage: 'test'
589   variables:
590     EXTRA_VALIDATE_ARGS: "--valgrind"
591
592 valgrind core:
593   extends: '.valgrind fedora x86_64'
594   variables:
595     TEST_SUITE: "check.gstreamer\\..*"
596   rules:
597     - changes:
598       - "*"
599       - scripts/*
600       - ci/**/*
601       - subprojects/gst-devtools/**/*
602       - subprojects/gstreamer/**/*
603
604 valgrind base:
605   extends: '.valgrind fedora x86_64'
606   variables:
607     TEST_SUITE: "check.gst-plugins-base\\..*"
608   rules:
609     - changes:
610       - "*"
611       - scripts/*
612       - ci//**/*
613       - subprojects/gst-devtools/**/*
614       - subprojects/gstreamer/**/*
615       - subprojects/gst-plugins-base/**/*
616
617 valgrind good:
618   extends: '.valgrind fedora x86_64'
619   variables:
620     TEST_SUITE: "check.gst-plugins-good\\..*"
621     # take longer time due to splitmux unit test
622     TIMEOUT_FACTOR: "4"
623   rules:
624     - changes:
625       - "*"
626       - scripts/*
627       - ci/**/*
628       - subprojects/gst-devtools/**/*
629       - subprojects/gstreamer/**/*
630       - subprojects/gst-plugins-base/**/*
631       - subprojects/gst-plugins-good/**/*
632
633 valgrind ugly:
634   extends: '.valgrind fedora x86_64'
635   variables:
636     TEST_SUITE: "check.gst-plugins-ugly\\..*"
637   rules:
638     - changes:
639       - "*"
640       - scripts/*
641       - ci/**/*
642       - subprojects/gst-devtools/**/*
643       - subprojects/gstreamer/**/*
644       - subprojects/gst-plugins-base/**/*
645       - subprojects/gst-plugins-good/**/*
646       - subprojects/gst-plugins-ugly/**/*
647
648 valgrind bad:
649   extends: '.valgrind fedora x86_64'
650   variables:
651     TEST_SUITE: "check.gst-plugins-bad\\..*"
652   rules:
653     - changes:
654       - "*"
655       - scripts/*
656       - ci/**/*
657       - subprojects/gst-devtools/**/*
658       - subprojects/gstreamer/**/*
659       - subprojects/gst-plugins-base/**/*
660       - subprojects/gst-plugins-good/**/*
661       - subprojects/gst-plugins-bad/**/*
662
663 valgrind ges:
664   extends: '.valgrind fedora x86_64'
665   variables:
666     TEST_SUITE: "check.gst-editing-services\\..*"
667   rules:
668     - changes:
669       - "*"
670       - scripts/*
671       - ci/**/*
672       - subprojects/gst-devtools/**/*
673       - subprojects/gstreamer/**/*
674       - subprojects/gst-plugins-base/**/*
675       - subprojects/gst-plugins-good/**/*
676       - subprojects/gst-plugins-bad/**/*
677       - subprojects/gst-editing-services/**/*
678
679 # ---- Integration ----- #
680
681 .documentation:
682   image: $FEDORA_DOCS_IMAGE
683   extends:
684     - '.build_ccache_vars'
685   variables:
686     MESON_ARGS: *simple_build
687     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
688     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
689   script:
690   # FIXME: should rebuild the image with newer versions!
691   - pip3 install --upgrade hotdoc
692   - pip3 install --upgrade meson
693   - *build
694   - ./gst-env.py ninja -C build/ plugins_doc_caches
695   - ./ci/scripts/check-documentation-diff.py
696   - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
697   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
698
699   artifacts:
700     when: always
701     expire_in: "7 days"
702     paths:
703     - documentation/
704     - plugins-cache-diffs/
705
706 #
707 # This jobs runs in gstreamer namespace when after the merge into main branch.
708 # The produced artifact is later used to automatically update the web page.
709 #
710 documentation:
711   stage: integrate
712   extends:
713     - '.documentation'
714   needs: []
715   rules:
716     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
717
718 #
719 # This job is run in users namespace to validate documentation before merging
720 # MR.
721 #
722 build documentation:
723   extends:
724     - '.documentation'
725   stage: build
726   needs:
727     - "trigger"
728   rules:
729     # Never run post merge, we have the `documentation` always running for that
730     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
731       when: never
732     - changes:
733       - .gitlab-ci.yml
734       - ci/gitlab/freedesktop_doc_importer.sh
735       - subprojects/*.wrap
736       - subprojects/gst-docs/**/*
737       - subprojects/gst-devtools/**/*
738       - subprojects/gst-editing-services/**/*
739       - subprojects/gst-libav/**/*
740       - subprojects/gst-omx/**/*
741       - subprojects/gst-plugins-bad/**/*
742       - subprojects/gst-plugins-base/**/*
743       - subprojects/gst-plugins-good/**/*
744       - subprojects/gst-plugins-ugly/**/*
745       - subprojects/gstreamer/**/*
746       - subprojects/gstreamer-vaapi/**/*
747       - subprojects/gst-rtsp-server/**/*
748
749 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
750 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
751 cerbero trigger:
752   stage: build
753   extends:
754     - '.fedora image'
755     - '.fdo.suffixed-image@fedora'
756   needs:
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/trigger_cerbero_pipeline.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/**/*