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
208 - ci/scripts/handle-subprojects-cache.py subprojects/
210 - meson build/ $MESON_ARGS
212 - ccache --show-stats
216 CCACHE_COMPILERCHECK: 'content'
217 CCACHE_COMPRESS: 'true'
218 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
219 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
220 # shared across everything really
221 CCACHE_MAXSIZE: '10G'
222 CARGO_HOME: '/cache/gstreamer/cargo'
224 .base_modules_changes: &modules_changes
230 - subprojects/gst-devtools/**/*
231 - subprojects/gst-editing-services/**/*
232 - subprojects/gst-integration-testsuites/**/*
233 - subprojects/gst-libav/**/*
234 - subprojects/gst-omx/**/*
235 - subprojects/gst-plugins-bad/**/*
236 - subprojects/gst-plugins-base/**/*
237 - subprojects/gst-plugins-good/**/*
238 - subprojects/gst-plugins-ugly/**/*
239 - subprojects/gst-python/**/*
240 - subprojects/gstreamer/**/*
241 - subprojects/gstreamer-sharp/**/*
242 - subprojects/gstreamer-vaapi/**/*
243 - subprojects/gst-rtsp-server/**/*
245 .simple_fedora_build: &simple_build >-
246 ${DEFAULT_MESON_ARGS}
249 -Dgst-omx:target=generic
252 ${MESON_BUILDTYPE_ARGS}
258 - '.build_ccache_vars'
261 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
262 # Also need to take into account I/O of pulling docker images and uploading artifacts
265 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
268 - ./gst-env.py gst-inspect-1.0 --version
269 - ./gst-env.py gst-inspect-1.0
271 - mv build/meson-logs/ meson-logs
278 # If this matches, it means the pipeline is running against either the main
279 # or a stable branch, so make it manual
280 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
285 .build fedora x86_64:
288 - '.fdo.suffixed-image@fedora'
292 - "fedora amd64 docker"
294 MESON_ARGS: *simple_build
299 - '.fdo.suffixed-image@fedora'
300 - '.build fedora x86_64'
303 - "fedora amd64 docker"
306 - ./gst-env.py gst-inspect-1.0 --version
307 - ./gst-env.py gst-inspect-1.0
308 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
309 - rm -rf $CI_PROJECT_DIR/destdir
311 build nodebug fedora x86_64:
314 - '.fdo.suffixed-image@fedora'
318 - "fedora amd64 docker"
320 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
322 build clang fedora x86_64:
323 extends: '.build fedora x86_64'
326 CXX: 'ccache clang++'
329 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 - subprojects/win-*/*
360 # Make sure powershell exits on errors
361 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
362 - $ErrorActionPreference = "Stop"
364 # Set the code page to UTF-8
367 - ci/scripts/handle-subprojects-cache.py subprojects/
368 # For some reason, options are separated by newline instead of space, so we
369 # have to replace them first.
370 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
371 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
372 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
373 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
374 meson compile -C build"
379 - 'build/meson-logs/'
382 extends: '.build windows'
386 - !reference [".build windows", "script",]
387 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
388 .\gst-env.py gst-inspect-1.0.exe --version &&
389 .\gst-env.py gst-inspect-1.0.exe &&
391 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
392 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
395 extends: '.build windows'
399 build vs2019 arm64 uwp:
400 extends: '.build windows'
403 # pango pulls in cairo which pulls in pixman which doesn't build because of
404 # https://github.com/mesonbuild/meson/issues/9889
406 -Dgst-plugins-base:pango=disabled
407 -Dgst-plugins-good:cairo=disabled
408 -Dgst-devtools:cairo=disabled
409 --cross-file ci/meson/vs2019-arm64-cross-file.txt
410 --native-file ci/meson/vs2019-x64-native-file.txt
413 extends: '.build windows'
421 # Make sure powershell exits on errors
422 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
423 - $ErrorActionPreference = "Stop"
425 # Set the code page to UTF-8
428 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
430 - $env:MSYSTEM = "UCRT64"
431 - $env:CHERE_INVOKING = "1"
432 - $env:MSYS2_PATH_TYPE = "inherit"
433 # For some reason, options are separated by newline instead of space, so we
434 # have to replace them first.
435 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
436 # Replace forward slashes with backwards so bash doesn't complain
437 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
438 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
445 - '.build_ccache_vars'
449 MESON_ARGS: *simple_build
451 # Disable colored output to avoid weird rendering issues
452 GST_DEBUG_NO_COLOR: "true"
453 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
454 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
456 CARGO_HOME: "/cache/gstreamer/cargo"
457 # Enable the fault handler so we get backtraces on segfaults.
458 # any non-empty string will do
459 PYTHONFAULTHANDLER: "enabled"
466 - echo "-> Running ${TEST_SUITE}"
469 gst-validate-launcher ${TEST_SUITE}
476 --timeout-factor "${TIMEOUT_FACTOR}"
477 --fail-on-testlist-change
478 -l "${CI_PROJECT_DIR}/validate-logs/"
479 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
480 ${EXTRA_VALIDATE_ARGS}
482 - mv build/meson-logs/ meson-logs
491 - "validate-logs/*.xml"
496 - '.fdo.suffixed-image@fedora'
500 - "fedora amd64 docker"
504 extends: '.test fedora x86_64'
506 TEST_SUITE: "check.gst*"
508 integration testsuites fedora:
509 extends: '.test fedora x86_64'
512 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
513 TEST_SUITE: "validate ges"
516 gstreamer-full static build:
517 extends: '.build fedora x86_64'
521 --default-library=static
527 - meson test -C build -v test-gst-full
534 gstreamer-full-minimal static build:
535 extends: 'gstreamer-full static build'
539 --default-library=static
541 -Dgstreamer:gst_debug=false
542 -Dauto_features=disabled
543 -Dgstreamer:check=enabled
545 -Dgst-plugins-base:alsa=enabled
546 -Dgst-plugins-base:typefind=enabled
547 -Dgst-plugins-base:pbtypes=enabled
548 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
549 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
550 -Dgst-full-device-providers=alsa:alsadeviceprovider
551 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
556 - meson test -C build -v test-gst-full
557 - 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"
558 - strip build/libgstreamer-full-1.0.so
559 - ls -l build/libgstreamer-full-1.0.so
567 .valgrind fedora x86_64:
568 extends: '.test fedora x86_64'
571 EXTRA_VALIDATE_ARGS: "--valgrind"
574 extends: '.valgrind fedora x86_64'
576 TEST_SUITE: "check.gstreamer\\..*"
582 - subprojects/gst-devtools/**/*
583 - subprojects/gstreamer/**/*
586 extends: '.valgrind fedora x86_64'
588 TEST_SUITE: "check.gst-plugins-base\\..*"
594 - subprojects/gst-devtools/**/*
595 - subprojects/gstreamer/**/*
596 - subprojects/gst-plugins-base/**/*
599 extends: '.valgrind fedora x86_64'
601 TEST_SUITE: "check.gst-plugins-good\\..*"
602 # take longer time due to splitmux unit test
609 - subprojects/gst-devtools/**/*
610 - subprojects/gstreamer/**/*
611 - subprojects/gst-plugins-base/**/*
612 - subprojects/gst-plugins-good/**/*
615 extends: '.valgrind fedora x86_64'
617 TEST_SUITE: "check.gst-plugins-ugly\\..*"
623 - subprojects/gst-devtools/**/*
624 - subprojects/gstreamer/**/*
625 - subprojects/gst-plugins-base/**/*
626 - subprojects/gst-plugins-good/**/*
627 - subprojects/gst-plugins-ugly/**/*
630 extends: '.valgrind fedora x86_64'
632 TEST_SUITE: "check.gst-plugins-bad\\..*"
638 - subprojects/gst-devtools/**/*
639 - subprojects/gstreamer/**/*
640 - subprojects/gst-plugins-base/**/*
641 - subprojects/gst-plugins-good/**/*
642 - subprojects/gst-plugins-bad/**/*
645 extends: '.valgrind fedora x86_64'
647 TEST_SUITE: "check.gst-editing-services\\..*"
653 - subprojects/gst-devtools/**/*
654 - subprojects/gstreamer/**/*
655 - subprojects/gst-plugins-base/**/*
656 - subprojects/gst-plugins-good/**/*
657 - subprojects/gst-plugins-bad/**/*
658 - subprojects/gst-editing-services/**/*
659 - subprojects/gst-python/**/*
661 # ---- Integration ----- #
664 extends: '.build fedora x86_64'
666 MESON_ARGS: *simple_build
667 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
668 # Disable werror for the docs build, we don't need it
670 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
672 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
673 - export RUSTUP_HOME='/usr/local/rustup'
675 - ci/scripts/handle-subprojects-cache.py subprojects/
677 - meson build/ $MESON_ARGS
678 - ccache --show-stats
680 - ./gst-env.py ninja -C build/ plugins_doc_caches
681 # Ignore modifications to wrap files made by meson
682 - git checkout subprojects/*.wrap
683 - ./ci/scripts/check-documentation-diff.py
685 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
686 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
693 - plugins-cache-diffs/
696 # This jobs runs in gstreamer namespace when after the merge into main branch.
697 # The produced artifact is later used to automatically update the web page.
704 - "fedora amd64 docker"
706 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
709 # This job is run in users namespace to validate documentation before merging
718 - "fedora amd64 docker"
720 # Never run post merge, we have the `documentation` always running for that
721 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
727 - subprojects/gst-docs/**/*
728 - subprojects/gst-devtools/**/*
729 - subprojects/gst-editing-services/**/*
730 - subprojects/gst-libav/**/*
731 - subprojects/gst-omx/**/*
732 - subprojects/gst-plugins-bad/**/*
733 - subprojects/gst-plugins-base/**/*
734 - subprojects/gst-plugins-good/**/*
735 - subprojects/gst-plugins-ugly/**/*
736 - subprojects/gstreamer/**/*
737 - subprojects/gstreamer-vaapi/**/*
738 - subprojects/gst-rtsp-server/**/*
740 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
741 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
749 - '.fdo.suffixed-image@fedora'
752 - "fedora amd64 docker"
754 - ci/gitlab/trigger_cerbero_pipeline.py
757 # Never run post merge
758 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
763 - subprojects/gst-devtools/**/*
764 - subprojects/gst-editing-services/**/*
765 - subprojects/gst-libav/**/*
766 - subprojects/gst-plugins-bad/**/*
767 - subprojects/gst-plugins-base/**/*
768 - subprojects/gst-plugins-good/**/*
769 - subprojects/gst-plugins-ugly/**/*
770 - subprojects/gst-python/**/*
771 - subprojects/gstreamer/**/*
772 - subprojects/gst-rtsp-server/**/*
773 - subprojects/gst-examples/**/*