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