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: 'main'
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'
140 FDO_DISTRIBUTION_VERSION: 'stretch'
141 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
142 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
143 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
144 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
146 gst-indent amd64 docker:
148 - '.gst-indent image'
149 - '.fdo.container-build@debian'
151 # Do not depend on the trigger, as we want to run indent always
154 windows amd64 docker:
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
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"
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")
175 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
178 echo "Failed to build the image"
183 # ---- Preparation ----- #
189 - '.gst-indent image'
190 - '.fdo.suffixed-image@debian'
193 - job: 'gst-indent amd64 docker'
196 - ./scripts/check-format-c
197 - ./scripts/format-csharp --check
199 # Don't check indentation on post merge pipelines
200 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
202 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
206 # build setup templates
208 .build_template: &build
209 - ci/scripts/handle-subprojects-cache.py subprojects/
211 - meson build/ $MESON_ARGS
213 - ccache --show-stats
217 CCACHE_COMPILERCHECK: 'content'
218 CCACHE_COMPRESS: 'true'
219 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
220 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
221 # shared across everything really
222 CCACHE_MAXSIZE: '10G'
223 CARGO_HOME: '/cache/gstreamer/cargo'
225 .base_modules_changes: &modules_changes
231 - subprojects/gst-devtools/**/*
232 - subprojects/gst-editing-services/**/*
233 - subprojects/gst-integration-testsuites/**/*
234 - subprojects/gst-libav/**/*
235 - subprojects/gst-omx/**/*
236 - subprojects/gst-plugins-bad/**/*
237 - subprojects/gst-plugins-base/**/*
238 - subprojects/gst-plugins-good/**/*
239 - subprojects/gst-plugins-ugly/**/*
240 - subprojects/gst-python/**/*
241 - subprojects/gstreamer/**/*
242 - subprojects/gstreamer-sharp/**/*
243 - subprojects/gstreamer-vaapi/**/*
244 - subprojects/gst-rtsp-server/**/*
246 .simple_fedora_build: &simple_build >-
247 ${DEFAULT_MESON_ARGS}
250 -Dgst-omx:target=generic
253 ${MESON_BUILDTYPE_ARGS}
259 - '.build_ccache_vars'
262 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
263 # Also need to take into account I/O of pulling docker images and uploading artifacts
266 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
269 - ./gst-env.py gst-inspect-1.0 --version
270 - ./gst-env.py gst-inspect-1.0
272 - mv build/meson-logs/ meson-logs
279 # If this matches, it means the pipeline is running against either the main
280 # or a stable branch, so make it manual
281 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
286 .build fedora x86_64:
289 - '.fdo.suffixed-image@fedora'
293 - "fedora amd64 docker"
295 MESON_ARGS: *simple_build
300 - '.fdo.suffixed-image@fedora'
301 - '.build fedora x86_64'
304 - "fedora amd64 docker"
307 - ./gst-env.py gst-inspect-1.0 --version
308 - ./gst-env.py gst-inspect-1.0
309 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
310 - rm -rf $CI_PROJECT_DIR/destdir
312 build nodebug fedora x86_64:
315 - '.fdo.suffixed-image@fedora'
319 - "fedora amd64 docker"
321 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
323 build clang fedora x86_64:
324 extends: '.build fedora x86_64'
327 CXX: 'ccache clang++'
330 image: $WINDOWS_IMAGE
338 - "windows amd64 docker"
342 ${DEFAULT_MESON_ARGS}
346 -Dgst-plugins-base:pango=enabled
347 -Dgst-plugins-good:cairo=enabled
348 # Needs to not be empty otherwise the newline -> space replace command in
349 # `script:` will fail
350 MESON_CROSS_ARGS: ' '
352 # If this matches, it means the pipeline is running against either the main
353 # or a stable branch, so make it manual
354 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
359 - subprojects/win-*/*
361 # Make sure powershell exits on errors
362 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
363 - $ErrorActionPreference = "Stop"
365 # Set the code page to UTF-8
368 - ci/scripts/handle-subprojects-cache.py subprojects/
369 # For some reason, options are separated by newline instead of space, so we
370 # have to replace them first.
371 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
372 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
373 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
374 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
375 meson compile -C build"
380 - 'build/meson-logs/'
383 extends: '.build windows'
387 - !reference [".build windows", "script",]
388 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
389 .\gst-env.py gst-inspect-1.0.exe --version &&
390 .\gst-env.py gst-inspect-1.0.exe &&
392 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
393 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
396 extends: '.build windows'
400 build vs2019 arm64 uwp:
401 extends: '.build windows'
404 # pango pulls in cairo which pulls in pixman which doesn't build because of
405 # https://github.com/mesonbuild/meson/issues/9889
407 -Dgst-plugins-base:pango=disabled
408 -Dgst-plugins-good:cairo=disabled
409 -Dgst-devtools:cairo=disabled
410 --cross-file ci/meson/vs2019-arm64-cross-file.txt
411 --native-file ci/meson/vs2019-x64-native-file.txt
414 extends: '.build windows'
422 # Make sure powershell exits on errors
423 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
424 - $ErrorActionPreference = "Stop"
426 # Set the code page to UTF-8
429 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
431 - $env:MSYSTEM = "UCRT64"
432 - $env:CHERE_INVOKING = "1"
433 - $env:MSYS2_PATH_TYPE = "inherit"
434 # For some reason, options are separated by newline instead of space, so we
435 # have to replace them first.
436 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
437 # Replace forward slashes with backwards so bash doesn't complain
438 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
439 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
446 - '.build_ccache_vars'
450 MESON_ARGS: *simple_build
452 # Disable colored output to avoid weird rendering issues
453 GST_DEBUG_NO_COLOR: "true"
454 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
455 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
457 CARGO_HOME: "/cache/gstreamer/cargo"
458 # Enable the fault handler so we get backtraces on segfaults.
459 # any non-empty string will do
460 PYTHONFAULTHANDLER: "enabled"
467 - echo "-> Running ${TEST_SUITE}"
470 gst-validate-launcher ${TEST_SUITE}
477 --timeout-factor "${TIMEOUT_FACTOR}"
478 --fail-on-testlist-change
479 -l "${CI_PROJECT_DIR}/validate-logs/"
480 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
481 ${EXTRA_VALIDATE_ARGS}
483 - mv build/meson-logs/ meson-logs
492 - "validate-logs/*.xml"
497 - '.fdo.suffixed-image@fedora'
501 - "fedora amd64 docker"
505 extends: '.test fedora x86_64'
507 TEST_SUITE: "check.gst*"
509 integration testsuites fedora:
510 extends: '.test fedora x86_64'
513 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
514 TEST_SUITE: "validate ges"
517 gstreamer-full static build:
518 extends: '.build fedora x86_64'
522 --default-library=static
528 - meson test -C build -v test-gst-full
535 gstreamer-full-minimal static build:
536 extends: 'gstreamer-full static build'
540 --default-library=static
542 -Dgstreamer:gst_debug=false
543 -Dauto_features=disabled
544 -Dgstreamer:check=enabled
546 -Dgst-plugins-base:alsa=enabled
547 -Dgst-plugins-base:typefind=enabled
548 -Dgst-plugins-base:pbtypes=enabled
549 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
550 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
551 -Dgst-full-device-providers=alsa:alsadeviceprovider
552 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
557 - meson test -C build -v test-gst-full
558 - 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"
559 - strip build/libgstreamer-full-1.0.so
560 - ls -l build/libgstreamer-full-1.0.so
568 .valgrind fedora x86_64:
569 extends: '.test fedora x86_64'
572 EXTRA_VALIDATE_ARGS: "--valgrind"
575 extends: '.valgrind fedora x86_64'
577 TEST_SUITE: "check.gstreamer\\..*"
583 - subprojects/gst-devtools/**/*
584 - subprojects/gstreamer/**/*
587 extends: '.valgrind fedora x86_64'
589 TEST_SUITE: "check.gst-plugins-base\\..*"
595 - subprojects/gst-devtools/**/*
596 - subprojects/gstreamer/**/*
597 - subprojects/gst-plugins-base/**/*
600 extends: '.valgrind fedora x86_64'
602 TEST_SUITE: "check.gst-plugins-good\\..*"
603 # take longer time due to splitmux unit test
610 - subprojects/gst-devtools/**/*
611 - subprojects/gstreamer/**/*
612 - subprojects/gst-plugins-base/**/*
613 - subprojects/gst-plugins-good/**/*
616 extends: '.valgrind fedora x86_64'
618 TEST_SUITE: "check.gst-plugins-ugly\\..*"
624 - subprojects/gst-devtools/**/*
625 - subprojects/gstreamer/**/*
626 - subprojects/gst-plugins-base/**/*
627 - subprojects/gst-plugins-good/**/*
628 - subprojects/gst-plugins-ugly/**/*
631 extends: '.valgrind fedora x86_64'
633 TEST_SUITE: "check.gst-plugins-bad\\..*"
639 - subprojects/gst-devtools/**/*
640 - subprojects/gstreamer/**/*
641 - subprojects/gst-plugins-base/**/*
642 - subprojects/gst-plugins-good/**/*
643 - subprojects/gst-plugins-bad/**/*
646 extends: '.valgrind fedora x86_64'
648 TEST_SUITE: "check.gst-editing-services\\..*"
654 - subprojects/gst-devtools/**/*
655 - subprojects/gstreamer/**/*
656 - subprojects/gst-plugins-base/**/*
657 - subprojects/gst-plugins-good/**/*
658 - subprojects/gst-plugins-bad/**/*
659 - subprojects/gst-editing-services/**/*
660 - subprojects/gst-python/**/*
662 # ---- Integration ----- #
665 extends: '.build fedora x86_64'
667 MESON_ARGS: *simple_build
668 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
669 # Disable werror for the docs build, we don't need it
671 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
673 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
674 - export RUSTUP_HOME='/usr/local/rustup'
676 - ci/scripts/handle-subprojects-cache.py subprojects/
678 - meson build/ $MESON_ARGS
679 - ccache --show-stats
681 - ./gst-env.py ninja -C build/ plugins_doc_caches
682 # Ignore modifications to wrap files made by meson
683 - git checkout subprojects/*.wrap
684 - ./ci/scripts/check-documentation-diff.py
686 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
687 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
694 - plugins-cache-diffs/
697 # This jobs runs in gstreamer namespace when after the merge into main branch.
698 # The produced artifact is later used to automatically update the web page.
706 - "fedora amd64 docker"
708 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
711 # This job is run in users namespace to validate documentation before merging
720 - "fedora amd64 docker"
722 # Never run post merge, we have the `documentation` always running for that
723 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
729 - subprojects/gst-docs/**/*
730 - subprojects/gst-devtools/**/*
731 - subprojects/gst-editing-services/**/*
732 - subprojects/gst-libav/**/*
733 - subprojects/gst-omx/**/*
734 - subprojects/gst-plugins-bad/**/*
735 - subprojects/gst-plugins-base/**/*
736 - subprojects/gst-plugins-good/**/*
737 - subprojects/gst-plugins-ugly/**/*
738 - subprojects/gstreamer/**/*
739 - subprojects/gstreamer-vaapi/**/*
740 - subprojects/gst-rtsp-server/**/*
742 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
743 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
751 - '.fdo.suffixed-image@fedora'
754 - "fedora amd64 docker"
756 - ci/gitlab/trigger_cerbero_pipeline.py
759 # Never run post merge
760 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
765 - subprojects/gst-devtools/**/*
766 - subprojects/gst-editing-services/**/*
767 - subprojects/gst-libav/**/*
768 - subprojects/gst-plugins-bad/**/*
769 - subprojects/gst-plugins-base/**/*
770 - subprojects/gst-plugins-good/**/*
771 - subprojects/gst-plugins-ugly/**/*
772 - subprojects/gst-python/**/*
773 - subprojects/gstreamer/**/*
774 - subprojects/gst-rtsp-server/**/*
775 - subprojects/gst-examples/**/*