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 # Make sure powershell exits on errors
360 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
361 - $ErrorActionPreference = "Stop"
363 # Set the code page to UTF-8
366 - ci/scripts/handle-subprojects-cache.py subprojects/
367 # For some reason, options are separated by newline instead of space, so we
368 # have to replace them first.
369 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
370 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
371 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
372 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
373 meson compile -C build"
378 - 'build/meson-logs/'
381 extends: '.build windows'
385 - !reference [".build windows", "script",]
386 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
387 .\gst-env.py gst-inspect-1.0.exe --version &&
388 .\gst-env.py gst-inspect-1.0.exe &&
390 meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
391 rmdir /s /q $env:CI_PROJECT_DIR\destdir"
394 extends: '.build windows'
398 build vs2019 arm64 uwp:
399 extends: '.build windows'
402 # pango pulls in cairo which pulls in pixman which doesn't build because of
403 # https://github.com/mesonbuild/meson/issues/9889
405 -Dgst-plugins-base:pango=disabled
406 -Dgst-plugins-good:cairo=disabled
407 -Dgst-devtools:cairo=disabled
408 --cross-file ci/meson/vs2019-arm64-cross-file.txt
409 --native-file ci/meson/vs2019-x64-native-file.txt
412 extends: '.build windows'
420 # Make sure powershell exits on errors
421 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
422 - $ErrorActionPreference = "Stop"
424 # Set the code page to UTF-8
427 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
429 - $env:MSYSTEM = "UCRT64"
430 - $env:CHERE_INVOKING = "1"
431 - $env:MSYS2_PATH_TYPE = "inherit"
432 # For some reason, options are separated by newline instead of space, so we
433 # have to replace them first.
434 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
435 # Replace forward slashes with backwards so bash doesn't complain
436 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
437 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
444 - '.build_ccache_vars'
448 MESON_ARGS: *simple_build
450 # Disable colored output to avoid weird rendering issues
451 GST_DEBUG_NO_COLOR: "true"
452 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
453 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
455 CARGO_HOME: "/cache/gstreamer/cargo"
456 # Enable the fault handler so we get backtraces on segfaults.
457 # any non-empty string will do
458 PYTHONFAULTHANDLER: "enabled"
465 - echo "-> Running ${TEST_SUITE}"
468 gst-validate-launcher ${TEST_SUITE}
475 --timeout-factor "${TIMEOUT_FACTOR}"
476 --fail-on-testlist-change
477 -l "${CI_PROJECT_DIR}/validate-logs/"
478 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
479 ${EXTRA_VALIDATE_ARGS}
481 - mv build/meson-logs/ meson-logs
490 - "validate-logs/*.xml"
495 - '.fdo.suffixed-image@fedora'
498 - "fedora amd64 docker"
502 extends: '.test fedora x86_64'
504 TEST_SUITE: "check.gst*"
506 integration testsuites fedora:
507 extends: '.test fedora x86_64'
510 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
511 TEST_SUITE: "validate ges"
514 gstreamer-full static build:
515 extends: '.build fedora x86_64'
519 --default-library=static
525 - meson test -C build -v test-gst-full
532 gstreamer-full-minimal static build:
533 extends: 'gstreamer-full static build'
537 --default-library=static
539 -Dgstreamer:gst_debug=false
540 -Dauto_features=disabled
541 -Dgstreamer:check=enabled
543 -Dgst-plugins-base:alsa=enabled
544 -Dgst-plugins-base:typefind=enabled
545 -Dgst-plugins-base:pbtypes=enabled
546 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
547 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
548 -Dgst-full-device-providers=alsa:alsadeviceprovider
549 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
554 - meson test -C build -v test-gst-full
555 - 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"
556 - strip build/libgstreamer-full-1.0.so
557 - ls -l build/libgstreamer-full-1.0.so
565 .valgrind fedora x86_64:
566 extends: '.test fedora x86_64'
569 EXTRA_VALIDATE_ARGS: "--valgrind"
572 extends: '.valgrind fedora x86_64'
574 TEST_SUITE: "check.gstreamer\\..*"
580 - subprojects/gst-devtools/**/*
581 - subprojects/gstreamer/**/*
584 extends: '.valgrind fedora x86_64'
586 TEST_SUITE: "check.gst-plugins-base\\..*"
592 - subprojects/gst-devtools/**/*
593 - subprojects/gstreamer/**/*
594 - subprojects/gst-plugins-base/**/*
597 extends: '.valgrind fedora x86_64'
599 TEST_SUITE: "check.gst-plugins-good\\..*"
600 # take longer time due to splitmux unit test
607 - subprojects/gst-devtools/**/*
608 - subprojects/gstreamer/**/*
609 - subprojects/gst-plugins-base/**/*
610 - subprojects/gst-plugins-good/**/*
613 extends: '.valgrind fedora x86_64'
615 TEST_SUITE: "check.gst-plugins-ugly\\..*"
621 - subprojects/gst-devtools/**/*
622 - subprojects/gstreamer/**/*
623 - subprojects/gst-plugins-base/**/*
624 - subprojects/gst-plugins-good/**/*
625 - subprojects/gst-plugins-ugly/**/*
628 extends: '.valgrind fedora x86_64'
630 TEST_SUITE: "check.gst-plugins-bad\\..*"
636 - subprojects/gst-devtools/**/*
637 - subprojects/gstreamer/**/*
638 - subprojects/gst-plugins-base/**/*
639 - subprojects/gst-plugins-good/**/*
640 - subprojects/gst-plugins-bad/**/*
643 extends: '.valgrind fedora x86_64'
645 TEST_SUITE: "check.gst-editing-services\\..*"
651 - subprojects/gst-devtools/**/*
652 - subprojects/gstreamer/**/*
653 - subprojects/gst-plugins-base/**/*
654 - subprojects/gst-plugins-good/**/*
655 - subprojects/gst-plugins-bad/**/*
656 - subprojects/gst-editing-services/**/*
657 - subprojects/gst-python/**/*
659 # ---- Integration ----- #
662 extends: '.build fedora x86_64'
664 MESON_ARGS: *simple_build
665 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
666 # Disable werror for the docs build, we don't need it
668 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
670 - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
671 - export RUSTUP_HOME='/usr/local/rustup'
673 - ci/scripts/handle-subprojects-cache.py subprojects/
675 - meson build/ $MESON_ARGS
676 - ccache --show-stats
678 - ./gst-env.py ninja -C build/ plugins_doc_caches
679 # Ignore modifications to wrap files made by meson
680 - git checkout subprojects/*.wrap
681 - ./ci/scripts/check-documentation-diff.py
683 - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
684 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
691 - plugins-cache-diffs/
694 # This jobs runs in gstreamer namespace when after the merge into main branch.
695 # The produced artifact is later used to automatically update the web page.
702 - "fedora amd64 docker"
704 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
707 # This job is run in users namespace to validate documentation before merging
715 - "fedora amd64 docker"
717 # Never run post merge, we have the `documentation` always running for that
718 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
724 - subprojects/gst-docs/**/*
725 - subprojects/gst-devtools/**/*
726 - subprojects/gst-editing-services/**/*
727 - subprojects/gst-libav/**/*
728 - subprojects/gst-omx/**/*
729 - subprojects/gst-plugins-bad/**/*
730 - subprojects/gst-plugins-base/**/*
731 - subprojects/gst-plugins-good/**/*
732 - subprojects/gst-plugins-ugly/**/*
733 - subprojects/gstreamer/**/*
734 - subprojects/gstreamer-vaapi/**/*
735 - subprojects/gst-rtsp-server/**/*
737 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
738 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
746 - '.fdo.suffixed-image@fedora'
748 - "fedora amd64 docker"
750 - ci/gitlab/trigger_cerbero_pipeline.py
753 # Never run post merge
754 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
759 - subprojects/gst-devtools/**/*
760 - subprojects/gst-editing-services/**/*
761 - subprojects/gst-libav/**/*
762 - subprojects/gst-plugins-bad/**/*
763 - subprojects/gst-plugins-base/**/*
764 - subprojects/gst-plugins-good/**/*
765 - subprojects/gst-plugins-ugly/**/*
766 - subprojects/gst-python/**/*
767 - subprojects/gstreamer/**/*
768 - subprojects/gst-rtsp-server/**/*
769 - subprojects/gst-examples/**/*