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/
214 - meson build/ $MESON_ARGS
216 - ccache --show-stats
220 CCACHE_COMPILERCHECK: 'content'
221 CCACHE_COMPRESS: 'true'
222 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
223 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
224 # shared across everything really
225 CCACHE_MAXSIZE: '10G'
226 CARGO_HOME: '/cache/gstreamer/cargo'
228 .base_modules_changes: &modules_changes
234 - subprojects/gst-devtools/**/*
235 - subprojects/gst-editing-services/**/*
236 - subprojects/gst-integration-testsuites/**/*
237 - subprojects/gst-libav/**/*
238 - subprojects/gst-omx/**/*
239 - subprojects/gst-plugins-bad/**/*
240 - subprojects/gst-plugins-base/**/*
241 - subprojects/gst-plugins-good/**/*
242 - subprojects/gst-plugins-ugly/**/*
243 - subprojects/gst-python/**/*
244 - subprojects/gstreamer/**/*
245 - subprojects/gstreamer-sharp/**/*
246 - subprojects/gstreamer-vaapi/**/*
247 - subprojects/gst-rtsp-server/**/*
249 .simple_fedora_build: &simple_build >-
250 ${DEFAULT_MESON_ARGS}
253 -Dgst-omx:target=generic
256 ${MESON_BUILDTYPE_ARGS}
262 - '.build_ccache_vars'
265 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
266 # Also need to take into account I/O of pulling docker images and uploading artifacts
269 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
272 - ./gst-env.py gst-inspect-1.0 --version
273 - ./gst-env.py gst-inspect-1.0
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
302 - '.fdo.suffixed-image@fedora'
303 - '.build fedora x86_64'
305 - "fedora amd64 docker"
308 - ./gst-env.py gst-inspect-1.0 --version
309 - ./gst-env.py gst-inspect-1.0
310 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
311 - rm -rf $CI_PROJECT_DIR/destdir
313 build nodebug fedora x86_64:
316 - '.fdo.suffixed-image@fedora'
319 - "fedora amd64 docker"
321 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
323 build clang fedora x86_64:
324 extends: '.build fedora x86_64'
327 CXX: 'ccache clang++'
330 image: $WINDOWS_IMAGE
337 - "windows amd64 docker"
341 ${DEFAULT_MESON_ARGS}
345 -Dgst-plugins-base:pango=enabled
346 -Dgst-plugins-good:cairo=enabled
347 # Needs to not be empty otherwise the newline -> space replace command in
348 # `script:` will fail
349 MESON_CROSS_ARGS: ' '
351 # If this matches, it means the pipeline is running against either the main
352 # or a stable branch, so make it manual
353 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
358 # Make sure powershell exits on errors
359 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
360 - $ErrorActionPreference = "Stop"
362 # Set the code page to UTF-8
365 - ci/scripts/handle-subprojects-cache.py subprojects/
366 # For some reason, options are separated by newline instead of space, so we
367 # have to replace them first.
368 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
369 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
370 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
371 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
372 meson compile -C build"
377 - 'build/meson-logs/'
380 extends: '.build windows'
384 - !reference [".build windows", "script",]
385 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
386 .\gst-env.py gst-inspect-1.0.exe --version &&
387 .\gst-env.py gst-inspect-1.0.exe &&
389 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
390 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
393 extends: '.build windows'
397 build vs2019 arm64 uwp:
398 extends: '.build windows'
401 # pango pulls in cairo which pulls in pixman which doesn't build because of
402 # https://github.com/mesonbuild/meson/issues/9889
404 -Dgst-plugins-base:pango=disabled
405 -Dgst-plugins-good:cairo=disabled
406 -Dgst-devtools:cairo=disabled
407 --cross-file ci/meson/vs2019-arm64-cross-file.txt
408 --native-file ci/meson/vs2019-x64-native-file.txt
411 extends: '.build windows'
419 # Make sure powershell exits on errors
420 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
421 - $ErrorActionPreference = "Stop"
423 # Set the code page to UTF-8
426 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
428 - $env:MSYSTEM = "UCRT64"
429 - $env:CHERE_INVOKING = "1"
430 - $env:MSYS2_PATH_TYPE = "inherit"
431 # For some reason, options are separated by newline instead of space, so we
432 # have to replace them first.
433 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
434 # Replace forward slashes with backwards so bash doesn't complain
435 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
436 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
443 - '.build_ccache_vars'
447 MESON_ARGS: *simple_build
449 # Disable colored output to avoid weird rendering issues
450 GST_DEBUG_NO_COLOR: "true"
451 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
452 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
454 CARGO_HOME: "/cache/gstreamer/cargo"
455 # Enable the fault handler so we get backtraces on segfaults.
456 # any non-empty string will do
457 PYTHONFAULTHANDLER: "enabled"
464 - echo "-> Running ${TEST_SUITE}"
467 gst-validate-launcher ${TEST_SUITE}
474 --timeout-factor "${TIMEOUT_FACTOR}"
475 --fail-on-testlist-change
476 -l "${CI_PROJECT_DIR}/validate-logs/"
477 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
478 ${EXTRA_VALIDATE_ARGS}
480 - mv build/meson-logs/ meson-logs
489 - "validate-logs/*.xml"
494 - '.fdo.suffixed-image@fedora'
497 - "fedora amd64 docker"
501 extends: '.test fedora x86_64'
503 TEST_SUITE: "check.gst*"
505 integration testsuites fedora:
506 extends: '.test fedora x86_64'
509 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
510 TEST_SUITE: "validate ges"
513 gstreamer-full static build:
514 extends: '.build fedora x86_64'
518 --default-library=static
524 - meson test -C build -v test-gst-full
531 gstreamer-full-minimal static build:
532 extends: 'gstreamer-full static build'
536 --default-library=static
538 -Dgstreamer:gst_debug=false
539 -Dauto_features=disabled
540 -Dgstreamer:check=enabled
542 -Dgst-plugins-base:alsa=enabled
543 -Dgst-plugins-base:typefind=enabled
544 -Dgst-plugins-base:pbtypes=enabled
545 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
546 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
547 -Dgst-full-device-providers=alsa:alsadeviceprovider
548 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
553 - meson test -C build -v test-gst-full
554 - 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"
555 - strip build/libgstreamer-full-1.0.so
556 - ls -l build/libgstreamer-full-1.0.so
564 .valgrind fedora x86_64:
565 extends: '.test fedora x86_64'
568 EXTRA_VALIDATE_ARGS: "--valgrind"
571 extends: '.valgrind fedora x86_64'
573 TEST_SUITE: "check.gstreamer\\..*"
579 - subprojects/gst-devtools/**/*
580 - subprojects/gstreamer/**/*
583 extends: '.valgrind fedora x86_64'
585 TEST_SUITE: "check.gst-plugins-base\\..*"
591 - subprojects/gst-devtools/**/*
592 - subprojects/gstreamer/**/*
593 - subprojects/gst-plugins-base/**/*
596 extends: '.valgrind fedora x86_64'
598 TEST_SUITE: "check.gst-plugins-good\\..*"
599 # take longer time due to splitmux unit test
606 - subprojects/gst-devtools/**/*
607 - subprojects/gstreamer/**/*
608 - subprojects/gst-plugins-base/**/*
609 - subprojects/gst-plugins-good/**/*
612 extends: '.valgrind fedora x86_64'
614 TEST_SUITE: "check.gst-plugins-ugly\\..*"
620 - subprojects/gst-devtools/**/*
621 - subprojects/gstreamer/**/*
622 - subprojects/gst-plugins-base/**/*
623 - subprojects/gst-plugins-good/**/*
624 - subprojects/gst-plugins-ugly/**/*
627 extends: '.valgrind fedora x86_64'
629 TEST_SUITE: "check.gst-plugins-bad\\..*"
635 - subprojects/gst-devtools/**/*
636 - subprojects/gstreamer/**/*
637 - subprojects/gst-plugins-base/**/*
638 - subprojects/gst-plugins-good/**/*
639 - subprojects/gst-plugins-bad/**/*
642 extends: '.valgrind fedora x86_64'
644 TEST_SUITE: "check.gst-editing-services\\..*"
650 - subprojects/gst-devtools/**/*
651 - subprojects/gstreamer/**/*
652 - subprojects/gst-plugins-base/**/*
653 - subprojects/gst-plugins-good/**/*
654 - subprojects/gst-plugins-bad/**/*
655 - subprojects/gst-editing-services/**/*
656 - subprojects/gst-python/**/*
658 # ---- Integration ----- #
661 image: $FEDORA_DOCS_IMAGE
663 - '.build_ccache_vars'
665 MESON_ARGS: *simple_build
666 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
667 # Disable werror for the docs build, we don't need it
669 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
671 # FIXME: should rebuild the image with newer versions!
672 - pip3 install --upgrade hotdoc
673 - pip3 install --upgrade meson
675 - ./gst-env.py ninja -C build/ plugins_doc_caches
676 # Ignore modifications to wrap files made by meson
677 - git checkout subprojects/*.wrap
678 - ./ci/scripts/check-documentation-diff.py
679 - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
680 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
687 - plugins-cache-diffs/
690 # This jobs runs in gstreamer namespace when after the merge into main branch.
691 # The produced artifact is later used to automatically update the web page.
699 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
702 # This job is run in users namespace to validate documentation before merging
712 # Never run post merge, we have the `documentation` always running for that
713 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
719 - subprojects/gst-docs/**/*
720 - subprojects/gst-devtools/**/*
721 - subprojects/gst-editing-services/**/*
722 - subprojects/gst-libav/**/*
723 - subprojects/gst-omx/**/*
724 - subprojects/gst-plugins-bad/**/*
725 - subprojects/gst-plugins-base/**/*
726 - subprojects/gst-plugins-good/**/*
727 - subprojects/gst-plugins-ugly/**/*
728 - subprojects/gstreamer/**/*
729 - subprojects/gstreamer-vaapi/**/*
730 - subprojects/gst-rtsp-server/**/*
732 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
733 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
741 - '.fdo.suffixed-image@fedora'
743 - "fedora amd64 docker"
745 - ci/gitlab/trigger_cerbero_pipeline.py
748 # Never run post merge
749 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
754 - subprojects/gst-devtools/**/*
755 - subprojects/gst-editing-services/**/*
756 - subprojects/gst-libav/**/*
757 - subprojects/gst-plugins-bad/**/*
758 - subprojects/gst-plugins-base/**/*
759 - subprojects/gst-plugins-good/**/*
760 - subprojects/gst-plugins-ugly/**/*
761 - subprojects/gst-python/**/*
762 - subprojects/gstreamer/**/*
763 - subprojects/gst-rtsp-server/**/*
764 - subprojects/gst-examples/**/*