teletextdec: fix minor string leak
[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   ORC_UPSTREAM_BRANCH: 'master'
21
22   ###
23   # IMPORTANT
24   # These are the version tags for the docker images the CI runs against.
25   # If you are hacking on them or need a them to rebuild, its enough
26   # to change any part of the string of the image you want.
27   ###
28   FEDORA_TAG:  '2021-12-03.1'
29   INDENT_TAG: '2021-10-04.0'
30   WINDOWS_TAG: "2021-10-12.0"
31
32   GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
33   FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
34
35   FEDORA_AMD64_SUFFIX:  'amd64/fedora'
36   INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
37   WINDOWS_AMD64_SUFFIX: 'amd64/windows'
38   WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
39
40   FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
41   WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
42   WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
43
44   RUST_MINIMUM_VERSION: '1.54.0'
45   RUST_LATEST_VERSION: '1.55.0'
46
47   WINDOWS_RUST_MINIMUM_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
48   WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
49
50   WINDOWS_RUST_LATEST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
51   WINDOWS_RUST_LATEST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
52
53   MESON_BUILDTYPE_ARGS: --default-library=both
54   DEFAULT_MESON_ARGS: >
55     -Dlibnice:tests=disabled
56     -Dlibnice:examples=disabled
57     -Dopenh264:tests=disabled
58     -Dpygobject:tests=false
59     -Dpython=enabled
60     -Dlibav=enabled
61     -Dugly=enabled
62     -Dbad=enabled
63     -Ddevtools=enabled
64     -Dges=enabled
65     -Drtsp_server=enabled
66     -Dvaapi=enabled
67     -Dsharp=disabled
68     -Dgpl=enabled
69
70   MESON_GST_WERROR: >
71     -Dgstreamer:werror=true
72     -Dgst-plugins-base:werror=true
73     -Dgst-plugins-good:werror=true
74     -Dgst-plugins-ugly:werror=true
75     -Dgst-plugins-bad:werror=true
76     -Dgst-rtsp-server:werror=true
77     -Dgst-libav:werror=true
78     -Dgst-examples:werror=true
79     -Dgst-editing-services:werror=true
80     -Dgst-docs:werror=true
81     -Dgst-omx:werror=true
82     -Dgst-devtools:werror=true
83     -Dgst-python:werror=true
84     -Dgstreamer-vaapi:werror=true
85     -Dgstreamer-sharp:werror=true
86
87 workflow:
88   # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
89   rules:
90     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
91       variables:
92         GIT_FETCH_EXTRA_FLAGS: '--no-tags'
93     - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
94       when: never
95     - if: '$CI_COMMIT_TAG'
96     - if: '$CI_COMMIT_BRANCH'
97       variables:
98         GIT_FETCH_EXTRA_FLAGS: '--no-tags'
99
100 #
101 # Global CI policy
102 #
103 # This can be used to configure global behaviour our our jobs.
104 #
105 default:
106   retry:
107     max: 2
108     when:
109       - 'runner_system_failure'
110       - 'stuck_or_timeout_failure'
111       - 'scheduler_failure'
112       - 'api_failure'
113   interruptible: true
114
115 # This is an empty job that is used to trigger the pipeline.
116 trigger:
117   image: alpine:latest
118   stage: 'trigger'
119   variables:
120     GIT_STRATEGY: none
121   script:
122     - echo "Trigger job done, now running the pipeline."
123   rules:
124     # If the MR is assigned to the Merge bot, trigger the pipeline automatically
125     - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
126     # Alway run tests post merged
127     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
128     # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
129     # to avoid wasting CI resources
130     - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
131       when: 'manual'
132       allow_failure: false
133
134 .fedora image:
135   variables:
136     FDO_DISTRIBUTION_VERSION: '31'
137     FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
138     FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
139     FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
140
141 fedora amd64 docker:
142   extends:
143     - '.fedora image'
144     - '.fdo.container-build@fedora'
145   stage: 'build docker'
146   needs:
147     - "trigger"
148
149 .gst-indent image:
150   variables:
151     FDO_DISTRIBUTION_VERSION: 'stretch'
152     FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
153     FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
154     FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
155
156 gst-indent amd64 docker:
157   extends:
158     - '.gst-indent image'
159     - '.fdo.container-build@debian'
160   stage: 'build docker'
161   # Do not depend on the trigger, as we want to run indent always
162   needs: []
163
164 windows amd64 docker:
165   stage: "build docker"
166   needs:
167     - "trigger"
168   variables:
169     # Unlike the buildah/linux jobs, this file
170     # needs to be relative to docker/windows/ subdir
171     # as it makes life easier in the powershell script
172     #
173     # We also don't need a CONTEXT_DIR var as its also
174     # hardcoded to be docker/windows/
175     DOCKERFILE: "ci/docker/windows/Dockerfile"
176   tags:
177     - windows
178     - shell
179     - "1809"
180   script:
181     # We need to pass an array and to resolve the env vars, so we can't use a variable:
182     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
183
184     - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
185     - |
186       if (!($?)) {
187         echo "Failed to build the image"
188         Exit 1
189       }
190
191 .windows rust docker build:
192   stage: 'build docker'
193   needs:
194     - job: 'windows amd64 docker'
195       artifacts: false
196   rules:
197     - if: '$CI_PROJECT_NAME == "gst-ci"'
198   variables:
199     # Unlike the buildah/linux jobs, this file
200     # needs to be relative to docker/windows/ subdir
201     # as it makes life easier in the powershell script
202     #
203     # We also don't need a CONTEXT_DIR var as its also
204     # hardcoded to be docker/windows/
205     DOCKERFILE: 'docker/windows/rust.Dockerfile'
206   tags:
207     - 'windows'
208     - 'shell'
209     - '1809'
210   script:
211     # We need to pass an array and to resolve the env vars, so we can't use a variable:
212     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
213
214     - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
215     - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
216     - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
217
218     - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
219     - |
220       if (!($?)) {
221         echo "Failed to build the image"
222         Exit 1
223       }
224
225 windows rust amd64 docker latest stable:
226   extends: '.windows rust docker build'
227   variables:
228     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
229     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
230     RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
231
232 windows rust amd64 docker minimum supported version:
233   extends: '.windows rust docker build'
234   variables:
235     RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
236     RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
237     RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
238
239
240
241 # ---- Preparation ----- #
242 #
243 # gst-indent!!
244 #
245 gst indent:
246   extends:
247     - '.gst-indent image'
248     - '.fdo.suffixed-image@debian'
249   stage: 'preparation'
250   needs:
251     - job: 'gst-indent amd64 docker'
252       artifacts: false
253   script:
254     # man indent. grep RETURN VALUE, grab a beer on my behalf...
255     - indent --version || true
256     - ./scripts/gst-indent-all
257     - |
258       if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
259           echo "Code is properly formatted"
260       else
261           git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
262           echo 'style diverges, please run gst-indent first'
263           exit 1
264       fi
265
266 #
267 # build setup templates
268 #
269 .build_template: &build
270   - ci/scripts/handle-subprojects-cache.py subprojects/
271   # Update subprojects to respect `.wrap` content
272   - meson subprojects update --reset
273   - echo $MESON_ARGS
274   - meson build/ $MESON_ARGS
275   - ninja -C build/
276   - ccache --show-stats
277
278 .build_ccache_vars:
279   variables:
280     CCACHE_COMPILERCHECK: 'content'
281     CCACHE_COMPRESS: 'true'
282     CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
283     CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
284     # shared across everything really
285     CCACHE_MAXSIZE: '10G'
286     CARGO_HOME: '/cache/gstreamer/cargo'
287
288 .base_modules_changes: &modules_changes
289   - .gitlab-ci.yml
290   - meson.build
291   - subprojects/*.wrap
292   - subprojects/gst-devtools/**/*
293   - subprojects/gst-editing-services/**/*
294   - subprojects/gst-integration-testsuites/**/*
295   - subprojects/gst-libav/**/*
296   - subprojects/gst-omx/**/*
297   - subprojects/gst-plugins-bad/**/*
298   - subprojects/gst-plugins-base/**/*
299   - subprojects/gst-plugins-good/**/*
300   - subprojects/gst-plugins-ugly/**/*
301   - subprojects/gst-python/**/*
302   - subprojects/gstreamer/**/*
303   - subprojects/gstreamer-sharp/**/*
304   - subprojects/gstreamer-vaapi/**/*
305   - subprojects/gst-rtsp-server/**/*
306
307 .simple_fedora_build: &simple_build >-
308   ${DEFAULT_MESON_ARGS}
309   -Dsharp=enabled
310   -Domx=enabled
311   -Dgst-omx:target=generic
312   -Ddoc=disabled
313   -Drs=disabled
314   ${MESON_BUILDTYPE_ARGS}
315   ${MESON_GST_WERROR}
316
317 .build:
318   stage: 'build'
319   extends:
320     - '.build_ccache_vars'
321   needs:
322     - "trigger"
323   # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
324   # Also need to take into account I/O of pulling docker images and uploading artifacts
325   timeout: '45min'
326   variables:
327     MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
328   script:
329     *build
330   after_script:
331     - mv build/meson-logs/ meson-logs
332   artifacts:
333     expire_in: "7 days"
334     when: "always"
335     paths:
336       - 'meson-logs/'
337   rules:
338     # If this matches, it means the pipeline is running against either the main
339     # or a stable branch, so make it manual
340     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
341       when: manual
342     - changes:
343         *modules_changes
344
345 .build fedora x86_64:
346   extends:
347     - '.fedora image'
348     - '.fdo.suffixed-image@fedora'
349     - '.build'
350   needs:
351     - "fedora amd64 docker"
352   variables:
353     MESON_ARGS: *simple_build
354
355 build nodebug fedora x86_64:
356   extends:
357     - '.fedora image'
358     - '.fdo.suffixed-image@fedora'
359     - '.build'
360   needs:
361     - "fedora amd64 docker"
362   variables:
363     MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
364
365 build clang fedora x86_64:
366   extends: '.build fedora x86_64'
367   variables:
368     CC: 'ccache clang'
369     CXX: 'ccache clang++'
370
371 .build windows:
372   image: $WINDOWS_IMAGE
373   stage: 'build'
374   tags:
375     - 'docker'
376     - 'windows'
377     - '1809'
378   needs:
379     - "windows amd64 docker"
380   timeout: '45min'
381   variables:
382     MESON_ARGS: >
383       ${DEFAULT_MESON_ARGS}
384       -Dpython=disabled
385       -Dlibav=disabled
386       -Dvaapi=disabled
387       -Dgst-plugins-base:pango=enabled
388       -Dgst-plugins-good:cairo=enabled
389   rules:
390     # If this matches, it means the pipeline is running against either the main
391     # or a stable branch, so make it manual
392     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
393       when: manual
394     - changes:
395         *modules_changes
396   script:
397     - ci/scripts/handle-subprojects-cache.py subprojects/
398     # For some reason, options are separated by newline instead of space, so we
399     # have to replace them first.
400     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
401     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
402         meson build $env:MESON_ARGS &&
403         ninja -C build"
404   # XXX: Re-enable when uploading stops timing out
405   #artifacts:
406   #  expire_in: "7 days"
407   #  when: "always"
408   #  paths:
409   #    - 'build/meson-logs/'
410
411 build vs2017 amd64:
412   extends: '.build windows'
413   variables:
414     ARCH: 'amd64'
415
416 build vs2017 x86:
417   extends: '.build windows'
418   variables:
419     ARCH: 'x86'
420
421 build msys2 :
422   extends: '.build windows'
423   timeout: '60min'
424   rules:
425     - changes:
426         *modules_changes
427       allow_failure: true
428       when: 'manual'
429   script:
430     # Make sure powershell exits on errors
431     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
432     - $ErrorActionPreference = "Stop"
433
434     # Configure MSYS2 to use the UCRT64 environment, start in the same directory
435     # and inherit PATH
436     - $env:MSYSTEM = "UCRT64"
437     - $env:CHERE_INVOKING = "1"
438     - $env:MSYS2_PATH_TYPE = "inherit"
439     # For some reason, options are separated by newline instead of space, so we
440     # have to replace them first.
441     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
442     # Replace forward slashes with backwards so bash doesn't complain
443     - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
444     - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
445
446 # ---- Tests ----- #
447
448 .test:
449   stage: 'test'
450   extends:
451     - '.build_ccache_vars'
452   needs:
453     - "trigger"
454   variables:
455     MESON_ARGS: *simple_build
456
457     # Disable colored output to avoid weird rendering issues
458     GST_DEBUG_NO_COLOR: "true"
459     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
460     GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
461     TIMEOUT_FACTOR: "2"
462     CARGO_HOME: "/cache/gstreamer/cargo"
463     # Enable the fault handler so we get backtraces on segfaults.
464     # any non-empty string will do
465     PYTHONFAULTHANDLER: "enabled"
466   rules:
467     - changes:
468         *modules_changes
469   script:
470     - *build
471
472     - echo "-> Running ${TEST_SUITE}"
473     - >
474       ./gst-env.py
475       gst-validate-launcher ${TEST_SUITE}
476       --check-bugs
477       --dump-on-failure
478       --mute
479       --shuffle
480       --no-display
481       --meson-no-rebuild
482       --timeout-factor "${TIMEOUT_FACTOR}"
483       --fail-on-testlist-change
484       -l "${CI_PROJECT_DIR}/validate-logs/"
485       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
486       ${EXTRA_VALIDATE_ARGS}
487   after_script:
488     - mv build/meson-logs/ meson-logs
489   artifacts:
490     expire_in: '14 days'
491     when: always
492     paths:
493       - 'meson-logs/'
494       - 'validate-logs'
495     reports:
496       junit:
497         - "validate-logs/*.xml"
498
499 .test fedora x86_64:
500   extends:
501     - '.fedora image'
502     - '.fdo.suffixed-image@fedora'
503     - '.test'
504   needs:
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: 4
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
665 # ---- Integration ----- #
666
667 .documentation:
668   image: $FEDORA_DOCS_IMAGE
669   extends:
670     - '.build_ccache_vars'
671   variables:
672     MESON_ARGS: *simple_build
673     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
674     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
675   script:
676   # FIXME: should rebuild the image with newer versions!
677   - pip3 install --upgrade hotdoc
678   - pip3 install --upgrade meson
679   - *build
680   - ./gst-env.py ninja -C build/ plugins_doc_caches
681   # Ignore modifications to wrap files made by meson
682   - git checkout subprojects/*.wrap
683   - ./ci/scripts/check-documentation-diff.py
684   - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
685   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
686
687   artifacts:
688     when: always
689     expire_in: "7 days"
690     paths:
691     - documentation/
692     - plugins-cache-diffs/
693
694 #
695 # This jobs runs in gstreamer namespace when after the merge into main branch.
696 # The produced artifact is later used to automatically update the web page.
697 #
698 documentation:
699   stage: integrate
700   extends:
701     - '.documentation'
702   needs: []
703   rules:
704     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
705
706 #
707 # This job is run in users namespace to validate documentation before merging
708 # MR.
709 #
710 build documentation:
711   extends:
712     - '.documentation'
713   stage: build
714   needs:
715     - "trigger"
716   rules:
717     # Never run post merge, we have the `documentation` always running for that
718     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
719       when: never
720     - changes:
721       - .gitlab-ci.yml
722       - ci/gitlab/freedesktop_doc_importer.sh
723       - subprojects/*.wrap
724       - subprojects/gst-docs/**/*
725       - subprojects/gst-devtools/**/*
726       - subprojects/gst-editing-services/**/*
727       - subprojects/gst-libav/**/*
728       - subprojects/gst-omx/**/*
729       - subprojects/gst-plugins-bad/**/*
730       - subprojects/gst-plugins-base/**/*
731       - subprojects/gst-plugins-good/**/*
732       - subprojects/gst-plugins-ugly/**/*
733       - subprojects/gstreamer/**/*
734       - subprojects/gstreamer-vaapi/**/*
735       - subprojects/gst-rtsp-server/**/*
736
737 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
738 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
739 cerbero trigger:
740   stage: build
741   extends:
742     - '.fedora image'
743     - '.fdo.suffixed-image@fedora'
744   needs:
745     - "fedora amd64 docker"
746   script:
747     - ci/gitlab/trigger_cerbero_pipeline.py
748
749   rules:
750     # Never run post merge
751     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
752       when: never
753     - changes:
754       - .gitlab-ci.yml
755       - ci/gitlab/trigger_cerbero_pipeline.py
756       - subprojects/gst-devtools/**/*
757       - subprojects/gst-editing-services/**/*
758       - subprojects/gst-libav/**/*
759       - subprojects/gst-plugins-bad/**/*
760       - subprojects/gst-plugins-base/**/*
761       - subprojects/gst-plugins-good/**/*
762       - subprojects/gst-plugins-ugly/**/*
763       - subprojects/gst-python/**/*
764       - subprojects/gstreamer/**/*
765       - subprojects/gst-rtsp-server/**/*
766       - subprojects/gst-examples/**/*