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'
23 # Use the resulting binaries
29 # Branch to track for modules that have no ref specified in the manifest
30 GST_UPSTREAM_BRANCH: 'main'
32 MESON_BUILDTYPE_ARGS: --default-library=both
34 -Dlibnice:tests=disabled
35 -Dlibnice:examples=disabled
36 -Dopenh264:tests=disabled
37 -Dpygobject:tests=false
50 -Dgstreamer:werror=true
51 -Dgst-plugins-base:werror=true
52 -Dgst-plugins-good:werror=true
53 -Dgst-plugins-ugly:werror=true
54 -Dgst-plugins-bad:werror=true
55 -Dgst-rtsp-server:werror=true
56 -Dgst-libav:werror=true
57 -Dgst-examples:werror=true
58 -Dgst-editing-services:werror=true
59 -Dgst-docs:werror=true
61 -Dgst-devtools:werror=true
62 -Dgst-python:werror=true
63 -Dgstreamer-vaapi:werror=true
64 -Dgstreamer-sharp:werror=true
67 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
69 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
71 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
72 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
74 - if: '$CI_COMMIT_TAG'
75 - if: '$CI_COMMIT_BRANCH'
77 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
82 # This can be used to configure global behaviour our our jobs.
88 - 'runner_system_failure'
89 - 'stuck_or_timeout_failure'
94 # This is an empty job that is used to trigger the pipeline.
101 - echo "Trigger job done, now running the pipeline."
103 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
104 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
105 # Require explicit action to trigger tests post merge
106 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
108 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
109 # to avoid wasting CI resources
110 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
116 FDO_DISTRIBUTION_VERSION: '31'
117 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
118 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
119 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
124 - '.fdo.container-build@fedora'
125 stage: 'build docker'
133 FDO_DISTRIBUTION_VERSION: 'stretch'
134 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
135 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
136 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
137 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
139 gst-indent amd64 docker:
141 - '.gst-indent image'
142 - '.fdo.container-build@debian'
143 stage: 'build docker'
144 # Do not depend on the trigger, as we want to run indent always
147 windows amd64 docker:
148 stage: "build docker"
153 # Unlike the buildah/linux jobs, this file
154 # needs to be relative to docker/windows/ subdir
155 # as it makes life easier in the powershell script
157 # We also don't need a CONTEXT_DIR var as its also
158 # hardcoded to be docker/windows/
159 DOCKERFILE: "ci/docker/windows/Dockerfile"
165 # We need to pass an array and to resolve the env vars, so we can't use a variable:
166 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
168 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
171 echo "Failed to build the image"
176 # ---- Preparation ----- #
182 - '.gst-indent image'
183 - '.fdo.suffixed-image@debian'
186 - job: 'gst-indent amd64 docker'
189 - ./scripts/check-format-c
190 - ./scripts/format-csharp --check
192 # Don't check indentation on post merge pipelines
193 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
195 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
199 # build setup templates
201 .build_template: &build
202 - ci/scripts/handle-subprojects-cache.py subprojects/
204 - meson build/ $MESON_ARGS
206 - ccache --show-stats
210 CCACHE_COMPILERCHECK: 'content'
211 CCACHE_COMPRESS: 'true'
212 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
213 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
214 # shared across everything really
215 CCACHE_MAXSIZE: '10G'
216 CARGO_HOME: '/cache/gstreamer/cargo'
218 .base_modules_changes: &modules_changes
224 - subprojects/gst-devtools/**/*
225 - subprojects/gst-editing-services/**/*
226 - subprojects/gst-integration-testsuites/**/*
227 - subprojects/gst-libav/**/*
228 - subprojects/gst-omx/**/*
229 - subprojects/gst-plugins-bad/**/*
230 - subprojects/gst-plugins-base/**/*
231 - subprojects/gst-plugins-good/**/*
232 - subprojects/gst-plugins-ugly/**/*
233 - subprojects/gst-python/**/*
234 - subprojects/gstreamer/**/*
235 - subprojects/gstreamer-sharp/**/*
236 - subprojects/gstreamer-vaapi/**/*
237 - subprojects/gst-rtsp-server/**/*
239 .simple_fedora_build: &simple_build >-
240 ${DEFAULT_MESON_ARGS}
243 -Dgst-omx:target=generic
246 ${MESON_BUILDTYPE_ARGS}
252 - '.build_ccache_vars'
255 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
256 # Also need to take into account I/O of pulling docker images and uploading artifacts
259 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
262 - ./gst-env.py gst-inspect-1.0 --version
263 - ./gst-env.py gst-inspect-1.0
265 - mv build/meson-logs/ meson-logs
272 # If this matches, it means the pipeline is running against either the main
273 # or a stable branch, so make it manual
274 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
279 .build fedora x86_64:
282 - '.fdo.suffixed-image@fedora'
285 - "fedora amd64 docker"
287 MESON_ARGS: *simple_build
292 - '.fdo.suffixed-image@fedora'
293 - '.build fedora x86_64'
295 - "fedora amd64 docker"
298 - ./gst-env.py gst-inspect-1.0 --version
299 - ./gst-env.py gst-inspect-1.0
300 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
301 - rm -rf $CI_PROJECT_DIR/destdir
303 build nodebug fedora x86_64:
306 - '.fdo.suffixed-image@fedora'
309 - "fedora amd64 docker"
311 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
313 build clang fedora x86_64:
314 extends: '.build fedora x86_64'
317 CXX: 'ccache clang++'
320 image: $WINDOWS_IMAGE
327 - "windows amd64 docker"
331 ${DEFAULT_MESON_ARGS}
335 -Dgst-plugins-base:pango=enabled
336 -Dgst-plugins-good:cairo=enabled
337 # Needs to not be empty otherwise the newline -> space replace command in
338 # `script:` will fail
339 MESON_CROSS_ARGS: ' '
341 # If this matches, it means the pipeline is running against either the main
342 # or a stable branch, so make it manual
343 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
348 # Make sure powershell exits on errors
349 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
350 - $ErrorActionPreference = "Stop"
352 # Set the code page to UTF-8
355 - ci/scripts/handle-subprojects-cache.py subprojects/
356 # For some reason, options are separated by newline instead of space, so we
357 # have to replace them first.
358 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
359 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
360 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
361 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
362 meson compile -C build"
367 - 'build/meson-logs/'
370 extends: '.build windows'
374 - !reference [".build windows", "script",]
375 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
376 .\gst-env.py gst-inspect-1.0.exe --version &&
377 .\gst-env.py gst-inspect-1.0.exe &&
379 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
380 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
383 extends: '.build windows'
387 build vs2019 arm64 uwp:
388 extends: '.build windows'
391 # pango pulls in cairo which pulls in pixman which doesn't build because of
392 # https://github.com/mesonbuild/meson/issues/9889
394 -Dgst-plugins-base:pango=disabled
395 -Dgst-plugins-good:cairo=disabled
396 -Dgst-devtools:cairo=disabled
397 --cross-file ci/meson/vs2019-arm64-cross-file.txt
398 --native-file ci/meson/vs2019-x64-native-file.txt
401 extends: '.build windows'
409 # Make sure powershell exits on errors
410 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
411 - $ErrorActionPreference = "Stop"
413 # Set the code page to UTF-8
416 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
418 - $env:MSYSTEM = "UCRT64"
419 - $env:CHERE_INVOKING = "1"
420 - $env:MSYS2_PATH_TYPE = "inherit"
421 # For some reason, options are separated by newline instead of space, so we
422 # have to replace them first.
423 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
424 # Replace forward slashes with backwards so bash doesn't complain
425 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
426 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
433 - '.build_ccache_vars'
437 MESON_ARGS: *simple_build
439 # Disable colored output to avoid weird rendering issues
440 GST_DEBUG_NO_COLOR: "true"
441 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
442 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
444 CARGO_HOME: "/cache/gstreamer/cargo"
445 # Enable the fault handler so we get backtraces on segfaults.
446 # any non-empty string will do
447 PYTHONFAULTHANDLER: "enabled"
454 - echo "-> Running ${TEST_SUITE}"
457 gst-validate-launcher ${TEST_SUITE}
464 --timeout-factor "${TIMEOUT_FACTOR}"
465 --fail-on-testlist-change
466 -l "${CI_PROJECT_DIR}/validate-logs/"
467 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
468 ${EXTRA_VALIDATE_ARGS}
470 - mv build/meson-logs/ meson-logs
479 - "validate-logs/*.xml"
484 - '.fdo.suffixed-image@fedora'
487 - "fedora amd64 docker"
491 extends: '.test fedora x86_64'
493 TEST_SUITE: "check.gst*"
495 integration testsuites fedora:
496 extends: '.test fedora x86_64'
499 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
500 TEST_SUITE: "validate ges"
503 gstreamer-full static build:
504 extends: '.build fedora x86_64'
508 --default-library=static
514 - meson test -C build -v test-gst-full
521 gstreamer-full-minimal static build:
522 extends: 'gstreamer-full static build'
526 --default-library=static
528 -Dgstreamer:gst_debug=false
529 -Dauto_features=disabled
530 -Dgstreamer:check=enabled
532 -Dgst-plugins-base:alsa=enabled
533 -Dgst-plugins-base:typefind=enabled
534 -Dgst-plugins-base:pbtypes=enabled
535 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
536 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
537 -Dgst-full-device-providers=alsa:alsadeviceprovider
538 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
543 - meson test -C build -v test-gst-full
544 - 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"
545 - strip build/libgstreamer-full-1.0.so
546 - ls -l build/libgstreamer-full-1.0.so
554 .valgrind fedora x86_64:
555 extends: '.test fedora x86_64'
558 EXTRA_VALIDATE_ARGS: "--valgrind"
561 extends: '.valgrind fedora x86_64'
563 TEST_SUITE: "check.gstreamer\\..*"
569 - subprojects/gst-devtools/**/*
570 - subprojects/gstreamer/**/*
573 extends: '.valgrind fedora x86_64'
575 TEST_SUITE: "check.gst-plugins-base\\..*"
581 - subprojects/gst-devtools/**/*
582 - subprojects/gstreamer/**/*
583 - subprojects/gst-plugins-base/**/*
586 extends: '.valgrind fedora x86_64'
588 TEST_SUITE: "check.gst-plugins-good\\..*"
589 # take longer time due to splitmux unit test
596 - subprojects/gst-devtools/**/*
597 - subprojects/gstreamer/**/*
598 - subprojects/gst-plugins-base/**/*
599 - subprojects/gst-plugins-good/**/*
602 extends: '.valgrind fedora x86_64'
604 TEST_SUITE: "check.gst-plugins-ugly\\..*"
610 - subprojects/gst-devtools/**/*
611 - subprojects/gstreamer/**/*
612 - subprojects/gst-plugins-base/**/*
613 - subprojects/gst-plugins-good/**/*
614 - subprojects/gst-plugins-ugly/**/*
617 extends: '.valgrind fedora x86_64'
619 TEST_SUITE: "check.gst-plugins-bad\\..*"
625 - subprojects/gst-devtools/**/*
626 - subprojects/gstreamer/**/*
627 - subprojects/gst-plugins-base/**/*
628 - subprojects/gst-plugins-good/**/*
629 - subprojects/gst-plugins-bad/**/*
632 extends: '.valgrind fedora x86_64'
634 TEST_SUITE: "check.gst-editing-services\\..*"
640 - subprojects/gst-devtools/**/*
641 - subprojects/gstreamer/**/*
642 - subprojects/gst-plugins-base/**/*
643 - subprojects/gst-plugins-good/**/*
644 - subprojects/gst-plugins-bad/**/*
645 - subprojects/gst-editing-services/**/*
646 - subprojects/gst-python/**/*
648 # ---- Integration ----- #
651 extends: '.build fedora x86_64'
653 MESON_ARGS: *simple_build
654 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
655 # Disable werror for the docs build, we don't need it
657 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
659 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
660 - export RUSTUP_HOME='/usr/local/rustup'
662 - ci/scripts/handle-subprojects-cache.py subprojects/
664 - meson build/ $MESON_ARGS
665 - ccache --show-stats
667 - ./gst-env.py ninja -C build/ plugins_doc_caches
668 # Ignore modifications to wrap files made by meson
669 - git checkout subprojects/*.wrap
670 - ./ci/scripts/check-documentation-diff.py
672 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
673 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
680 - plugins-cache-diffs/
683 # This jobs runs in gstreamer namespace when after the merge into main branch.
684 # The produced artifact is later used to automatically update the web page.
691 - "fedora amd64 docker"
693 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
696 # This job is run in users namespace to validate documentation before merging
704 - "fedora amd64 docker"
706 # Never run post merge, we have the `documentation` always running for that
707 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
713 - subprojects/gst-docs/**/*
714 - subprojects/gst-devtools/**/*
715 - subprojects/gst-editing-services/**/*
716 - subprojects/gst-libav/**/*
717 - subprojects/gst-omx/**/*
718 - subprojects/gst-plugins-bad/**/*
719 - subprojects/gst-plugins-base/**/*
720 - subprojects/gst-plugins-good/**/*
721 - subprojects/gst-plugins-ugly/**/*
722 - subprojects/gstreamer/**/*
723 - subprojects/gstreamer-vaapi/**/*
724 - subprojects/gst-rtsp-server/**/*
726 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
727 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
735 - '.fdo.suffixed-image@fedora'
737 - "fedora amd64 docker"
739 - ci/gitlab/trigger_cerbero_pipeline.py
742 # Never run post merge
743 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
748 - subprojects/gst-devtools/**/*
749 - subprojects/gst-editing-services/**/*
750 - subprojects/gst-libav/**/*
751 - subprojects/gst-plugins-bad/**/*
752 - subprojects/gst-plugins-base/**/*
753 - subprojects/gst-plugins-good/**/*
754 - subprojects/gst-plugins-ugly/**/*
755 - subprojects/gst-python/**/*
756 - subprojects/gstreamer/**/*
757 - subprojects/gst-rtsp-server/**/*
758 - subprojects/gst-examples/**/*