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