2 - project: 'freedesktop/ci-templates'
3 ref: 14731f78c23c7b523a85a26a068ade9ac1ecd2f3
4 file: '/templates/fedora.yml'
5 - project: 'freedesktop/ci-templates'
6 ref: 14731f78c23c7b523a85a26a068ade9ac1ecd2f3
7 file: '/templates/debian.yml'
10 # These are the version tags for the docker images the CI runs against.
11 # If you are hacking on them or need a them to rebuild, you need to change
12 # the appropriate version string in this file which will cause a rebuild.
14 - local: '.gitlab-image-tags.yml'
20 # Use the resulting binaries
26 # Branch to track for modules that have no ref specified in the manifest
27 GST_UPSTREAM_BRANCH: '1.22'
29 FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
31 FEDORA_AMD64_SUFFIX: 'amd64/fedora'
32 INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
33 WINDOWS_AMD64_SUFFIX: 'amd64/windows'
35 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
36 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
38 MESON_BUILDTYPE_ARGS: --default-library=both
40 -Dlibnice:tests=disabled
41 -Dlibnice:examples=disabled
42 -Dopenh264:tests=disabled
43 -Dpygobject:tests=false
56 -Dgstreamer:werror=true
57 -Dgst-plugins-base:werror=true
58 -Dgst-plugins-good:werror=true
59 -Dgst-plugins-ugly:werror=true
60 -Dgst-plugins-bad:werror=true
61 -Dgst-rtsp-server:werror=true
62 -Dgst-libav:werror=true
63 -Dgst-examples:werror=true
64 -Dgst-editing-services:werror=true
65 -Dgst-docs:werror=true
67 -Dgst-devtools:werror=true
68 -Dgst-python:werror=true
69 -Dgstreamer-vaapi:werror=true
70 -Dgstreamer-sharp:werror=true
73 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
75 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
77 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
78 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
80 - if: '$CI_COMMIT_TAG'
81 - if: '$CI_COMMIT_BRANCH'
83 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
88 # This can be used to configure global behaviour our our jobs.
94 - 'runner_system_failure'
95 - 'stuck_or_timeout_failure'
100 # This is an empty job that is used to trigger the pipeline.
107 - echo "Trigger job done, now running the pipeline."
109 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
110 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
111 # Require explicit action to trigger tests post merge, but we want to
112 # automatically trigger the integratation stage
113 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH && $CI_JOB_STAGE != "integrate"'
115 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
116 # to avoid wasting CI resources
117 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
123 FDO_DISTRIBUTION_VERSION: '31'
124 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
125 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
126 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
131 - '.fdo.container-build@fedora'
139 FDO_DISTRIBUTION_VERSION: 'stretch'
140 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
141 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
142 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
143 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
145 gst-indent amd64 docker:
147 - '.gst-indent image'
148 - '.fdo.container-build@debian'
150 # Do not depend on the trigger, as we want to run indent always
153 windows amd64 docker:
157 # Unlike the buildah/linux jobs, this file
158 # needs to be relative to docker/windows/ subdir
159 # as it makes life easier in the powershell script
161 # We also don't need a CONTEXT_DIR var as its also
162 # hardcoded to be docker/windows/
163 DOCKERFILE: "ci/docker/windows/Dockerfile"
169 # We need to pass an array and to resolve the env vars, so we can't use a variable:
170 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
172 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
175 echo "Failed to build the image"
180 # ---- Preparation ----- #
186 - '.gst-indent image'
187 - '.fdo.suffixed-image@debian'
190 - job: 'gst-indent amd64 docker'
193 - ./scripts/check-format-c
194 - ./scripts/format-csharp --check
196 # Don't check indentation on post merge pipelines
197 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
199 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
203 # build setup templates
205 .build_template: &build
207 - ci/scripts/handle-subprojects-cache.py subprojects/
211 - meson build/ $MESON_ARGS
215 - ccache --show-stats
219 CCACHE_COMPILERCHECK: 'content'
220 CCACHE_COMPRESS: 'true'
221 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
222 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
223 # shared across everything really
224 CCACHE_MAXSIZE: '10G'
225 CARGO_HOME: '/cache/gstreamer/cargo'
227 .base_modules_changes: &modules_changes
233 - subprojects/gst-devtools/**/*
234 - subprojects/gst-editing-services/**/*
235 - subprojects/gst-integration-testsuites/**/*
236 - subprojects/gst-libav/**/*
237 - subprojects/gst-omx/**/*
238 - subprojects/gst-plugins-bad/**/*
239 - subprojects/gst-plugins-base/**/*
240 - subprojects/gst-plugins-good/**/*
241 - subprojects/gst-plugins-ugly/**/*
242 - subprojects/gst-python/**/*
243 - subprojects/gstreamer/**/*
244 - subprojects/gstreamer-sharp/**/*
245 - subprojects/gstreamer-vaapi/**/*
246 - subprojects/gst-rtsp-server/**/*
248 .simple_fedora_build: &simple_build >-
249 ${DEFAULT_MESON_ARGS}
252 -Dgst-omx:target=generic
255 ${MESON_BUILDTYPE_ARGS}
261 - '.build_ccache_vars'
264 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
265 # Also need to take into account I/O of pulling docker images and uploading artifacts
268 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
271 - ./gst-env.py gst-inspect-1.0 --version
272 - ./gst-env.py gst-inspect-1.0
274 - mv build/meson-logs/ meson-logs
281 # If this matches, it means the pipeline is running against either the main
282 # or a stable branch, so make it manual
283 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
288 .build fedora x86_64:
291 - '.fdo.suffixed-image@fedora'
295 - "fedora amd64 docker"
297 MESON_ARGS: *simple_build
302 - '.fdo.suffixed-image@fedora'
303 - '.build fedora x86_64'
306 - "fedora amd64 docker"
309 - ./gst-env.py gst-inspect-1.0 --version
310 - ./gst-env.py gst-inspect-1.0
311 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
312 - rm -rf $CI_PROJECT_DIR/destdir
314 build nodebug fedora x86_64:
317 - '.fdo.suffixed-image@fedora'
321 - "fedora amd64 docker"
323 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
325 build clang fedora x86_64:
326 extends: '.build fedora x86_64'
329 CXX: 'ccache clang++'
332 image: $WINDOWS_IMAGE
340 - "windows amd64 docker"
344 ${DEFAULT_MESON_ARGS}
348 -Dgst-plugins-base:pango=enabled
349 -Dgst-plugins-good:cairo=enabled
350 -Dgst-plugins-good:soup=enabled
351 -Dgst-plugins-good:soup-lookup-dep=true
352 # Needs to not be empty otherwise the newline -> space replace command in
353 # `script:` will fail
354 MESON_CROSS_ARGS: ' '
356 # If this matches, it means the pipeline is running against either the main
357 # or a stable branch, so make it manual
358 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
363 - subprojects/win-*/*
365 # Install more recent version. We need at least 0.63 for diff_files support in wraps
366 - pip3 install -U meson==1.1.1
368 # Make sure powershell exits on errors
369 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
370 - $ErrorActionPreference = "Stop"
372 # Set the code page to UTF-8
375 - ci/scripts/handle-subprojects-cache.py subprojects/
376 # For some reason, options are separated by newline instead of space, so we
377 # have to replace them first.
378 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
379 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
380 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
381 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
382 meson compile -C build"
387 - 'build/meson-logs/'
390 extends: '.build windows'
394 - !reference [".build windows", "script",]
395 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
396 .\gst-env.py gst-inspect-1.0.exe --version &&
397 .\gst-env.py gst-inspect-1.0.exe &&
399 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
400 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
403 extends: '.build windows'
407 build vs2019 arm64 uwp:
408 extends: '.build windows'
411 # pango pulls in cairo which pulls in pixman which doesn't build because of
412 # https://github.com/mesonbuild/meson/issues/9889
413 # libsoup requires glib-compile-resources, which isn't available in a cross
416 -Dgst-plugins-base:pango=disabled
417 -Dgst-plugins-good:cairo=disabled
418 -Dgst-plugins-good:soup-lookup-dep=false
419 -Dgst-devtools:cairo=disabled
420 --cross-file ci/meson/vs2019-arm64-cross-file.txt
421 --native-file ci/meson/vs2019-x64-native-file.txt
424 extends: '.build windows'
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"
436 # Set the code page to UTF-8
439 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
441 - $env:MSYSTEM = "UCRT64"
442 - $env:CHERE_INVOKING = "1"
443 - $env:MSYS2_PATH_TYPE = "inherit"
444 # For some reason, options are separated by newline instead of space, so we
445 # have to replace them first.
446 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
447 # Replace forward slashes with backwards so bash doesn't complain
448 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
449 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
456 - '.build_ccache_vars'
460 MESON_ARGS: *simple_build
462 # Disable colored output to avoid weird rendering issues
463 GST_DEBUG_NO_COLOR: "true"
464 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
465 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
467 CARGO_HOME: "/cache/gstreamer/cargo"
468 # Enable the fault handler so we get backtraces on segfaults.
469 # any non-empty string will do
470 PYTHONFAULTHANDLER: "enabled"
477 - echo "-> Running ${TEST_SUITE}"
480 gst-validate-launcher ${TEST_SUITE}
486 --timeout-factor "${TIMEOUT_FACTOR}"
487 --fail-on-testlist-change
488 -l "${CI_PROJECT_DIR}/validate-logs/"
489 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
490 ${EXTRA_VALIDATE_ARGS}
492 - mv build/meson-logs/ meson-logs
501 - "validate-logs/*.xml"
506 - '.fdo.suffixed-image@fedora'
510 - "fedora amd64 docker"
514 extends: '.test fedora x86_64'
516 TEST_SUITE: "check.gst*"
518 integration testsuites fedora:
519 extends: '.test fedora x86_64'
522 MESON_BUILDTYPE_ARGS: >
527 -Dgst-examples=disabled
531 -Dgstreamer:benchmarks=disabled
532 -Dgst-plugins-good:gtk3=disabled
533 -Dgst-plugins-bad:microdns=disabled
534 -Dgst-plugins-bad:avtp=disabled
535 -Dgst-plugins-bad:opencv=disabled
536 -Dgst-plugins-bad:webrtc=disabled
537 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
538 TEST_SUITE: "validate ges"
541 gstreamer-full static build:
542 extends: '.build fedora x86_64'
546 --default-library=static
552 - meson test -C build -v test-gst-full
559 gstreamer-full-minimal static build:
560 extends: 'gstreamer-full static build'
564 --default-library=static
566 -Dgstreamer:gst_debug=false
567 -Dauto_features=disabled
568 -Dgstreamer:check=enabled
570 -Dgst-plugins-base:alsa=enabled
571 -Dgst-plugins-base:typefind=enabled
572 -Dgst-plugins-base:pbtypes=enabled
573 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
574 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
575 -Dgst-full-device-providers=alsa:alsadeviceprovider
576 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
581 - meson test -C build -v test-gst-full
582 - 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"
583 - strip build/libgstreamer-full-1.0.so
584 - ls -l build/libgstreamer-full-1.0.so
592 .valgrind fedora x86_64:
593 extends: '.test fedora x86_64'
596 EXTRA_VALIDATE_ARGS: "--valgrind"
599 extends: '.valgrind fedora x86_64'
601 TEST_SUITE: "check.gstreamer\\..*"
607 - subprojects/gst-devtools/**/*
608 - subprojects/gstreamer/**/*
611 extends: '.valgrind fedora x86_64'
613 TEST_SUITE: "check.gst-plugins-base\\..*"
619 - subprojects/gst-devtools/**/*
620 - subprojects/gstreamer/**/*
621 - subprojects/gst-plugins-base/**/*
624 extends: '.valgrind fedora x86_64'
626 TEST_SUITE: "check.gst-plugins-good\\..*"
627 # take longer time due to splitmux unit test
634 - subprojects/gst-devtools/**/*
635 - subprojects/gstreamer/**/*
636 - subprojects/gst-plugins-base/**/*
637 - subprojects/gst-plugins-good/**/*
640 extends: '.valgrind fedora x86_64'
642 TEST_SUITE: "check.gst-plugins-ugly\\..*"
648 - subprojects/gst-devtools/**/*
649 - subprojects/gstreamer/**/*
650 - subprojects/gst-plugins-base/**/*
651 - subprojects/gst-plugins-good/**/*
652 - subprojects/gst-plugins-ugly/**/*
655 extends: '.valgrind fedora x86_64'
657 TEST_SUITE: "check.gst-plugins-bad\\..*"
663 - subprojects/gst-devtools/**/*
664 - subprojects/gstreamer/**/*
665 - subprojects/gst-plugins-base/**/*
666 - subprojects/gst-plugins-good/**/*
667 - subprojects/gst-plugins-bad/**/*
670 extends: '.valgrind fedora x86_64'
672 TEST_SUITE: "check.gst-editing-services\\..*"
678 - subprojects/gst-devtools/**/*
679 - subprojects/gstreamer/**/*
680 - subprojects/gst-plugins-base/**/*
681 - subprojects/gst-plugins-good/**/*
682 - subprojects/gst-plugins-bad/**/*
683 - subprojects/gst-editing-services/**/*
684 - subprojects/gst-python/**/*
685 # valgrind ges jobs are racy across the board and simply fail too often.
686 # Someone needs to go through job logs and figure out which jobs to mark
687 # as flaky. Until then, just ignore failures.
690 # ---- Integration ----- #
693 extends: '.build fedora x86_64'
695 MESON_ARGS: *simple_build
696 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
697 # Disable werror for the docs build, we don't need it
699 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
701 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
702 - export RUSTUP_HOME='/usr/local/rustup'
704 - ci/scripts/handle-subprojects-cache.py subprojects/
706 - meson build/ $MESON_ARGS
707 - ccache --show-stats
709 - ./gst-env.py ninja -C build/ plugins_doc_caches
710 # Ignore modifications to wrap files made by meson
711 - git checkout subprojects/*.wrap
712 - ./ci/scripts/check-documentation-diff.py
714 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
715 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
722 - plugins-cache-diffs/
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.
733 - "fedora amd64 docker"
735 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
738 # This job is run in users namespace to validate documentation before merging
747 - "fedora amd64 docker"
749 # Never run post merge, we have the `documentation` always running for that
750 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
756 - subprojects/gst-docs/**/*
757 - subprojects/gst-devtools/**/*
758 - subprojects/gst-editing-services/**/*
759 - subprojects/gst-libav/**/*
760 - subprojects/gst-omx/**/*
761 - subprojects/gst-plugins-bad/**/*
762 - subprojects/gst-plugins-base/**/*
763 - subprojects/gst-plugins-good/**/*
764 - subprojects/gst-plugins-ugly/**/*
765 - subprojects/gstreamer/**/*
766 - subprojects/gstreamer-vaapi/**/*
767 - subprojects/gst-rtsp-server/**/*
769 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
770 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
778 - '.fdo.suffixed-image@fedora'
781 - "fedora amd64 docker"
783 - ci/gitlab/trigger_cerbero_pipeline.py
786 # Never run post merge
787 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
792 - subprojects/gst-devtools/**/*
793 - subprojects/gst-editing-services/**/*
794 - subprojects/gst-libav/**/*
795 - subprojects/gst-plugins-bad/**/*
796 - subprojects/gst-plugins-base/**/*
797 - subprojects/gst-plugins-good/**/*
798 - subprojects/gst-plugins-ugly/**/*
799 - subprojects/gst-python/**/*
800 - subprojects/gstreamer/**/*
801 - subprojects/gst-rtsp-server/**/*
802 - subprojects/gst-examples/**/*