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 GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
33 FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
35 FEDORA_AMD64_SUFFIX: 'amd64/fedora'
36 INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
37 WINDOWS_AMD64_SUFFIX: 'amd64/windows'
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, but we want to
116 # automatically trigger the integratation stage
117 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH && $CI_JOB_STAGE != "integrate"'
119 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
120 # to avoid wasting CI resources
121 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
127 FDO_DISTRIBUTION_VERSION: '31'
128 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
129 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
130 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
135 - '.fdo.container-build@fedora'
136 stage: 'build docker'
144 FDO_DISTRIBUTION_VERSION: 'stretch'
145 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
146 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
147 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
148 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
150 gst-indent amd64 docker:
152 - '.gst-indent image'
153 - '.fdo.container-build@debian'
154 stage: 'build docker'
155 # Do not depend on the trigger, as we want to run indent always
158 windows amd64 docker:
159 stage: "build docker"
164 # Unlike the buildah/linux jobs, this file
165 # needs to be relative to docker/windows/ subdir
166 # as it makes life easier in the powershell script
168 # We also don't need a CONTEXT_DIR var as its also
169 # hardcoded to be docker/windows/
170 DOCKERFILE: "ci/docker/windows/Dockerfile"
176 # We need to pass an array and to resolve the env vars, so we can't use a variable:
177 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
179 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
182 echo "Failed to build the image"
187 # ---- Preparation ----- #
193 - '.gst-indent image'
194 - '.fdo.suffixed-image@debian'
197 - job: 'gst-indent amd64 docker'
200 - ./scripts/check-format-c
201 - ./scripts/format-csharp --check
203 # Don't check indentation on post merge pipelines
204 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
206 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
210 # build setup templates
212 .build_template: &build
213 - ci/scripts/handle-subprojects-cache.py subprojects/
215 - 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'
296 - "fedora amd64 docker"
298 MESON_ARGS: *simple_build
303 - '.fdo.suffixed-image@fedora'
304 - '.build fedora x86_64'
306 - "fedora amd64 docker"
309 - ./gst-env.py gst-inspect-1.0 --version
310 - ./gst-env.py gst-inspect-1.0
311 - meson install --destdir $CI_PROJECT_DIR/destdir -C build
312 - rm -rf $CI_PROJECT_DIR/destdir
314 build nodebug fedora x86_64:
317 - '.fdo.suffixed-image@fedora'
320 - "fedora amd64 docker"
322 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
324 build clang fedora x86_64:
325 extends: '.build fedora x86_64'
328 CXX: 'ccache clang++'
331 image: $WINDOWS_IMAGE
338 - "windows amd64 docker"
342 ${DEFAULT_MESON_ARGS}
346 -Dgst-plugins-base:pango=enabled
347 -Dgst-plugins-good:cairo=enabled
348 # Needs to not be empty otherwise the newline -> space replace command in
349 # `script:` will fail
350 MESON_CROSS_ARGS: ' '
352 # If this matches, it means the pipeline is running against either the main
353 # or a stable branch, so make it manual
354 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
359 - subprojects/win-*/*
361 # Make sure powershell exits on errors
362 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
363 - $ErrorActionPreference = "Stop"
365 # Set the code page to UTF-8
368 - ci/scripts/handle-subprojects-cache.py subprojects/
369 # For some reason, options are separated by newline instead of space, so we
370 # have to replace them first.
371 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
372 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
373 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
374 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
375 meson compile -C build"
380 - 'build/meson-logs/'
383 extends: '.build windows'
387 - !reference [".build windows", "script",]
388 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
389 .\gst-env.py gst-inspect-1.0.exe --version &&
390 .\gst-env.py gst-inspect-1.0.exe &&
392 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
393 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
396 extends: '.build windows'
400 build vs2019 arm64 uwp:
401 extends: '.build windows'
404 # pango pulls in cairo which pulls in pixman which doesn't build because of
405 # https://github.com/mesonbuild/meson/issues/9889
407 -Dgst-plugins-base:pango=disabled
408 -Dgst-plugins-good:cairo=disabled
409 -Dgst-devtools:cairo=disabled
410 --cross-file ci/meson/vs2019-arm64-cross-file.txt
411 --native-file ci/meson/vs2019-x64-native-file.txt
414 extends: '.build windows'
422 # Make sure powershell exits on errors
423 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
424 - $ErrorActionPreference = "Stop"
426 # Set the code page to UTF-8
429 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
431 - $env:MSYSTEM = "UCRT64"
432 - $env:CHERE_INVOKING = "1"
433 - $env:MSYS2_PATH_TYPE = "inherit"
434 # For some reason, options are separated by newline instead of space, so we
435 # have to replace them first.
436 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
437 # Replace forward slashes with backwards so bash doesn't complain
438 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
439 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
446 - '.build_ccache_vars'
450 MESON_ARGS: *simple_build
452 # Disable colored output to avoid weird rendering issues
453 GST_DEBUG_NO_COLOR: "true"
454 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
455 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
457 CARGO_HOME: "/cache/gstreamer/cargo"
458 # Enable the fault handler so we get backtraces on segfaults.
459 # any non-empty string will do
460 PYTHONFAULTHANDLER: "enabled"
467 - echo "-> Running ${TEST_SUITE}"
470 gst-validate-launcher ${TEST_SUITE}
477 --timeout-factor "${TIMEOUT_FACTOR}"
478 --fail-on-testlist-change
479 -l "${CI_PROJECT_DIR}/validate-logs/"
480 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
481 ${EXTRA_VALIDATE_ARGS}
483 - mv build/meson-logs/ meson-logs
492 - "validate-logs/*.xml"
497 - '.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
717 - "fedora amd64 docker"
719 # Never run post merge, we have the `documentation` always running for that
720 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
726 - subprojects/gst-docs/**/*
727 - subprojects/gst-devtools/**/*
728 - subprojects/gst-editing-services/**/*
729 - subprojects/gst-libav/**/*
730 - subprojects/gst-omx/**/*
731 - subprojects/gst-plugins-bad/**/*
732 - subprojects/gst-plugins-base/**/*
733 - subprojects/gst-plugins-good/**/*
734 - subprojects/gst-plugins-ugly/**/*
735 - subprojects/gstreamer/**/*
736 - subprojects/gstreamer-vaapi/**/*
737 - subprojects/gst-rtsp-server/**/*
739 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
740 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
748 - '.fdo.suffixed-image@fedora'
750 - "fedora amd64 docker"
752 - ci/gitlab/trigger_cerbero_pipeline.py
755 # Never run post merge
756 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
761 - subprojects/gst-devtools/**/*
762 - subprojects/gst-editing-services/**/*
763 - subprojects/gst-libav/**/*
764 - subprojects/gst-plugins-bad/**/*
765 - subprojects/gst-plugins-base/**/*
766 - subprojects/gst-plugins-good/**/*
767 - subprojects/gst-plugins-ugly/**/*
768 - subprojects/gst-python/**/*
769 - subprojects/gstreamer/**/*
770 - subprojects/gst-rtsp-server/**/*
771 - subprojects/gst-examples/**/*