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'
20 # Use the resulting binaries
26 # Branch to track for modules that have no ref specified in the manifest
27 GST_UPSTREAM_BRANCH: 'main'
29 FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
31 FEDORA_AMD64_SUFFIX: 'amd64/fedora'
32 INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
33 WINDOWS_AMD64_SUFFIX: 'amd64/windows'
35 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
36 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
38 MESON_BUILDTYPE_ARGS: --default-library=both
40 -Dlibnice:tests=disabled
41 -Dlibnice:examples=disabled
42 -Dopenh264:tests=disabled
43 -Dpygobject:tests=false
56 -Dgstreamer:werror=true
57 -Dgst-plugins-base:werror=true
58 -Dgst-plugins-good:werror=true
59 -Dgst-plugins-ugly:werror=true
60 -Dgst-plugins-bad:werror=true
61 -Dgst-rtsp-server:werror=true
62 -Dgst-libav:werror=true
63 -Dgst-examples:werror=true
64 -Dgst-editing-services:werror=true
65 -Dgst-docs:werror=true
67 -Dgst-devtools:werror=true
68 -Dgst-python:werror=true
69 -Dgstreamer-vaapi:werror=true
70 -Dgstreamer-sharp:werror=true
73 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
75 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
77 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
78 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
80 - if: '$CI_COMMIT_TAG'
81 - if: '$CI_COMMIT_BRANCH'
83 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
88 # This can be used to configure global behaviour our our jobs.
94 - 'runner_system_failure'
95 - 'stuck_or_timeout_failure'
100 # This is an empty job that is used to trigger the pipeline.
107 - echo "Trigger job done, now running the pipeline."
109 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
110 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
111 # Require explicit action to trigger tests post merge, but we want to
112 # automatically trigger the integratation stage
113 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH && $CI_JOB_STAGE != "integrate"'
115 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
116 # to avoid wasting CI resources
117 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
123 FDO_DISTRIBUTION_VERSION: '31'
124 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
125 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
126 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
131 - '.fdo.container-build@fedora'
139 FDO_DISTRIBUTION_VERSION: 'stretch'
140 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
141 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
142 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
143 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
145 gst-indent amd64 docker:
147 - '.gst-indent image'
148 - '.fdo.container-build@debian'
150 # Do not depend on the trigger, as we want to run indent always
153 windows amd64 docker:
159 # Unlike the buildah/linux jobs, this file
160 # needs to be relative to docker/windows/ subdir
161 # as it makes life easier in the powershell script
163 # We also don't need a CONTEXT_DIR var as its also
164 # hardcoded to be docker/windows/
165 DOCKERFILE: "ci/docker/windows/Dockerfile"
171 # We need to pass an array and to resolve the env vars, so we can't use a variable:
172 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
174 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
177 echo "Failed to build the image"
182 # ---- Preparation ----- #
188 - '.gst-indent image'
189 - '.fdo.suffixed-image@debian'
192 - job: 'gst-indent amd64 docker'
195 - ./scripts/check-format-c
196 - ./scripts/format-csharp --check
198 # Don't check indentation on post merge pipelines
199 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
201 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
205 # build setup templates
207 .build_template: &build
209 - ci/scripts/handle-subprojects-cache.py subprojects/
213 - meson build/ $MESON_ARGS
217 - ccache --show-stats
221 CCACHE_COMPILERCHECK: 'content'
222 CCACHE_COMPRESS: 'true'
223 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
224 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
225 # shared across everything really
226 CCACHE_MAXSIZE: '10G'
227 CARGO_HOME: '/cache/gstreamer/cargo'
229 .base_modules_changes: &modules_changes
235 - subprojects/gst-devtools/**/*
236 - subprojects/gst-editing-services/**/*
237 - subprojects/gst-integration-testsuites/**/*
238 - subprojects/gst-libav/**/*
239 - subprojects/gst-omx/**/*
240 - subprojects/gst-plugins-bad/**/*
241 - subprojects/gst-plugins-base/**/*
242 - subprojects/gst-plugins-good/**/*
243 - subprojects/gst-plugins-ugly/**/*
244 - subprojects/gst-python/**/*
245 - subprojects/gstreamer/**/*
246 - subprojects/gstreamer-sharp/**/*
247 - subprojects/gstreamer-vaapi/**/*
248 - subprojects/gst-rtsp-server/**/*
250 .simple_fedora_build: &simple_build >-
251 ${DEFAULT_MESON_ARGS}
254 -Dgst-omx:target=generic
257 ${MESON_BUILDTYPE_ARGS}
263 - '.build_ccache_vars'
266 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
267 # Also need to take into account I/O of pulling docker images and uploading artifacts
270 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
273 - ./gst-env.py gst-inspect-1.0 --version
274 - ./gst-env.py gst-inspect-1.0
276 - mv build/meson-logs/ meson-logs
283 # If this matches, it means the pipeline is running against either the main
284 # or a stable branch, so make it manual
285 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
290 .build fedora x86_64:
293 - '.fdo.suffixed-image@fedora'
297 - "fedora amd64 docker"
299 MESON_ARGS: *simple_build
304 - '.fdo.suffixed-image@fedora'
305 - '.build fedora x86_64'
308 - "fedora amd64 docker"
311 - ./gst-env.py gst-inspect-1.0 --version
312 - ./gst-env.py gst-inspect-1.0
313 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
314 - rm -rf $CI_PROJECT_DIR/destdir
316 build nodebug fedora x86_64:
319 - '.fdo.suffixed-image@fedora'
323 - "fedora amd64 docker"
325 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
327 build clang fedora x86_64:
328 extends: '.build fedora x86_64'
331 CXX: 'ccache clang++'
334 image: $WINDOWS_IMAGE
342 - "windows amd64 docker"
346 ${DEFAULT_MESON_ARGS}
350 -Dgst-plugins-base:pango=enabled
351 -Dgst-plugins-good:cairo=enabled
352 # Needs to not be empty otherwise the newline -> space replace command in
353 # `script:` will fail
354 MESON_CROSS_ARGS: ' '
356 # If this matches, it means the pipeline is running against either the main
357 # or a stable branch, so make it manual
358 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
363 - subprojects/win-*/*
365 # Make sure powershell exits on errors
366 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
367 - $ErrorActionPreference = "Stop"
369 # Set the code page to UTF-8
372 - ci/scripts/handle-subprojects-cache.py subprojects/
373 # For some reason, options are separated by newline instead of space, so we
374 # have to replace them first.
375 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
376 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
377 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
378 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
379 meson compile -C build"
384 - 'build/meson-logs/'
387 extends: '.build windows'
391 - !reference [".build windows", "script",]
392 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
393 .\gst-env.py gst-inspect-1.0.exe --version &&
394 .\gst-env.py gst-inspect-1.0.exe &&
396 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
397 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
400 extends: '.build windows'
404 build vs2019 arm64 uwp:
405 extends: '.build windows'
408 # pango pulls in cairo which pulls in pixman which doesn't build because of
409 # https://github.com/mesonbuild/meson/issues/9889
411 -Dgst-plugins-base:pango=disabled
412 -Dgst-plugins-good:cairo=disabled
413 -Dgst-devtools:cairo=disabled
414 --cross-file ci/meson/vs2019-arm64-cross-file.txt
415 --native-file ci/meson/vs2019-x64-native-file.txt
418 extends: '.build windows'
426 # Make sure powershell exits on errors
427 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
428 - $ErrorActionPreference = "Stop"
430 # Set the code page to UTF-8
433 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
435 - $env:MSYSTEM = "UCRT64"
436 - $env:CHERE_INVOKING = "1"
437 - $env:MSYS2_PATH_TYPE = "inherit"
438 # For some reason, options are separated by newline instead of space, so we
439 # have to replace them first.
440 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
441 # Replace forward slashes with backwards so bash doesn't complain
442 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
443 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
450 - '.build_ccache_vars'
454 MESON_ARGS: *simple_build
456 # Disable colored output to avoid weird rendering issues
457 GST_DEBUG_NO_COLOR: "true"
458 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
459 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
461 CARGO_HOME: "/cache/gstreamer/cargo"
462 # Enable the fault handler so we get backtraces on segfaults.
463 # any non-empty string will do
464 PYTHONFAULTHANDLER: "enabled"
471 - echo "-> Running ${TEST_SUITE}"
474 gst-validate-launcher ${TEST_SUITE}
481 --timeout-factor "${TIMEOUT_FACTOR}"
482 --fail-on-testlist-change
483 -l "${CI_PROJECT_DIR}/validate-logs/"
484 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
485 ${EXTRA_VALIDATE_ARGS}
487 - mv build/meson-logs/ meson-logs
496 - "validate-logs/*.xml"
501 - '.fdo.suffixed-image@fedora'
505 - "fedora amd64 docker"
509 extends: '.test fedora x86_64'
511 TEST_SUITE: "check.gst*"
513 integration testsuites fedora:
514 extends: '.test fedora x86_64'
517 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
518 TEST_SUITE: "validate ges"
521 gstreamer-full static build:
522 extends: '.build fedora x86_64'
526 --default-library=static
532 - meson test -C build -v test-gst-full
539 gstreamer-full-minimal static build:
540 extends: 'gstreamer-full static build'
544 --default-library=static
546 -Dgstreamer:gst_debug=false
547 -Dauto_features=disabled
548 -Dgstreamer:check=enabled
550 -Dgst-plugins-base:alsa=enabled
551 -Dgst-plugins-base:typefind=enabled
552 -Dgst-plugins-base:pbtypes=enabled
553 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
554 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
555 -Dgst-full-device-providers=alsa:alsadeviceprovider
556 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
561 - meson test -C build -v test-gst-full
562 - 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"
563 - strip build/libgstreamer-full-1.0.so
564 - ls -l build/libgstreamer-full-1.0.so
572 .valgrind fedora x86_64:
573 extends: '.test fedora x86_64'
576 EXTRA_VALIDATE_ARGS: "--valgrind"
579 extends: '.valgrind fedora x86_64'
581 TEST_SUITE: "check.gstreamer\\..*"
587 - subprojects/gst-devtools/**/*
588 - subprojects/gstreamer/**/*
591 extends: '.valgrind fedora x86_64'
593 TEST_SUITE: "check.gst-plugins-base\\..*"
599 - subprojects/gst-devtools/**/*
600 - subprojects/gstreamer/**/*
601 - subprojects/gst-plugins-base/**/*
604 extends: '.valgrind fedora x86_64'
606 TEST_SUITE: "check.gst-plugins-good\\..*"
607 # take longer time due to splitmux unit test
614 - subprojects/gst-devtools/**/*
615 - subprojects/gstreamer/**/*
616 - subprojects/gst-plugins-base/**/*
617 - subprojects/gst-plugins-good/**/*
620 extends: '.valgrind fedora x86_64'
622 TEST_SUITE: "check.gst-plugins-ugly\\..*"
628 - subprojects/gst-devtools/**/*
629 - subprojects/gstreamer/**/*
630 - subprojects/gst-plugins-base/**/*
631 - subprojects/gst-plugins-good/**/*
632 - subprojects/gst-plugins-ugly/**/*
635 extends: '.valgrind fedora x86_64'
637 TEST_SUITE: "check.gst-plugins-bad\\..*"
643 - subprojects/gst-devtools/**/*
644 - subprojects/gstreamer/**/*
645 - subprojects/gst-plugins-base/**/*
646 - subprojects/gst-plugins-good/**/*
647 - subprojects/gst-plugins-bad/**/*
650 extends: '.valgrind fedora x86_64'
652 TEST_SUITE: "check.gst-editing-services\\..*"
658 - subprojects/gst-devtools/**/*
659 - subprojects/gstreamer/**/*
660 - subprojects/gst-plugins-base/**/*
661 - subprojects/gst-plugins-good/**/*
662 - subprojects/gst-plugins-bad/**/*
663 - subprojects/gst-editing-services/**/*
664 - subprojects/gst-python/**/*
666 # ---- Integration ----- #
669 extends: '.build fedora x86_64'
671 MESON_ARGS: *simple_build
672 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
673 # Disable werror for the docs build, we don't need it
675 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
677 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
678 - export RUSTUP_HOME='/usr/local/rustup'
680 - ci/scripts/handle-subprojects-cache.py subprojects/
682 - meson build/ $MESON_ARGS
683 - ccache --show-stats
685 - ./gst-env.py ninja -C build/ plugins_doc_caches
686 # Ignore modifications to wrap files made by meson
687 - git checkout subprojects/*.wrap
688 - ./ci/scripts/check-documentation-diff.py
690 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
691 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
698 - plugins-cache-diffs/
701 # This jobs runs in gstreamer namespace when after the merge into main branch.
702 # The produced artifact is later used to automatically update the web page.
709 - "fedora amd64 docker"
711 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
714 # This job is run in users namespace to validate documentation before merging
723 - "fedora amd64 docker"
725 # Never run post merge, we have the `documentation` always running for that
726 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
732 - subprojects/gst-docs/**/*
733 - subprojects/gst-devtools/**/*
734 - subprojects/gst-editing-services/**/*
735 - subprojects/gst-libav/**/*
736 - subprojects/gst-omx/**/*
737 - subprojects/gst-plugins-bad/**/*
738 - subprojects/gst-plugins-base/**/*
739 - subprojects/gst-plugins-good/**/*
740 - subprojects/gst-plugins-ugly/**/*
741 - subprojects/gstreamer/**/*
742 - subprojects/gstreamer-vaapi/**/*
743 - subprojects/gst-rtsp-server/**/*
745 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
746 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
754 - '.fdo.suffixed-image@fedora'
757 - "fedora amd64 docker"
759 - ci/gitlab/trigger_cerbero_pipeline.py
762 # Never run post merge
763 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
768 - subprojects/gst-devtools/**/*
769 - subprojects/gst-editing-services/**/*
770 - subprojects/gst-libav/**/*
771 - subprojects/gst-plugins-bad/**/*
772 - subprojects/gst-plugins-base/**/*
773 - subprojects/gst-plugins-good/**/*
774 - subprojects/gst-plugins-ugly/**/*
775 - subprojects/gst-python/**/*
776 - subprojects/gstreamer/**/*
777 - subprojects/gst-rtsp-server/**/*
778 - subprojects/gst-examples/**/*