2 - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/fedora.yml"
3 - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/debian.yml"
12 # Use the resulting binaries
18 # Branch to track for modules that have no ref specified in the manifest
19 GST_UPSTREAM_BRANCH: 'main'
23 # These are the version tags for the docker images the CI runs against.
24 # If you are hacking on them or need a them to rebuild, its enough
25 # to change any part of the string of the image you want.
27 FEDORA_TAG: '2022-09-22.0'
28 INDENT_TAG: '2022-03-07.1'
29 WINDOWS_TAG: "2022-09-17.0"
31 GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
32 FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
34 FEDORA_AMD64_SUFFIX: 'amd64/fedora'
35 INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
36 WINDOWS_AMD64_SUFFIX: 'amd64/windows'
38 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
39 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
41 MESON_BUILDTYPE_ARGS: --default-library=both
43 -Dlibnice:tests=disabled
44 -Dlibnice:examples=disabled
45 -Dopenh264:tests=disabled
46 -Dpygobject:tests=false
59 -Dgstreamer:werror=true
60 -Dgst-plugins-base:werror=true
61 -Dgst-plugins-good:werror=true
62 -Dgst-plugins-ugly:werror=true
63 -Dgst-plugins-bad:werror=true
64 -Dgst-rtsp-server:werror=true
65 -Dgst-libav:werror=true
66 -Dgst-examples:werror=true
67 -Dgst-editing-services:werror=true
68 -Dgst-docs:werror=true
70 -Dgst-devtools:werror=true
71 -Dgst-python:werror=true
72 -Dgstreamer-vaapi:werror=true
73 -Dgstreamer-sharp:werror=true
76 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
78 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
80 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
81 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
83 - if: '$CI_COMMIT_TAG'
84 - if: '$CI_COMMIT_BRANCH'
86 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
91 # This can be used to configure global behaviour our our jobs.
97 - 'runner_system_failure'
98 - 'stuck_or_timeout_failure'
103 # This is an empty job that is used to trigger the pipeline.
110 - echo "Trigger job done, now running the pipeline."
112 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
113 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
114 # Require explicit action to trigger tests post merge
115 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
117 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
118 # to avoid wasting CI resources
119 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
125 FDO_DISTRIBUTION_VERSION: '31'
126 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
127 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
128 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
133 - '.fdo.container-build@fedora'
134 stage: 'build docker'
142 FDO_DISTRIBUTION_VERSION: 'stretch'
143 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
144 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
145 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
146 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
148 gst-indent amd64 docker:
150 - '.gst-indent image'
151 - '.fdo.container-build@debian'
152 stage: 'build docker'
153 # Do not depend on the trigger, as we want to run indent always
156 windows amd64 docker:
157 stage: "build docker"
162 # Unlike the buildah/linux jobs, this file
163 # needs to be relative to docker/windows/ subdir
164 # as it makes life easier in the powershell script
166 # We also don't need a CONTEXT_DIR var as its also
167 # hardcoded to be docker/windows/
168 DOCKERFILE: "ci/docker/windows/Dockerfile"
174 # We need to pass an array and to resolve the env vars, so we can't use a variable:
175 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
177 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
180 echo "Failed to build the image"
185 # ---- Preparation ----- #
191 - '.gst-indent image'
192 - '.fdo.suffixed-image@debian'
195 - job: 'gst-indent amd64 docker'
198 - ./scripts/check-format-c
199 - ./scripts/format-csharp --check
201 # Don't check indentation on post merge pipelines
202 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
204 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
208 # build setup templates
210 .build_template: &build
211 - ci/scripts/handle-subprojects-cache.py subprojects/
213 - 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'
294 - "fedora amd64 docker"
296 MESON_ARGS: *simple_build
301 - '.fdo.suffixed-image@fedora'
302 - '.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'
318 - "fedora amd64 docker"
320 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
322 build clang fedora x86_64:
323 extends: '.build fedora x86_64'
326 CXX: 'ccache clang++'
329 image: $WINDOWS_IMAGE
336 - "windows amd64 docker"
340 ${DEFAULT_MESON_ARGS}
344 -Dgst-plugins-base:pango=enabled
345 -Dgst-plugins-good:cairo=enabled
346 # Needs to not be empty otherwise the newline -> space replace command in
347 # `script:` will fail
348 MESON_CROSS_ARGS: ' '
350 # If this matches, it means the pipeline is running against either the main
351 # or a stable branch, so make it manual
352 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
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/**/*