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-03-14.0'
28 INDENT_TAG: '2022-03-07.1'
29 WINDOWS_TAG: "2022-05-16.1"
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 FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
39 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
40 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
42 MESON_BUILDTYPE_ARGS: --default-library=both
44 -Dlibnice:tests=disabled
45 -Dlibnice:examples=disabled
46 -Dopenh264:tests=disabled
47 -Dpygobject:tests=false
60 -Dgstreamer:werror=true
61 -Dgst-plugins-base:werror=true
62 -Dgst-plugins-good:werror=true
63 -Dgst-plugins-ugly:werror=true
64 -Dgst-plugins-bad:werror=true
65 -Dgst-rtsp-server:werror=true
66 -Dgst-libav:werror=true
67 -Dgst-examples:werror=true
68 -Dgst-editing-services:werror=true
69 -Dgst-docs:werror=true
71 -Dgst-devtools:werror=true
72 -Dgst-python:werror=true
73 -Dgstreamer-vaapi:werror=true
74 -Dgstreamer-sharp:werror=true
77 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
79 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
81 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
82 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
84 - if: '$CI_COMMIT_TAG'
85 - if: '$CI_COMMIT_BRANCH'
87 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
92 # This can be used to configure global behaviour our our jobs.
98 - 'runner_system_failure'
99 - 'stuck_or_timeout_failure'
100 - 'scheduler_failure'
104 # This is an empty job that is used to trigger the pipeline.
111 - echo "Trigger job done, now running the pipeline."
113 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
114 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
115 # Require explicit action to trigger tests post merge
116 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
118 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
119 # to avoid wasting CI resources
120 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
126 FDO_DISTRIBUTION_VERSION: '31'
127 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
128 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
129 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
134 - '.fdo.container-build@fedora'
135 stage: 'build docker'
143 FDO_DISTRIBUTION_VERSION: 'stretch'
144 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
145 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
146 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
147 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
149 gst-indent amd64 docker:
151 - '.gst-indent image'
152 - '.fdo.container-build@debian'
153 stage: 'build docker'
154 # Do not depend on the trigger, as we want to run indent always
157 windows amd64 docker:
158 stage: "build docker"
163 # Unlike the buildah/linux jobs, this file
164 # needs to be relative to docker/windows/ subdir
165 # as it makes life easier in the powershell script
167 # We also don't need a CONTEXT_DIR var as its also
168 # hardcoded to be docker/windows/
169 DOCKERFILE: "ci/docker/windows/Dockerfile"
175 # We need to pass an array and to resolve the env vars, so we can't use a variable:
176 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
178 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
181 echo "Failed to build the image"
186 # ---- Preparation ----- #
192 - '.gst-indent image'
193 - '.fdo.suffixed-image@debian'
196 - job: 'gst-indent amd64 docker'
199 - ./scripts/check-format-c
200 - ./scripts/format-csharp --check
202 # Don't check indentation on post merge pipelines
203 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
205 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
209 # build setup templates
211 .build_template: &build
212 - ci/scripts/handle-subprojects-cache.py subprojects/
213 # Update subprojects to respect `.wrap` content
214 - meson subprojects update --reset
216 - meson build/ $MESON_ARGS
218 - ccache --show-stats
222 CCACHE_COMPILERCHECK: 'content'
223 CCACHE_COMPRESS: 'true'
224 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
225 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
226 # shared across everything really
227 CCACHE_MAXSIZE: '10G'
228 CARGO_HOME: '/cache/gstreamer/cargo'
230 .base_modules_changes: &modules_changes
236 - subprojects/gst-devtools/**/*
237 - subprojects/gst-editing-services/**/*
238 - subprojects/gst-integration-testsuites/**/*
239 - subprojects/gst-libav/**/*
240 - subprojects/gst-omx/**/*
241 - subprojects/gst-plugins-bad/**/*
242 - subprojects/gst-plugins-base/**/*
243 - subprojects/gst-plugins-good/**/*
244 - subprojects/gst-plugins-ugly/**/*
245 - subprojects/gst-python/**/*
246 - subprojects/gstreamer/**/*
247 - subprojects/gstreamer-sharp/**/*
248 - subprojects/gstreamer-vaapi/**/*
249 - subprojects/gst-rtsp-server/**/*
251 .simple_fedora_build: &simple_build >-
252 ${DEFAULT_MESON_ARGS}
255 -Dgst-omx:target=generic
258 ${MESON_BUILDTYPE_ARGS}
264 - '.build_ccache_vars'
267 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
268 # Also need to take into account I/O of pulling docker images and uploading artifacts
271 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
275 - mv build/meson-logs/ meson-logs
282 # If this matches, it means the pipeline is running against either the main
283 # or a stable branch, so make it manual
284 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
289 .build fedora x86_64:
292 - '.fdo.suffixed-image@fedora'
295 - "fedora amd64 docker"
297 MESON_ARGS: *simple_build
299 build nodebug fedora x86_64:
302 - '.fdo.suffixed-image@fedora'
305 - "fedora amd64 docker"
307 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
309 build clang fedora x86_64:
310 extends: '.build fedora x86_64'
313 CXX: 'ccache clang++'
316 image: $WINDOWS_IMAGE
323 - "windows amd64 docker"
327 ${DEFAULT_MESON_ARGS}
331 -Dgst-plugins-base:pango=enabled
332 -Dgst-plugins-good:cairo=enabled
333 # Needs to not be empty otherwise the newline -> space replace command in
334 # `script:` will fail
335 MESON_CROSS_ARGS: ' '
337 # If this matches, it means the pipeline is running against either the main
338 # or a stable branch, so make it manual
339 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
344 # Make sure powershell exits on errors
345 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
346 - $ErrorActionPreference = "Stop"
348 # Set the code page to UTF-8
351 - ci/scripts/handle-subprojects-cache.py subprojects/
352 # For some reason, options are separated by newline instead of space, so we
353 # have to replace them first.
354 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
355 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
356 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
357 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
363 - 'build/meson-logs/'
366 extends: '.build windows'
371 extends: '.build windows'
375 build vs2019 arm64 uwp:
376 extends: '.build windows'
379 # pango pulls in cairo which pulls in pixman which doesn't build because of
380 # https://github.com/mesonbuild/meson/issues/9889
382 -Dgst-plugins-base:pango=disabled
383 -Dgst-plugins-good:cairo=disabled
384 -Dgst-devtools:cairo=disabled
385 --cross-file ci/meson/vs2019-arm64-cross-file.txt
386 --native-file ci/meson/vs2019-x64-native-file.txt
389 extends: '.build windows'
397 # Make sure powershell exits on errors
398 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
399 - $ErrorActionPreference = "Stop"
401 # Set the code page to UTF-8
404 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
406 - $env:MSYSTEM = "UCRT64"
407 - $env:CHERE_INVOKING = "1"
408 - $env:MSYS2_PATH_TYPE = "inherit"
409 # For some reason, options are separated by newline instead of space, so we
410 # have to replace them first.
411 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
412 # Replace forward slashes with backwards so bash doesn't complain
413 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
414 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
421 - '.build_ccache_vars'
425 MESON_ARGS: *simple_build
427 # Disable colored output to avoid weird rendering issues
428 GST_DEBUG_NO_COLOR: "true"
429 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
430 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
432 CARGO_HOME: "/cache/gstreamer/cargo"
433 # Enable the fault handler so we get backtraces on segfaults.
434 # any non-empty string will do
435 PYTHONFAULTHANDLER: "enabled"
442 - echo "-> Running ${TEST_SUITE}"
445 gst-validate-launcher ${TEST_SUITE}
452 --timeout-factor "${TIMEOUT_FACTOR}"
453 --fail-on-testlist-change
454 -l "${CI_PROJECT_DIR}/validate-logs/"
455 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
456 ${EXTRA_VALIDATE_ARGS}
458 - mv build/meson-logs/ meson-logs
467 - "validate-logs/*.xml"
472 - '.fdo.suffixed-image@fedora'
475 - "fedora amd64 docker"
479 extends: '.test fedora x86_64'
481 TEST_SUITE: "check.gst*"
483 integration testsuites fedora:
484 extends: '.test fedora x86_64'
487 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
488 TEST_SUITE: "validate ges"
491 gstreamer-full static build:
492 extends: '.build fedora x86_64'
496 --default-library=static
502 - meson test -C build -v test-gst-full
509 gstreamer-full-minimal static build:
510 extends: 'gstreamer-full static build'
514 --default-library=static
516 -Dgstreamer:gst_debug=false
517 -Dauto_features=disabled
518 -Dgstreamer:check=enabled
520 -Dgst-plugins-base:alsa=enabled
521 -Dgst-plugins-base:typefind=enabled
522 -Dgst-plugins-base:pbtypes=enabled
523 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
524 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
525 -Dgst-full-device-providers=alsa:alsadeviceprovider
526 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
531 - meson test -C build -v test-gst-full
532 - 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"
533 - strip build/libgstreamer-full-1.0.so
534 - ls -l build/libgstreamer-full-1.0.so
542 .valgrind fedora x86_64:
543 extends: '.test fedora x86_64'
546 EXTRA_VALIDATE_ARGS: "--valgrind"
549 extends: '.valgrind fedora x86_64'
551 TEST_SUITE: "check.gstreamer\\..*"
557 - subprojects/gst-devtools/**/*
558 - subprojects/gstreamer/**/*
561 extends: '.valgrind fedora x86_64'
563 TEST_SUITE: "check.gst-plugins-base\\..*"
569 - subprojects/gst-devtools/**/*
570 - subprojects/gstreamer/**/*
571 - subprojects/gst-plugins-base/**/*
574 extends: '.valgrind fedora x86_64'
576 TEST_SUITE: "check.gst-plugins-good\\..*"
577 # take longer time due to splitmux unit test
584 - subprojects/gst-devtools/**/*
585 - subprojects/gstreamer/**/*
586 - subprojects/gst-plugins-base/**/*
587 - subprojects/gst-plugins-good/**/*
590 extends: '.valgrind fedora x86_64'
592 TEST_SUITE: "check.gst-plugins-ugly\\..*"
598 - subprojects/gst-devtools/**/*
599 - subprojects/gstreamer/**/*
600 - subprojects/gst-plugins-base/**/*
601 - subprojects/gst-plugins-good/**/*
602 - subprojects/gst-plugins-ugly/**/*
605 extends: '.valgrind fedora x86_64'
607 TEST_SUITE: "check.gst-plugins-bad\\..*"
613 - subprojects/gst-devtools/**/*
614 - subprojects/gstreamer/**/*
615 - subprojects/gst-plugins-base/**/*
616 - subprojects/gst-plugins-good/**/*
617 - subprojects/gst-plugins-bad/**/*
620 extends: '.valgrind fedora x86_64'
622 TEST_SUITE: "check.gst-editing-services\\..*"
628 - subprojects/gst-devtools/**/*
629 - subprojects/gstreamer/**/*
630 - subprojects/gst-plugins-base/**/*
631 - subprojects/gst-plugins-good/**/*
632 - subprojects/gst-plugins-bad/**/*
633 - subprojects/gst-editing-services/**/*
634 - subprojects/gst-python/**/*
636 # ---- Integration ----- #
639 image: $FEDORA_DOCS_IMAGE
641 - '.build_ccache_vars'
643 MESON_ARGS: *simple_build
644 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
645 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
647 # FIXME: should rebuild the image with newer versions!
648 - pip3 install --upgrade hotdoc
649 - pip3 install --upgrade meson
651 - ./gst-env.py ninja -C build/ plugins_doc_caches
652 # Ignore modifications to wrap files made by meson
653 - git checkout subprojects/*.wrap
654 - ./ci/scripts/check-documentation-diff.py
655 - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
656 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
663 - plugins-cache-diffs/
666 # This jobs runs in gstreamer namespace when after the merge into main branch.
667 # The produced artifact is later used to automatically update the web page.
675 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
678 # This job is run in users namespace to validate documentation before merging
688 # Never run post merge, we have the `documentation` always running for that
689 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
695 - subprojects/gst-docs/**/*
696 - subprojects/gst-devtools/**/*
697 - subprojects/gst-editing-services/**/*
698 - subprojects/gst-libav/**/*
699 - subprojects/gst-omx/**/*
700 - subprojects/gst-plugins-bad/**/*
701 - subprojects/gst-plugins-base/**/*
702 - subprojects/gst-plugins-good/**/*
703 - subprojects/gst-plugins-ugly/**/*
704 - subprojects/gstreamer/**/*
705 - subprojects/gstreamer-vaapi/**/*
706 - subprojects/gst-rtsp-server/**/*
708 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
709 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
717 - '.fdo.suffixed-image@fedora'
719 - "fedora amd64 docker"
721 - ci/gitlab/trigger_cerbero_pipeline.py
724 # Never run post merge
725 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
730 - subprojects/gst-devtools/**/*
731 - subprojects/gst-editing-services/**/*
732 - subprojects/gst-libav/**/*
733 - subprojects/gst-plugins-bad/**/*
734 - subprojects/gst-plugins-base/**/*
735 - subprojects/gst-plugins-good/**/*
736 - subprojects/gst-plugins-ugly/**/*
737 - subprojects/gst-python/**/*
738 - subprojects/gstreamer/**/*
739 - subprojects/gst-rtsp-server/**/*
740 - subprojects/gst-examples/**/*