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 # Needs to not be empty otherwise the newline -> space replace command in
351 # `script:` will fail
352 MESON_CROSS_ARGS: ' '
354 # If this matches, it means the pipeline is running against either the main
355 # or a stable branch, so make it manual
356 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
361 - subprojects/win-*/*
363 # Make sure powershell exits on errors
364 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
365 - $ErrorActionPreference = "Stop"
367 # Set the code page to UTF-8
370 - ci/scripts/handle-subprojects-cache.py subprojects/
371 # For some reason, options are separated by newline instead of space, so we
372 # have to replace them first.
373 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
374 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
375 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
376 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
377 meson compile -C build"
382 - 'build/meson-logs/'
385 extends: '.build windows'
389 - !reference [".build windows", "script",]
390 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
391 .\gst-env.py gst-inspect-1.0.exe --version &&
392 .\gst-env.py gst-inspect-1.0.exe &&
394 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
395 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
398 extends: '.build windows'
402 build vs2019 arm64 uwp:
403 extends: '.build windows'
406 # pango pulls in cairo which pulls in pixman which doesn't build because of
407 # https://github.com/mesonbuild/meson/issues/9889
409 -Dgst-plugins-base:pango=disabled
410 -Dgst-plugins-good:cairo=disabled
411 -Dgst-devtools:cairo=disabled
412 --cross-file ci/meson/vs2019-arm64-cross-file.txt
413 --native-file ci/meson/vs2019-x64-native-file.txt
416 extends: '.build windows'
424 # Make sure powershell exits on errors
425 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
426 - $ErrorActionPreference = "Stop"
428 # Set the code page to UTF-8
431 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
433 - $env:MSYSTEM = "UCRT64"
434 - $env:CHERE_INVOKING = "1"
435 - $env:MSYS2_PATH_TYPE = "inherit"
436 # For some reason, options are separated by newline instead of space, so we
437 # have to replace them first.
438 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
439 # Replace forward slashes with backwards so bash doesn't complain
440 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
441 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
448 - '.build_ccache_vars'
452 MESON_ARGS: *simple_build
454 # Disable colored output to avoid weird rendering issues
455 GST_DEBUG_NO_COLOR: "true"
456 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
457 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
459 CARGO_HOME: "/cache/gstreamer/cargo"
460 # Enable the fault handler so we get backtraces on segfaults.
461 # any non-empty string will do
462 PYTHONFAULTHANDLER: "enabled"
469 - echo "-> Running ${TEST_SUITE}"
472 gst-validate-launcher ${TEST_SUITE}
478 --timeout-factor "${TIMEOUT_FACTOR}"
479 --fail-on-testlist-change
480 -l "${CI_PROJECT_DIR}/validate-logs/"
481 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
482 ${EXTRA_VALIDATE_ARGS}
484 - mv build/meson-logs/ meson-logs
493 - "validate-logs/*.xml"
498 - '.fdo.suffixed-image@fedora'
502 - "fedora amd64 docker"
506 extends: '.test fedora x86_64'
508 TEST_SUITE: "check.gst*"
510 integration testsuites fedora:
511 extends: '.test fedora x86_64'
514 MESON_BUILDTYPE_ARGS: >
519 -Dgst-examples=disabled
523 -Dgstreamer:benchmarks=disabled
524 -Dgst-plugins-good:gtk3=disabled
525 -Dgst-plugins-bad:microdns=disabled
526 -Dgst-plugins-bad:avtp=disabled
527 -Dgst-plugins-bad:opencv=disabled
528 -Dgst-plugins-bad:webrtc=disabled
529 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
530 TEST_SUITE: "validate ges"
533 gstreamer-full static build:
534 extends: '.build fedora x86_64'
538 --default-library=static
544 - meson test -C build -v test-gst-full
551 gstreamer-full-minimal static build:
552 extends: 'gstreamer-full static build'
556 --default-library=static
558 -Dgstreamer:gst_debug=false
559 -Dauto_features=disabled
560 -Dgstreamer:check=enabled
562 -Dgst-plugins-base:alsa=enabled
563 -Dgst-plugins-base:typefind=enabled
564 -Dgst-plugins-base:pbtypes=enabled
565 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
566 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
567 -Dgst-full-device-providers=alsa:alsadeviceprovider
568 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
573 - meson test -C build -v test-gst-full
574 - 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"
575 - strip build/libgstreamer-full-1.0.so
576 - ls -l build/libgstreamer-full-1.0.so
584 .valgrind fedora x86_64:
585 extends: '.test fedora x86_64'
588 EXTRA_VALIDATE_ARGS: "--valgrind"
591 extends: '.valgrind fedora x86_64'
593 TEST_SUITE: "check.gstreamer\\..*"
599 - subprojects/gst-devtools/**/*
600 - subprojects/gstreamer/**/*
603 extends: '.valgrind fedora x86_64'
605 TEST_SUITE: "check.gst-plugins-base\\..*"
611 - subprojects/gst-devtools/**/*
612 - subprojects/gstreamer/**/*
613 - subprojects/gst-plugins-base/**/*
616 extends: '.valgrind fedora x86_64'
618 TEST_SUITE: "check.gst-plugins-good\\..*"
619 # take longer time due to splitmux unit test
626 - subprojects/gst-devtools/**/*
627 - subprojects/gstreamer/**/*
628 - subprojects/gst-plugins-base/**/*
629 - subprojects/gst-plugins-good/**/*
632 extends: '.valgrind fedora x86_64'
634 TEST_SUITE: "check.gst-plugins-ugly\\..*"
640 - subprojects/gst-devtools/**/*
641 - subprojects/gstreamer/**/*
642 - subprojects/gst-plugins-base/**/*
643 - subprojects/gst-plugins-good/**/*
644 - subprojects/gst-plugins-ugly/**/*
647 extends: '.valgrind fedora x86_64'
649 TEST_SUITE: "check.gst-plugins-bad\\..*"
655 - subprojects/gst-devtools/**/*
656 - subprojects/gstreamer/**/*
657 - subprojects/gst-plugins-base/**/*
658 - subprojects/gst-plugins-good/**/*
659 - subprojects/gst-plugins-bad/**/*
662 extends: '.valgrind fedora x86_64'
664 TEST_SUITE: "check.gst-editing-services\\..*"
670 - subprojects/gst-devtools/**/*
671 - subprojects/gstreamer/**/*
672 - subprojects/gst-plugins-base/**/*
673 - subprojects/gst-plugins-good/**/*
674 - subprojects/gst-plugins-bad/**/*
675 - subprojects/gst-editing-services/**/*
676 - subprojects/gst-python/**/*
677 # valgrind ges jobs are racy across the board and simply fail too often.
678 # Someone needs to go through job logs and figure out which jobs to mark
679 # as flaky. Until then, just ignore failures.
682 # ---- Integration ----- #
685 extends: '.build fedora x86_64'
687 MESON_ARGS: *simple_build
688 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
689 # Disable werror for the docs build, we don't need it
691 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
693 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
694 - export RUSTUP_HOME='/usr/local/rustup'
696 - ci/scripts/handle-subprojects-cache.py subprojects/
698 - meson build/ $MESON_ARGS
699 - ccache --show-stats
701 - ./gst-env.py ninja -C build/ plugins_doc_caches
702 # Ignore modifications to wrap files made by meson
703 - git checkout subprojects/*.wrap
704 - ./ci/scripts/check-documentation-diff.py
706 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
707 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
714 - plugins-cache-diffs/
717 # This jobs runs in gstreamer namespace when after the merge into main branch.
718 # The produced artifact is later used to automatically update the web page.
725 - "fedora amd64 docker"
727 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
730 # This job is run in users namespace to validate documentation before merging
739 - "fedora amd64 docker"
741 # Never run post merge, we have the `documentation` always running for that
742 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
748 - subprojects/gst-docs/**/*
749 - subprojects/gst-devtools/**/*
750 - subprojects/gst-editing-services/**/*
751 - subprojects/gst-libav/**/*
752 - subprojects/gst-omx/**/*
753 - subprojects/gst-plugins-bad/**/*
754 - subprojects/gst-plugins-base/**/*
755 - subprojects/gst-plugins-good/**/*
756 - subprojects/gst-plugins-ugly/**/*
757 - subprojects/gstreamer/**/*
758 - subprojects/gstreamer-vaapi/**/*
759 - subprojects/gst-rtsp-server/**/*
761 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
762 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
770 - '.fdo.suffixed-image@fedora'
773 - "fedora amd64 docker"
775 - ci/gitlab/trigger_cerbero_pipeline.py
778 # Never run post merge
779 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
784 - subprojects/gst-devtools/**/*
785 - subprojects/gst-editing-services/**/*
786 - subprojects/gst-libav/**/*
787 - subprojects/gst-plugins-bad/**/*
788 - subprojects/gst-plugins-base/**/*
789 - subprojects/gst-plugins-good/**/*
790 - subprojects/gst-plugins-ugly/**/*
791 - subprojects/gst-python/**/*
792 - subprojects/gstreamer/**/*
793 - subprojects/gst-rtsp-server/**/*
794 - subprojects/gst-examples/**/*