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'
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:
159 # Unlike the buildah/linux jobs, this file
160 # needs to be relative to docker/windows/ subdir
161 # as it makes life easier in the powershell script
163 # We also don't need a CONTEXT_DIR var as its also
164 # hardcoded to be docker/windows/
165 DOCKERFILE: "ci/docker/windows/Dockerfile"
171 # We need to pass an array and to resolve the env vars, so we can't use a variable:
172 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
174 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
177 echo "Failed to build the image"
182 # ---- Preparation ----- #
188 - '.gst-indent image'
189 - '.fdo.suffixed-image@debian'
192 - job: 'gst-indent amd64 docker'
195 - ./scripts/check-format-c
196 - ./scripts/format-csharp --check
198 # Don't check indentation on post merge pipelines
199 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
201 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
205 # build setup templates
207 .build_template: &build
209 - ci/scripts/handle-subprojects-cache.py subprojects/
213 - meson build/ $MESON_ARGS
217 - ccache --show-stats
221 CCACHE_COMPILERCHECK: 'content'
222 CCACHE_COMPRESS: 'true'
223 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
224 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
225 # shared across everything really
226 CCACHE_MAXSIZE: '10G'
227 CARGO_HOME: '/cache/gstreamer/cargo'
229 .base_modules_changes: &modules_changes
235 - subprojects/gst-devtools/**/*
236 - subprojects/gst-editing-services/**/*
237 - subprojects/gst-integration-testsuites/**/*
238 - subprojects/gst-libav/**/*
239 - subprojects/gst-omx/**/*
240 - subprojects/gst-plugins-bad/**/*
241 - subprojects/gst-plugins-base/**/*
242 - subprojects/gst-plugins-good/**/*
243 - subprojects/gst-plugins-ugly/**/*
244 - subprojects/gst-python/**/*
245 - subprojects/gstreamer/**/*
246 - subprojects/gstreamer-sharp/**/*
247 - subprojects/gstreamer-vaapi/**/*
248 - subprojects/gst-rtsp-server/**/*
250 .simple_fedora_build: &simple_build >-
251 ${DEFAULT_MESON_ARGS}
254 -Dgst-omx:target=generic
257 ${MESON_BUILDTYPE_ARGS}
263 - '.build_ccache_vars'
266 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
267 # Also need to take into account I/O of pulling docker images and uploading artifacts
270 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
273 - ./gst-env.py gst-inspect-1.0 --version
274 - ./gst-env.py gst-inspect-1.0
276 - mv build/meson-logs/ meson-logs
283 # If this matches, it means the pipeline is running against either the main
284 # or a stable branch, so make it manual
285 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
290 .build fedora x86_64:
293 - '.fdo.suffixed-image@fedora'
297 - "fedora amd64 docker"
299 MESON_ARGS: *simple_build
304 - '.fdo.suffixed-image@fedora'
305 - '.build fedora x86_64'
308 - "fedora amd64 docker"
311 - ./gst-env.py gst-inspect-1.0 --version
312 - ./gst-env.py gst-inspect-1.0
313 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
314 - rm -rf $CI_PROJECT_DIR/destdir
316 build nodebug fedora x86_64:
319 - '.fdo.suffixed-image@fedora'
323 - "fedora amd64 docker"
325 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
327 build clang fedora x86_64:
328 extends: '.build fedora x86_64'
331 CXX: 'ccache clang++'
334 image: $WINDOWS_IMAGE
342 - "windows amd64 docker"
346 ${DEFAULT_MESON_ARGS}
350 -Dgst-plugins-base:pango=enabled
351 -Dgst-plugins-good:cairo=enabled
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 # Make sure powershell exits on errors
366 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
367 - $ErrorActionPreference = "Stop"
369 # Set the code page to UTF-8
372 - ci/scripts/handle-subprojects-cache.py subprojects/
373 # For some reason, options are separated by newline instead of space, so we
374 # have to replace them first.
375 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
376 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
377 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
378 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
379 meson compile -C build"
384 - 'build/meson-logs/'
387 extends: '.build windows'
391 - !reference [".build windows", "script",]
392 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
393 .\gst-env.py gst-inspect-1.0.exe --version &&
394 .\gst-env.py gst-inspect-1.0.exe &&
396 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
397 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
400 extends: '.build windows'
404 build vs2019 arm64 uwp:
405 extends: '.build windows'
408 # pango pulls in cairo which pulls in pixman which doesn't build because of
409 # https://github.com/mesonbuild/meson/issues/9889
411 -Dgst-plugins-base:pango=disabled
412 -Dgst-plugins-good:cairo=disabled
413 -Dgst-devtools:cairo=disabled
414 --cross-file ci/meson/vs2019-arm64-cross-file.txt
415 --native-file ci/meson/vs2019-x64-native-file.txt
418 extends: '.build windows'
426 # Make sure powershell exits on errors
427 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
428 - $ErrorActionPreference = "Stop"
430 # Set the code page to UTF-8
433 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
435 - $env:MSYSTEM = "UCRT64"
436 - $env:CHERE_INVOKING = "1"
437 - $env:MSYS2_PATH_TYPE = "inherit"
438 # For some reason, options are separated by newline instead of space, so we
439 # have to replace them first.
440 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
441 # Replace forward slashes with backwards so bash doesn't complain
442 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
443 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
450 - '.build_ccache_vars'
454 MESON_ARGS: *simple_build
456 # Disable colored output to avoid weird rendering issues
457 GST_DEBUG_NO_COLOR: "true"
458 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
459 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
461 CARGO_HOME: "/cache/gstreamer/cargo"
462 # Enable the fault handler so we get backtraces on segfaults.
463 # any non-empty string will do
464 PYTHONFAULTHANDLER: "enabled"
471 - echo "-> Running ${TEST_SUITE}"
474 gst-validate-launcher ${TEST_SUITE}
481 --timeout-factor "${TIMEOUT_FACTOR}"
482 --fail-on-testlist-change
483 -l "${CI_PROJECT_DIR}/validate-logs/"
484 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
485 ${EXTRA_VALIDATE_ARGS}
487 - mv build/meson-logs/ meson-logs
496 - "validate-logs/*.xml"
501 - '.fdo.suffixed-image@fedora'
505 - "fedora amd64 docker"
509 extends: '.test fedora x86_64'
511 TEST_SUITE: "check.gst*"
513 integration testsuites fedora:
514 extends: '.test fedora x86_64'
517 MESON_BUILDTYPE_ARGS: >
522 -Dgst-examples=disabled
526 -Dgstreamer:benchmarks=disabled
527 -Dgst-plugins-good:gtk3=disabled
528 -Dgst-plugins-bad:microdns=disabled
529 -Dgst-plugins-bad:avtp=disabled
530 -Dgst-plugins-bad:opencv=disabled
531 -Dgst-plugins-bad:webrtc=disabled
532 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
533 TEST_SUITE: "validate ges"
536 gstreamer-full static build:
537 extends: '.build fedora x86_64'
541 --default-library=static
547 - meson test -C build -v test-gst-full
554 gstreamer-full-minimal static build:
555 extends: 'gstreamer-full static build'
559 --default-library=static
561 -Dgstreamer:gst_debug=false
562 -Dauto_features=disabled
563 -Dgstreamer:check=enabled
565 -Dgst-plugins-base:alsa=enabled
566 -Dgst-plugins-base:typefind=enabled
567 -Dgst-plugins-base:pbtypes=enabled
568 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
569 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
570 -Dgst-full-device-providers=alsa:alsadeviceprovider
571 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
576 - meson test -C build -v test-gst-full
577 - 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"
578 - strip build/libgstreamer-full-1.0.so
579 - ls -l build/libgstreamer-full-1.0.so
587 .valgrind fedora x86_64:
588 extends: '.test fedora x86_64'
591 EXTRA_VALIDATE_ARGS: "--valgrind"
594 extends: '.valgrind fedora x86_64'
596 TEST_SUITE: "check.gstreamer\\..*"
602 - subprojects/gst-devtools/**/*
603 - subprojects/gstreamer/**/*
606 extends: '.valgrind fedora x86_64'
608 TEST_SUITE: "check.gst-plugins-base\\..*"
614 - subprojects/gst-devtools/**/*
615 - subprojects/gstreamer/**/*
616 - subprojects/gst-plugins-base/**/*
619 extends: '.valgrind fedora x86_64'
621 TEST_SUITE: "check.gst-plugins-good\\..*"
622 # take longer time due to splitmux unit test
629 - subprojects/gst-devtools/**/*
630 - subprojects/gstreamer/**/*
631 - subprojects/gst-plugins-base/**/*
632 - subprojects/gst-plugins-good/**/*
635 extends: '.valgrind fedora x86_64'
637 TEST_SUITE: "check.gst-plugins-ugly\\..*"
643 - subprojects/gst-devtools/**/*
644 - subprojects/gstreamer/**/*
645 - subprojects/gst-plugins-base/**/*
646 - subprojects/gst-plugins-good/**/*
647 - subprojects/gst-plugins-ugly/**/*
650 extends: '.valgrind fedora x86_64'
652 TEST_SUITE: "check.gst-plugins-bad\\..*"
658 - subprojects/gst-devtools/**/*
659 - subprojects/gstreamer/**/*
660 - subprojects/gst-plugins-base/**/*
661 - subprojects/gst-plugins-good/**/*
662 - subprojects/gst-plugins-bad/**/*
665 extends: '.valgrind fedora x86_64'
667 TEST_SUITE: "check.gst-editing-services\\..*"
673 - subprojects/gst-devtools/**/*
674 - subprojects/gstreamer/**/*
675 - subprojects/gst-plugins-base/**/*
676 - subprojects/gst-plugins-good/**/*
677 - subprojects/gst-plugins-bad/**/*
678 - subprojects/gst-editing-services/**/*
679 - subprojects/gst-python/**/*
680 # valgrind ges jobs are racy across the board and simply fail too often.
681 # Someone needs to go through job logs and figure out which jobs to mark
682 # as flaky. Until then, just ignore failures.
685 # ---- Integration ----- #
688 extends: '.build fedora x86_64'
690 MESON_ARGS: *simple_build
691 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
692 # Disable werror for the docs build, we don't need it
694 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
696 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
697 - export RUSTUP_HOME='/usr/local/rustup'
699 - ci/scripts/handle-subprojects-cache.py subprojects/
701 - meson build/ $MESON_ARGS
702 - ccache --show-stats
704 - ./gst-env.py ninja -C build/ plugins_doc_caches
705 # Ignore modifications to wrap files made by meson
706 - git checkout subprojects/*.wrap
707 - ./ci/scripts/check-documentation-diff.py
709 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
710 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
717 - plugins-cache-diffs/
720 # This jobs runs in gstreamer namespace when after the merge into main branch.
721 # The produced artifact is later used to automatically update the web page.
728 - "fedora amd64 docker"
730 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
733 # This job is run in users namespace to validate documentation before merging
742 - "fedora amd64 docker"
744 # Never run post merge, we have the `documentation` always running for that
745 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
751 - subprojects/gst-docs/**/*
752 - subprojects/gst-devtools/**/*
753 - subprojects/gst-editing-services/**/*
754 - subprojects/gst-libav/**/*
755 - subprojects/gst-omx/**/*
756 - subprojects/gst-plugins-bad/**/*
757 - subprojects/gst-plugins-base/**/*
758 - subprojects/gst-plugins-good/**/*
759 - subprojects/gst-plugins-ugly/**/*
760 - subprojects/gstreamer/**/*
761 - subprojects/gstreamer-vaapi/**/*
762 - subprojects/gst-rtsp-server/**/*
764 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
765 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
773 - '.fdo.suffixed-image@fedora'
776 - "fedora amd64 docker"
778 - ci/gitlab/trigger_cerbero_pipeline.py
781 # Never run post merge
782 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
787 - subprojects/gst-devtools/**/*
788 - subprojects/gst-editing-services/**/*
789 - subprojects/gst-libav/**/*
790 - subprojects/gst-plugins-bad/**/*
791 - subprojects/gst-plugins-base/**/*
792 - subprojects/gst-plugins-good/**/*
793 - subprojects/gst-plugins-ugly/**/*
794 - subprojects/gst-python/**/*
795 - subprojects/gstreamer/**/*
796 - subprojects/gst-rtsp-server/**/*
797 - subprojects/gst-examples/**/*