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