d655aeae8486fa384dd95af49f55f47e024c7644
[platform/upstream/gstreamer.git] / .gitlab-ci.yml
1 include:
2   - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/ci-fairy.yml"
3   - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/fedora.yml"
4   - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/debian.yml"
5
6 stages:
7   - 'trigger'
8   - 'build docker'
9   - 'preparation'
10   - 'pre-build'
11   - 'build'
12   - 'test'
13   # Use the resulting binaries
14   - 'integrate'
15
16 variables:
17   # Branch to track for modules that have no ref specified in the manifest
18   GST_UPSTREAM_BRANCH: 'main'
19   ORC_UPSTREAM_BRANCH: 'master'
20
21   ###
22   # IMPORTANT
23   # These are the version tags for the docker images the CI runs against.
24   # If you are hacking on them or need a them to rebuild, its enough
25   # to change any part of the string of the image you want.
26   ###
27   FEDORA_TAG:  '2021-10-04.0'
28   INDENT_TAG: '2021-10-04.0'
29   WINDOWS_TAG: "2021-10-04.1"
30
31   GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
32   FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
33
34   FEDORA_AMD64_SUFFIX:  'amd64/fedora'
35   INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
36   WINDOWS_AMD64_SUFFIX: 'amd64/windows'
37   WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
38
39   FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
40   WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
41   WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
42
43   RUST_MINIMUM_VERSION: '1.54.0'
44   RUST_LATEST_VERSION: '1.55.0'
45
46   WINDOWS_RUST_MINIMUM_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
47   WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
48
49   WINDOWS_RUST_LATEST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
50   WINDOWS_RUST_LATEST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
51
52   MESON_BUILDTYPE_ARGS: --default-library=both
53   DEFAULT_MESON_ARGS: >
54     -Dlibnice:tests=disabled
55     -Dlibnice:examples=disabled
56     -Dopenh264:tests=disabled
57     -Dpygobject:tests=false
58     -Dpython=enabled
59     -Dlibav=enabled
60     -Dugly=enabled
61     -Dbad=enabled
62     -Ddevtools=enabled
63     -Dges=enabled
64     -Drtsp_server=enabled
65     -Dvaapi=enabled
66     -Dsharp=disabled
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     # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
118     # to avoid wasting CI resources
119     - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
120       when: 'manual'
121       allow_failure: false
122     # If this matches, it means the pipeline is running against either the main
123     # or a stable branch, so make it manual
124     - if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
125       when: 'manual'
126
127 .fedora image:
128   variables:
129     FDO_DISTRIBUTION_VERSION: '31'
130     FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
131     FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
132     FDO_DISTRIBUTION_EXEC: 'DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH bash ci/docker/fedora/prepare.sh'
133
134 fedora amd64 docker:
135   extends:
136     - '.fedora image'
137     - '.fdo.container-build@fedora'
138   stage: 'build docker'
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 # Check "allow-edit" checkbox on merge requests with ci-fairy
259 #
260 check allow-edit:
261   extends: '.fdo.ci-fairy'
262   needs: []
263   stage: 'preparation'
264   script:
265     - ci-fairy check-merge-request --require-allow-collaboration
266   rules:
267     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
268
269 #
270 # build setup templates
271 #
272 .build_template: &build
273   - echo $MESON_ARGS
274
275   - meson build/ $MESON_ARGS
276   - ninja -C build/
277   - ccache --show-stats
278
279 .build_ccache_vars:
280   variables:
281     CCACHE_COMPILERCHECK: 'content'
282     CCACHE_COMPRESS: 'true'
283     CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
284     CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
285     # shared across everything really
286     CCACHE_MAXSIZE: '10G'
287     CARGO_HOME: '/cache/gstreamer/cargo'
288
289 .base_modules_changes: &modules_changes
290   - .gitlab-ci.yml
291   - meson.build
292   - subprojects/*.wrap
293   - subprojects/gst-devtools/**/*
294   - subprojects/gst-editing-services/**/*
295   - subprojects/gst-integration-testsuites/**/*
296   - subprojects/gst-libav/**/*
297   - subprojects/gst-omx/**/*
298   - subprojects/gst-plugins-bad/**/*
299   - subprojects/gst-plugins-base/**/*
300   - subprojects/gst-plugins-good/**/*
301   - subprojects/gst-plugins-ugly/**/*
302   - subprojects/gst-python/**/*
303   - subprojects/gstreamer/**/*
304   - subprojects/gstreamer-sharp/**/*
305   - subprojects/gstreamer-vaapi/**/*
306   - subprojects/gst-rtsp-server/**/*
307
308 .simple_fedora_build: &simple_build >-
309   ${DEFAULT_MESON_ARGS}
310   -Dsharp=enabled
311   -Domx=enabled
312   -Dgst-omx:target=generic
313   -Ddoc=disabled
314   -Drs=disabled
315   ${MESON_BUILDTYPE_ARGS}
316   ${MESON_GST_WERROR}
317
318 .build:
319   stage: 'build'
320   extends:
321     - '.build_ccache_vars'
322   needs:
323     - "trigger"
324   # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
325   # Also need to take into account I/O of pulling docker images and uploading artifacts
326   timeout: '45min'
327   variables:
328     MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
329   before_script:
330     - export RUSTUP_HOME="/usr/local/rustup"
331     - export CARGO_HOME="/usr/local/cargo"
332     - export PATH="/usr/local/cargo/bin:$PATH"
333
334     - ci/scripts/handle-subprojects-cache.py subprojects/
335     # Update subprojects to respect `.wrap` content
336     - meson subprojects update --reset
337   script:
338     *build
339   after_script:
340     - mv build/meson-logs/ meson-logs
341   artifacts:
342     expire_in: "7 days"
343     when: "always"
344     paths:
345       - 'meson-logs/'
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   rules:
357     - changes:
358         *modules_changes
359
360 build nodebug fedora x86_64:
361   extends:
362     - '.fedora image'
363     - '.fdo.suffixed-image@fedora'
364     - '.build'
365   needs:
366     - "fedora amd64 docker"
367   variables:
368     MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
369
370 build static fedora x86_64:
371   extends: '.build fedora x86_64'
372   variables:
373     MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
374
375 build static nodebug fedora x86_64:
376   extends: 'build nodebug fedora x86_64'
377   variables:
378     MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
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     - changes:
406         *modules_changes
407   before_script:
408     - ci/scripts/handle-subprojects-cache.py subprojects/
409   script:
410     # For some reason, options are separated by newline instead of space, so we
411     # have to replace them first.
412     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
413     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
414         meson build $env:MESON_ARGS &&
415         ninja -C build"
416   # XXX: Re-enable when uploading stops timing out
417   #artifacts:
418   #  expire_in: "7 days"
419   #  when: "always"
420   #  paths:
421   #    - 'build/meson-logs/'
422
423 build vs2017 amd64:
424   extends: '.build windows'
425   variables:
426     ARCH: 'amd64'
427
428 build vs2017 x86:
429   extends: '.build windows'
430   variables:
431     ARCH: 'x86'
432
433 build msys2 :
434   extends: '.build windows'
435   timeout: '60min'
436   rules:
437     - changes:
438         *modules_changes
439       allow_failure: true
440       when: 'manual'
441   script:
442     # Make sure powershell exists on errors
443     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
444     - $ErrorActionPreference = "Stop"
445
446     # For some reason docker build hangs if this is included in the image, needs more troubleshooting
447     - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
448     # Copied from https://github.com/msys2/setup-msys2/blob/master/main.js#L98
449     - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
450     - C:\msys64\usr\bin\bash -c "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
451     - echo "Updating MSYS2"
452     - C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm || echo Update failed, ignoring"
453     - echo "Killing all MSYS2 processes"
454     - taskkill /F /FI "MODULES eq msys-2.0.dll"
455     - echo "Completing MSYS2 update"
456     - C:\msys64\usr\bin\bash -c "pacman -Suu --noconfirm"
457     - echo "Installing needed MSYS2 packages"
458     - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
459
460     # For some reason, options are separated by newline instead of space, so we
461     # have to replace them first.
462     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
463     # Replace forward slashes with backwards so bash doesn't complain
464     - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
465     - C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS && ninja -C build"
466
467 # ---- Tests ----- #
468
469 .test:
470   stage: 'test'
471   extends:
472     - '.build_ccache_vars'
473   needs:
474     - "trigger"
475   variables:
476     MESON_ARGS: *simple_build
477
478     # Disable colored output to avoid weird rendering issues
479     GST_DEBUG_NO_COLOR: "true"
480     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
481     GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
482     TIMEOUT_FACTOR: "2"
483     CARGO_HOME: "/cache/gstreamer/cargo"
484     # Enable the fault handler so we get backtraces on segfaults.
485     # any non-empty string will do
486     PYTHONFAULTHANDLER: "enabled"
487   rules:
488     - changes:
489         *modules_changes
490   script:
491     - *build
492
493     - echo "-> Running ${TEST_SUITE}"
494     - >
495       ./gst-env.py
496       gst-validate-launcher ${TEST_SUITE}
497       --dump-on-failure
498       --mute
499       --shuffle
500       --no-display
501       --meson-no-rebuild
502       --timeout-factor "${TIMEOUT_FACTOR}"
503       --fail-on-testlist-change
504       -l "${CI_PROJECT_DIR}/validate-logs/"
505       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
506       ${EXTRA_VALIDATE_ARGS}
507   after_script:
508     - mv build/meson-logs/ meson-logs
509   artifacts:
510     expire_in: '14 days'
511     when: always
512     paths:
513       - 'meson-logs/'
514       - 'validate-logs'
515     reports:
516       junit:
517         - "validate-logs/*.xml"
518
519 .test fedora x86_64:
520   extends:
521     - '.fedora image'
522     - '.fdo.suffixed-image@fedora'
523     - '.test'
524   needs:
525     - "fedora amd64 docker"
526   tags: ['gstreamer']
527
528 check fedora:
529   extends: '.test fedora x86_64'
530   variables:
531     TEST_SUITE: "check.gst*"
532
533 integration testsuites fedora:
534   extends: '.test fedora x86_64'
535   parallel: 4
536   variables:
537     EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --check-bugs --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX}"
538     TEST_SUITE: "validate ges"
539
540 # gstreamer-full:
541 # introspection has been disabled as the static build does not support it.
542 # See https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/162
543 gstreamer-full:
544   extends: 'build static fedora x86_64'
545   stage: integrate
546   variables:
547     MESON_ARGS: >
548       --default-library=static
549       -Dintrospection=disabled
550       $MESON_GST_WERROR
551   rules:
552     - changes:
553       - "*"
554       - scripts/*
555       - subprojects/gst-ci/**/*
556
557   script:
558   - *build
559   - meson test -C build -v test-gst-full
560   artifacts:
561     expire_in: "7 days"
562     when: "always"
563     paths:
564       - 'meson-logs/'
565
566 gstreamer-full-minimal:
567   extends: 'build static fedora x86_64'
568   stage: integrate
569   variables:
570     MESON_ARGS: >
571       --default-library=static
572       -Dauto_features=disabled
573       -Dgstreamer:check=enabled
574       -Dtests=enabled
575       -Dgst-plugins-base:alsa=enabled
576       -Dgst-plugins-base:typefind=enabled
577       -Dgst-plugins-base:pbtypes=enabled
578       -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
579       -Dgst-full-typefind-functions=typefindfunctions:wav,flv
580       -Dgst-full-device-providers=alsa:alsadeviceprovider
581       -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
582       $MESON_GST_WERROR
583   rules:
584     - if: '$CI_PROJECT_NAME =~ /^(gst-build|gst-ci)$/'
585
586   script:
587   - *build
588   - meson test -C build -v test-gst-full
589   - 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"
590   - strip build/libgstreamer-full-1.0.so
591   - ls -l build/libgstreamer-full-1.0.so
592   artifacts:
593     expire_in: "7 days"
594     when: "always"
595     paths:
596       - 'meson-logs/'
597
598 # Valgrind
599 .valgrind fedora x86_64:
600   extends: '.test fedora x86_64'
601   stage: 'test'
602   variables:
603     EXTRA_VALIDATE_ARGS: "--valgrind"
604
605 valgrind core:
606   extends: '.valgrind fedora x86_64'
607   variables:
608     TEST_SUITE: "check.gstreamer\\..*"
609   rules:
610     - changes:
611       - "*"
612       - scripts/*
613       - subprojects/gst-ci/**/*
614       - subprojects/gst-devtools/**/*
615       - subprojects/gstreamer/**/*
616
617 valgrind base:
618   extends: '.valgrind fedora x86_64'
619   variables:
620     TEST_SUITE: "check.gst-plugins-base\\..*"
621   rules:
622     - changes:
623       - "*"
624       - scripts/*
625       - subprojects/gst-ci/**/*
626       - subprojects/gst-devtools/**/*
627       - subprojects/gstreamer/**/*
628       - subprojects/gst-plugins-base/**/*
629
630 valgrind good:
631   extends: '.valgrind fedora x86_64'
632   variables:
633     TEST_SUITE: "check.gst-plugins-good\\..*"
634     # take longer time due to splitmux unit test
635     TIMEOUT_FACTOR: "4"
636   rules:
637     - changes:
638       - "*"
639       - scripts/*
640       - subprojects/gst-ci/**/*
641       - subprojects/gst-devtools/**/*
642       - subprojects/gstreamer/**/*
643       - subprojects/gst-plugins-base/**/*
644       - subprojects/gst-plugins-good/**/*
645
646 valgrind ugly:
647   extends: '.valgrind fedora x86_64'
648   variables:
649     TEST_SUITE: "check.gst-plugins-ugly\\..*"
650   rules:
651     - changes:
652       - "*"
653       - scripts/*
654       - subprojects/gst-ci/**/*
655       - subprojects/gst-devtools/**/*
656       - subprojects/gstreamer/**/*
657       - subprojects/gst-plugins-base/**/*
658       - subprojects/gst-plugins-good/**/*
659       - subprojects/gst-plugins-ugly/**/*
660
661 valgrind bad:
662   extends: '.valgrind fedora x86_64'
663   variables:
664     TEST_SUITE: "check.gst-plugins-bad\\..*"
665   rules:
666     - changes:
667       - "*"
668       - scripts/*
669       - subprojects/gst-ci/**/*
670       - subprojects/gst-devtools/**/*
671       - subprojects/gstreamer/**/*
672       - subprojects/gst-plugins-base/**/*
673       - subprojects/gst-plugins-good/**/*
674       - subprojects/gst-plugins-bad/**/*
675
676 valgrind ges:
677   extends: '.valgrind fedora x86_64'
678   variables:
679     TEST_SUITE: "check.gst-editing-services\\..*"
680   rules:
681     - changes:
682       - "*"
683       - scripts/*
684       - subprojects/gst-ci/**/*
685       - subprojects/gst-devtools/**/*
686       - subprojects/gstreamer/**/*
687       - subprojects/gst-plugins-base/**/*
688       - subprojects/gst-plugins-good/**/*
689       - subprojects/gst-plugins-bad/**/*
690       - subprojects/gst-editing-services/**/*
691
692 # ---- Integration ----- #
693
694 .documentation:
695   image: $FEDORA_DOCS_IMAGE
696   extends:
697     - '.build_ccache_vars'
698   variables:
699     MESON_ARGS: *simple_build
700     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
701     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
702   script:
703   - pip3 install --upgrade hotdoc
704   - *build
705   - ./gst-env.py ninja -C build/ plugins_doc_caches
706   - ./ci/scripts/check-documentation-diff.py
707   - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
708   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
709
710   artifacts:
711     when: always
712     expire_in: "7 days"
713     paths:
714     - documentation/
715     - plugins-cache-diffs/
716
717 #
718 # This jobs runs in gsrtreamer namespace when after the merge into main branch.
719 # The produced artifact is later used to automatically update the web page.
720 #
721 documentation:
722   stage: integrate
723   extends:
724     - '.documentation'
725   needs: []
726   rules:
727     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
728
729 #
730 # This job is run in users namespace to validate documentation before merging
731 # MR.
732 #
733 build documentation:
734   extends:
735     - '.documentation'
736   stage: build
737   needs:
738     - "trigger"
739
740   stage: build
741   rules:
742     - changes:
743       - .gitlab-ci.yml
744       - ci/gitlab/freedesktop_doc_importer.sh
745       - subprojects/*.wrap
746       - subprojects/gst-docs/**/*
747       - subprojects/gst-devtools/**/*
748       - subprojects/gst-editing-services/**/*
749       - subprojects/gst-libav/**/*
750       - subprojects/gst-omx/**/*
751       - subprojects/gst-plugins-bad/**/*
752       - subprojects/gst-plugins-base/**/*
753       - subprojects/gst-plugins-good/**/*
754       - subprojects/gst-plugins-ugly/**/*
755       - subprojects/gstreamer/**/*
756       - subprojects/gstreamer-vaapi/**/*
757       - subprojects/gst-rtsp-server/**/*
758
759 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
760 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
761 cerbero trigger:
762   stage: build
763   image: $FEDORA_IMAGE
764   needs:
765     - "fedora amd64 docker"
766   script:
767     - python3 -m pip install --user python-gitlab
768     - ci/gitlab/trigger_cerbero_pipeline.py
769
770   variables:
771     # Use GST_UPSTREAM_BRANCH
772     UPSTREAM_BRANCH: 'main'
773
774   rules:
775     - changes:
776       - .gitlab-ci.yml
777       - ci/gitlab/tigger_cerbero_pipeline.py
778       - subprojects/gst-devtools/**/*
779       - subprojects/gst-editing-services/**/*
780       - subprojects/gst-libav/**/*
781       - subprojects/gst-plugins-bad/**/*
782       - subprojects/gst-plugins-base/**/*
783       - subprojects/gst-plugins-good/**/*
784       - subprojects/gst-plugins-ugly/**/*
785       - subprojects/gst-python/**/*
786       - subprojects/gstreamer/**/*
787       - subprojects/gst-rtsp-server/**/*
788       - subprojects/gst-examples/**/*