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'
292 - "fedora amd64 docker"
294 MESON_ARGS: *simple_build
299 - '.fdo.suffixed-image@fedora'
300 - '.build fedora x86_64'
302 - "fedora amd64 docker"
305 - ./gst-env.py gst-inspect-1.0 --version
306 - ./gst-env.py gst-inspect-1.0
307 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
308 - rm -rf $CI_PROJECT_DIR/destdir
310 build nodebug fedora x86_64:
313 - '.fdo.suffixed-image@fedora'
316 - "fedora amd64 docker"
318 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
320 build clang fedora x86_64:
321 extends: '.build fedora x86_64'
324 CXX: 'ccache clang++'
327 image: $WINDOWS_IMAGE
334 - "windows amd64 docker"
338 ${DEFAULT_MESON_ARGS}
342 -Dgst-plugins-base:pango=enabled
343 -Dgst-plugins-good:cairo=enabled
344 # Needs to not be empty otherwise the newline -> space replace command in
345 # `script:` will fail
346 MESON_CROSS_ARGS: ' '
348 # If this matches, it means the pipeline is running against either the main
349 # or a stable branch, so make it manual
350 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
355 - subprojects/win-*/*
357 # Make sure powershell exits on errors
358 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
359 - $ErrorActionPreference = "Stop"
361 # Set the code page to UTF-8
364 - ci/scripts/handle-subprojects-cache.py subprojects/
365 # For some reason, options are separated by newline instead of space, so we
366 # have to replace them first.
367 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
368 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
369 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
370 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
371 meson compile -C build"
376 - 'build/meson-logs/'
379 extends: '.build windows'
383 - !reference [".build windows", "script",]
384 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
385 .\gst-env.py gst-inspect-1.0.exe --version &&
386 .\gst-env.py gst-inspect-1.0.exe &&
388 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
389 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
392 extends: '.build windows'
396 build vs2019 arm64 uwp:
397 extends: '.build windows'
400 # pango pulls in cairo which pulls in pixman which doesn't build because of
401 # https://github.com/mesonbuild/meson/issues/9889
403 -Dgst-plugins-base:pango=disabled
404 -Dgst-plugins-good:cairo=disabled
405 -Dgst-devtools:cairo=disabled
406 --cross-file ci/meson/vs2019-arm64-cross-file.txt
407 --native-file ci/meson/vs2019-x64-native-file.txt
410 extends: '.build windows'
418 # Make sure powershell exits on errors
419 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
420 - $ErrorActionPreference = "Stop"
422 # Set the code page to UTF-8
425 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
427 - $env:MSYSTEM = "UCRT64"
428 - $env:CHERE_INVOKING = "1"
429 - $env:MSYS2_PATH_TYPE = "inherit"
430 # For some reason, options are separated by newline instead of space, so we
431 # have to replace them first.
432 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
433 # Replace forward slashes with backwards so bash doesn't complain
434 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
435 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
442 - '.build_ccache_vars'
446 MESON_ARGS: *simple_build
448 # Disable colored output to avoid weird rendering issues
449 GST_DEBUG_NO_COLOR: "true"
450 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
451 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
453 CARGO_HOME: "/cache/gstreamer/cargo"
454 # Enable the fault handler so we get backtraces on segfaults.
455 # any non-empty string will do
456 PYTHONFAULTHANDLER: "enabled"
463 - echo "-> Running ${TEST_SUITE}"
466 gst-validate-launcher ${TEST_SUITE}
473 --timeout-factor "${TIMEOUT_FACTOR}"
474 --fail-on-testlist-change
475 -l "${CI_PROJECT_DIR}/validate-logs/"
476 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
477 ${EXTRA_VALIDATE_ARGS}
479 - mv build/meson-logs/ meson-logs
488 - "validate-logs/*.xml"
493 - '.fdo.suffixed-image@fedora'
496 - "fedora amd64 docker"
500 extends: '.test fedora x86_64'
502 TEST_SUITE: "check.gst*"
504 integration testsuites fedora:
505 extends: '.test fedora x86_64'
508 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
509 TEST_SUITE: "validate ges"
512 gstreamer-full static build:
513 extends: '.build fedora x86_64'
517 --default-library=static
523 - meson test -C build -v test-gst-full
530 gstreamer-full-minimal static build:
531 extends: 'gstreamer-full static build'
535 --default-library=static
537 -Dgstreamer:gst_debug=false
538 -Dauto_features=disabled
539 -Dgstreamer:check=enabled
541 -Dgst-plugins-base:alsa=enabled
542 -Dgst-plugins-base:typefind=enabled
543 -Dgst-plugins-base:pbtypes=enabled
544 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
545 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
546 -Dgst-full-device-providers=alsa:alsadeviceprovider
547 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
552 - meson test -C build -v test-gst-full
553 - 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"
554 - strip build/libgstreamer-full-1.0.so
555 - ls -l build/libgstreamer-full-1.0.so
563 .valgrind fedora x86_64:
564 extends: '.test fedora x86_64'
567 EXTRA_VALIDATE_ARGS: "--valgrind"
570 extends: '.valgrind fedora x86_64'
572 TEST_SUITE: "check.gstreamer\\..*"
578 - subprojects/gst-devtools/**/*
579 - subprojects/gstreamer/**/*
582 extends: '.valgrind fedora x86_64'
584 TEST_SUITE: "check.gst-plugins-base\\..*"
590 - subprojects/gst-devtools/**/*
591 - subprojects/gstreamer/**/*
592 - subprojects/gst-plugins-base/**/*
595 extends: '.valgrind fedora x86_64'
597 TEST_SUITE: "check.gst-plugins-good\\..*"
598 # take longer time due to splitmux unit test
605 - subprojects/gst-devtools/**/*
606 - subprojects/gstreamer/**/*
607 - subprojects/gst-plugins-base/**/*
608 - subprojects/gst-plugins-good/**/*
611 extends: '.valgrind fedora x86_64'
613 TEST_SUITE: "check.gst-plugins-ugly\\..*"
619 - subprojects/gst-devtools/**/*
620 - subprojects/gstreamer/**/*
621 - subprojects/gst-plugins-base/**/*
622 - subprojects/gst-plugins-good/**/*
623 - subprojects/gst-plugins-ugly/**/*
626 extends: '.valgrind fedora x86_64'
628 TEST_SUITE: "check.gst-plugins-bad\\..*"
634 - subprojects/gst-devtools/**/*
635 - subprojects/gstreamer/**/*
636 - subprojects/gst-plugins-base/**/*
637 - subprojects/gst-plugins-good/**/*
638 - subprojects/gst-plugins-bad/**/*
641 extends: '.valgrind fedora x86_64'
643 TEST_SUITE: "check.gst-editing-services\\..*"
649 - subprojects/gst-devtools/**/*
650 - subprojects/gstreamer/**/*
651 - subprojects/gst-plugins-base/**/*
652 - subprojects/gst-plugins-good/**/*
653 - subprojects/gst-plugins-bad/**/*
654 - subprojects/gst-editing-services/**/*
655 - subprojects/gst-python/**/*
657 # ---- Integration ----- #
660 extends: '.build fedora x86_64'
662 MESON_ARGS: *simple_build
663 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
664 # Disable werror for the docs build, we don't need it
666 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
668 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
669 - export RUSTUP_HOME='/usr/local/rustup'
671 - ci/scripts/handle-subprojects-cache.py subprojects/
673 - meson build/ $MESON_ARGS
674 - ccache --show-stats
676 - ./gst-env.py ninja -C build/ plugins_doc_caches
677 # Ignore modifications to wrap files made by meson
678 - git checkout subprojects/*.wrap
679 - ./ci/scripts/check-documentation-diff.py
681 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
682 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
689 - plugins-cache-diffs/
692 # This jobs runs in gstreamer namespace when after the merge into main branch.
693 # The produced artifact is later used to automatically update the web page.
700 - "fedora amd64 docker"
702 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
705 # This job is run in users namespace to validate documentation before merging
713 - "fedora amd64 docker"
715 # Never run post merge, we have the `documentation` always running for that
716 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
722 - subprojects/gst-docs/**/*
723 - subprojects/gst-devtools/**/*
724 - subprojects/gst-editing-services/**/*
725 - subprojects/gst-libav/**/*
726 - subprojects/gst-omx/**/*
727 - subprojects/gst-plugins-bad/**/*
728 - subprojects/gst-plugins-base/**/*
729 - subprojects/gst-plugins-good/**/*
730 - subprojects/gst-plugins-ugly/**/*
731 - subprojects/gstreamer/**/*
732 - subprojects/gstreamer-vaapi/**/*
733 - subprojects/gst-rtsp-server/**/*
735 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
736 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
744 - '.fdo.suffixed-image@fedora'
746 - "fedora amd64 docker"
748 - ci/gitlab/trigger_cerbero_pipeline.py
751 # Never run post merge
752 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
757 - subprojects/gst-devtools/**/*
758 - subprojects/gst-editing-services/**/*
759 - subprojects/gst-libav/**/*
760 - subprojects/gst-plugins-bad/**/*
761 - subprojects/gst-plugins-base/**/*
762 - subprojects/gst-plugins-good/**/*
763 - subprojects/gst-plugins-ugly/**/*
764 - subprojects/gst-python/**/*
765 - subprojects/gstreamer/**/*
766 - subprojects/gst-rtsp-server/**/*
767 - subprojects/gst-examples/**/*