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"
6 # These are the version tags for the docker images the CI runs against.
7 # If you are hacking on them or need a them to rebuild, you need to change
8 # the appropriate version string in this file which will cause a rebuild.
10 - local: '.gitlab-image-tags.yml'
19 # Use the resulting binaries
25 # Branch to track for modules that have no ref specified in the manifest
26 GST_UPSTREAM_BRANCH: 'main'
28 MESON_BUILDTYPE_ARGS: --default-library=both
30 -Dlibnice:tests=disabled
31 -Dlibnice:examples=disabled
32 -Dopenh264:tests=disabled
33 -Dpygobject:tests=false
46 -Dgstreamer:werror=true
47 -Dgst-plugins-base:werror=true
48 -Dgst-plugins-good:werror=true
49 -Dgst-plugins-ugly:werror=true
50 -Dgst-plugins-bad:werror=true
51 -Dgst-rtsp-server:werror=true
52 -Dgst-libav:werror=true
53 -Dgst-examples:werror=true
54 -Dgst-editing-services:werror=true
55 -Dgst-docs:werror=true
57 -Dgst-devtools:werror=true
58 -Dgst-python:werror=true
59 -Dgstreamer-vaapi:werror=true
60 -Dgstreamer-sharp:werror=true
63 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
65 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
67 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
68 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
70 - if: '$CI_COMMIT_TAG'
71 - if: '$CI_COMMIT_BRANCH'
73 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
78 # This can be used to configure global behaviour our our jobs.
84 - 'runner_system_failure'
85 - 'stuck_or_timeout_failure'
90 # This is an empty job that is used to trigger the pipeline.
97 - echo "Trigger job done, now running the pipeline."
99 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
100 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
101 # Require explicit action to trigger tests post merge
102 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
104 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
105 # to avoid wasting CI resources
106 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
112 FDO_DISTRIBUTION_VERSION: '31'
113 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
114 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
115 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
120 - '.fdo.container-build@fedora'
121 stage: 'build docker'
129 FDO_DISTRIBUTION_VERSION: 'stretch'
130 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
131 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
132 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
133 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
135 gst-indent amd64 docker:
137 - '.gst-indent image'
138 - '.fdo.container-build@debian'
139 stage: 'build docker'
140 # Do not depend on the trigger, as we want to run indent always
143 windows amd64 docker:
144 stage: "build docker"
149 # Unlike the buildah/linux jobs, this file
150 # needs to be relative to docker/windows/ subdir
151 # as it makes life easier in the powershell script
153 # We also don't need a CONTEXT_DIR var as its also
154 # hardcoded to be docker/windows/
155 DOCKERFILE: "ci/docker/windows/Dockerfile"
161 # We need to pass an array and to resolve the env vars, so we can't use a variable:
162 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
164 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
167 echo "Failed to build the image"
172 # ---- Preparation ----- #
178 - '.gst-indent image'
179 - '.fdo.suffixed-image@debian'
182 - job: 'gst-indent amd64 docker'
185 - ./scripts/check-format-c
186 - ./scripts/format-csharp --check
188 # Don't check indentation on post merge pipelines
189 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
191 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
195 # build setup templates
197 .build_template: &build
198 - ci/scripts/handle-subprojects-cache.py subprojects/
200 - meson build/ $MESON_ARGS
202 - ccache --show-stats
206 CCACHE_COMPILERCHECK: 'content'
207 CCACHE_COMPRESS: 'true'
208 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
209 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
210 # shared across everything really
211 CCACHE_MAXSIZE: '10G'
212 CARGO_HOME: '/cache/gstreamer/cargo'
214 .base_modules_changes: &modules_changes
220 - subprojects/gst-devtools/**/*
221 - subprojects/gst-editing-services/**/*
222 - subprojects/gst-integration-testsuites/**/*
223 - subprojects/gst-libav/**/*
224 - subprojects/gst-omx/**/*
225 - subprojects/gst-plugins-bad/**/*
226 - subprojects/gst-plugins-base/**/*
227 - subprojects/gst-plugins-good/**/*
228 - subprojects/gst-plugins-ugly/**/*
229 - subprojects/gst-python/**/*
230 - subprojects/gstreamer/**/*
231 - subprojects/gstreamer-sharp/**/*
232 - subprojects/gstreamer-vaapi/**/*
233 - subprojects/gst-rtsp-server/**/*
235 .simple_fedora_build: &simple_build >-
236 ${DEFAULT_MESON_ARGS}
239 -Dgst-omx:target=generic
242 ${MESON_BUILDTYPE_ARGS}
248 - '.build_ccache_vars'
251 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
252 # Also need to take into account I/O of pulling docker images and uploading artifacts
255 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
258 - ./gst-env.py gst-inspect-1.0 --version
259 - ./gst-env.py gst-inspect-1.0
261 - mv build/meson-logs/ meson-logs
268 # If this matches, it means the pipeline is running against either the main
269 # or a stable branch, so make it manual
270 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
275 .build fedora x86_64:
278 - '.fdo.suffixed-image@fedora'
281 - "fedora amd64 docker"
283 MESON_ARGS: *simple_build
288 - '.fdo.suffixed-image@fedora'
289 - '.build fedora x86_64'
291 - "fedora amd64 docker"
294 - ./gst-env.py gst-inspect-1.0 --version
295 - ./gst-env.py gst-inspect-1.0
296 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
297 - rm -rf $CI_PROJECT_DIR/destdir
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 &&
358 meson compile -C build"
363 - 'build/meson-logs/'
366 extends: '.build windows'
370 - !reference [".build windows", "script",]
371 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
372 .\gst-env.py gst-inspect-1.0.exe --version &&
373 .\gst-env.py gst-inspect-1.0.exe &&
375 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
376 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
379 extends: '.build windows'
383 build vs2019 arm64 uwp:
384 extends: '.build windows'
387 # pango pulls in cairo which pulls in pixman which doesn't build because of
388 # https://github.com/mesonbuild/meson/issues/9889
390 -Dgst-plugins-base:pango=disabled
391 -Dgst-plugins-good:cairo=disabled
392 -Dgst-devtools:cairo=disabled
393 --cross-file ci/meson/vs2019-arm64-cross-file.txt
394 --native-file ci/meson/vs2019-x64-native-file.txt
397 extends: '.build windows'
405 # Make sure powershell exits on errors
406 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
407 - $ErrorActionPreference = "Stop"
409 # Set the code page to UTF-8
412 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
414 - $env:MSYSTEM = "UCRT64"
415 - $env:CHERE_INVOKING = "1"
416 - $env:MSYS2_PATH_TYPE = "inherit"
417 # For some reason, options are separated by newline instead of space, so we
418 # have to replace them first.
419 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
420 # Replace forward slashes with backwards so bash doesn't complain
421 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
422 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
429 - '.build_ccache_vars'
433 MESON_ARGS: *simple_build
435 # Disable colored output to avoid weird rendering issues
436 GST_DEBUG_NO_COLOR: "true"
437 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
438 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
440 CARGO_HOME: "/cache/gstreamer/cargo"
441 # Enable the fault handler so we get backtraces on segfaults.
442 # any non-empty string will do
443 PYTHONFAULTHANDLER: "enabled"
450 - echo "-> Running ${TEST_SUITE}"
453 gst-validate-launcher ${TEST_SUITE}
460 --timeout-factor "${TIMEOUT_FACTOR}"
461 --fail-on-testlist-change
462 -l "${CI_PROJECT_DIR}/validate-logs/"
463 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
464 ${EXTRA_VALIDATE_ARGS}
466 - mv build/meson-logs/ meson-logs
475 - "validate-logs/*.xml"
480 - '.fdo.suffixed-image@fedora'
483 - "fedora amd64 docker"
487 extends: '.test fedora x86_64'
489 TEST_SUITE: "check.gst*"
491 integration testsuites fedora:
492 extends: '.test fedora x86_64'
495 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
496 TEST_SUITE: "validate ges"
499 gstreamer-full static build:
500 extends: '.build fedora x86_64'
504 --default-library=static
510 - meson test -C build -v test-gst-full
517 gstreamer-full-minimal static build:
518 extends: 'gstreamer-full static build'
522 --default-library=static
524 -Dgstreamer:gst_debug=false
525 -Dauto_features=disabled
526 -Dgstreamer:check=enabled
528 -Dgst-plugins-base:alsa=enabled
529 -Dgst-plugins-base:typefind=enabled
530 -Dgst-plugins-base:pbtypes=enabled
531 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
532 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
533 -Dgst-full-device-providers=alsa:alsadeviceprovider
534 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
539 - meson test -C build -v test-gst-full
540 - 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"
541 - strip build/libgstreamer-full-1.0.so
542 - ls -l build/libgstreamer-full-1.0.so
550 .valgrind fedora x86_64:
551 extends: '.test fedora x86_64'
554 EXTRA_VALIDATE_ARGS: "--valgrind"
557 extends: '.valgrind fedora x86_64'
559 TEST_SUITE: "check.gstreamer\\..*"
565 - subprojects/gst-devtools/**/*
566 - subprojects/gstreamer/**/*
569 extends: '.valgrind fedora x86_64'
571 TEST_SUITE: "check.gst-plugins-base\\..*"
577 - subprojects/gst-devtools/**/*
578 - subprojects/gstreamer/**/*
579 - subprojects/gst-plugins-base/**/*
582 extends: '.valgrind fedora x86_64'
584 TEST_SUITE: "check.gst-plugins-good\\..*"
585 # take longer time due to splitmux unit test
592 - subprojects/gst-devtools/**/*
593 - subprojects/gstreamer/**/*
594 - subprojects/gst-plugins-base/**/*
595 - subprojects/gst-plugins-good/**/*
598 extends: '.valgrind fedora x86_64'
600 TEST_SUITE: "check.gst-plugins-ugly\\..*"
606 - subprojects/gst-devtools/**/*
607 - subprojects/gstreamer/**/*
608 - subprojects/gst-plugins-base/**/*
609 - subprojects/gst-plugins-good/**/*
610 - subprojects/gst-plugins-ugly/**/*
613 extends: '.valgrind fedora x86_64'
615 TEST_SUITE: "check.gst-plugins-bad\\..*"
621 - subprojects/gst-devtools/**/*
622 - subprojects/gstreamer/**/*
623 - subprojects/gst-plugins-base/**/*
624 - subprojects/gst-plugins-good/**/*
625 - subprojects/gst-plugins-bad/**/*
628 extends: '.valgrind fedora x86_64'
630 TEST_SUITE: "check.gst-editing-services\\..*"
636 - subprojects/gst-devtools/**/*
637 - subprojects/gstreamer/**/*
638 - subprojects/gst-plugins-base/**/*
639 - subprojects/gst-plugins-good/**/*
640 - subprojects/gst-plugins-bad/**/*
641 - subprojects/gst-editing-services/**/*
642 - subprojects/gst-python/**/*
644 # ---- Integration ----- #
647 extends: '.build fedora x86_64'
649 MESON_ARGS: *simple_build
650 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
651 # Disable werror for the docs build, we don't need it
653 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
655 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
656 - export RUSTUP_HOME='/usr/local/rustup'
658 - ci/scripts/handle-subprojects-cache.py subprojects/
660 - meson build/ $MESON_ARGS
661 - ccache --show-stats
663 - ./gst-env.py ninja -C build/ plugins_doc_caches
664 # Ignore modifications to wrap files made by meson
665 - git checkout subprojects/*.wrap
666 - ./ci/scripts/check-documentation-diff.py
668 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
669 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
676 - plugins-cache-diffs/
679 # This jobs runs in gstreamer namespace when after the merge into main branch.
680 # The produced artifact is later used to automatically update the web page.
687 - "fedora amd64 docker"
689 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
692 # This job is run in users namespace to validate documentation before merging
700 - "fedora amd64 docker"
702 # Never run post merge, we have the `documentation` always running for that
703 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
709 - subprojects/gst-docs/**/*
710 - subprojects/gst-devtools/**/*
711 - subprojects/gst-editing-services/**/*
712 - subprojects/gst-libav/**/*
713 - subprojects/gst-omx/**/*
714 - subprojects/gst-plugins-bad/**/*
715 - subprojects/gst-plugins-base/**/*
716 - subprojects/gst-plugins-good/**/*
717 - subprojects/gst-plugins-ugly/**/*
718 - subprojects/gstreamer/**/*
719 - subprojects/gstreamer-vaapi/**/*
720 - subprojects/gst-rtsp-server/**/*
722 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
723 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
731 - '.fdo.suffixed-image@fedora'
733 - "fedora amd64 docker"
735 - ci/gitlab/trigger_cerbero_pipeline.py
738 # Never run post merge
739 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
744 - subprojects/gst-devtools/**/*
745 - subprojects/gst-editing-services/**/*
746 - subprojects/gst-libav/**/*
747 - subprojects/gst-plugins-bad/**/*
748 - subprojects/gst-plugins-base/**/*
749 - subprojects/gst-plugins-good/**/*
750 - subprojects/gst-plugins-ugly/**/*
751 - subprojects/gst-python/**/*
752 - subprojects/gstreamer/**/*
753 - subprojects/gst-rtsp-server/**/*
754 - subprojects/gst-examples/**/*