2 - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/fedora.yml"
3 - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/14731f78c23c7b523a85a26a068ade9ac1ecd2f3/templates/debian.yml"
12 # Use the resulting binaries
18 # Branch to track for modules that have no ref specified in the manifest
19 GST_UPSTREAM_BRANCH: 'main'
20 ORC_UPSTREAM_BRANCH: 'master'
24 # These are the version tags for the docker images the CI runs against.
25 # If you are hacking on them or need a them to rebuild, its enough
26 # to change any part of the string of the image you want.
28 FEDORA_TAG: '2022-03-14.0'
29 INDENT_TAG: '2021-10-04.0'
30 WINDOWS_TAG: "2022-03-14.0"
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'
38 WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
40 FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
41 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
42 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
44 RUST_MINIMUM_VERSION: '1.54.0'
45 RUST_LATEST_VERSION: '1.55.0'
47 WINDOWS_RUST_MINIMUM_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
48 WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
50 WINDOWS_RUST_LATEST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
51 WINDOWS_RUST_LATEST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
53 MESON_BUILDTYPE_ARGS: --default-library=both
55 -Dlibnice:tests=disabled
56 -Dlibnice:examples=disabled
57 -Dopenh264:tests=disabled
58 -Dpygobject:tests=false
71 -Dgstreamer:werror=true
72 -Dgst-plugins-base:werror=true
73 -Dgst-plugins-good:werror=true
74 -Dgst-plugins-ugly:werror=true
75 -Dgst-plugins-bad:werror=true
76 -Dgst-rtsp-server:werror=true
77 -Dgst-libav:werror=true
78 -Dgst-examples:werror=true
79 -Dgst-editing-services:werror=true
80 -Dgst-docs:werror=true
82 -Dgst-devtools:werror=true
83 -Dgst-python:werror=true
84 -Dgstreamer-vaapi:werror=true
85 -Dgstreamer-sharp:werror=true
88 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
90 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
92 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
93 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
95 - if: '$CI_COMMIT_TAG'
96 - if: '$CI_COMMIT_BRANCH'
98 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
103 # This can be used to configure global behaviour our our jobs.
109 - 'runner_system_failure'
110 - 'stuck_or_timeout_failure'
111 - 'scheduler_failure'
115 # This is an empty job that is used to trigger the pipeline.
122 - echo "Trigger job done, now running the pipeline."
124 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
125 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
126 # Require explicit action to trigger tests post merge
127 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
129 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
130 # to avoid wasting CI resources
131 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
137 FDO_DISTRIBUTION_VERSION: '31'
138 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
139 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
140 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
145 - '.fdo.container-build@fedora'
146 stage: 'build docker'
154 FDO_DISTRIBUTION_VERSION: 'stretch'
155 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
156 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
157 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
159 gst-indent amd64 docker:
161 - '.gst-indent image'
162 - '.fdo.container-build@debian'
163 stage: 'build docker'
164 # Do not depend on the trigger, as we want to run indent always
167 windows amd64 docker:
168 stage: "build docker"
173 # Unlike the buildah/linux jobs, this file
174 # needs to be relative to docker/windows/ subdir
175 # as it makes life easier in the powershell script
177 # We also don't need a CONTEXT_DIR var as its also
178 # hardcoded to be docker/windows/
179 DOCKERFILE: "ci/docker/windows/Dockerfile"
185 # We need to pass an array and to resolve the env vars, so we can't use a variable:
186 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
188 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
191 echo "Failed to build the image"
195 .windows rust docker build:
196 stage: 'build docker'
198 - job: 'windows amd64 docker'
201 - if: '$CI_PROJECT_NAME == "gst-ci"'
203 # Unlike the buildah/linux jobs, this file
204 # needs to be relative to docker/windows/ subdir
205 # as it makes life easier in the powershell script
207 # We also don't need a CONTEXT_DIR var as its also
208 # hardcoded to be docker/windows/
209 DOCKERFILE: 'docker/windows/rust.Dockerfile'
215 # We need to pass an array and to resolve the env vars, so we can't use a variable:
216 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
218 - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
219 - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
220 - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
222 - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
225 echo "Failed to build the image"
229 windows rust amd64 docker latest stable:
230 extends: '.windows rust docker build'
232 RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
233 RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
234 RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
236 windows rust amd64 docker minimum supported version:
237 extends: '.windows rust docker build'
239 RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
240 RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
241 RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
245 # ---- Preparation ----- #
251 - '.gst-indent image'
252 - '.fdo.suffixed-image@debian'
255 - job: 'gst-indent amd64 docker'
258 # man indent. grep RETURN VALUE, grab a beer on my behalf...
259 - indent --version || true
260 - ./scripts/gst-indent-all
262 if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
263 echo "Code is properly formatted"
265 git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
266 echo 'style diverges, please run gst-indent first'
271 # build setup templates
273 .build_template: &build
274 - ci/scripts/handle-subprojects-cache.py subprojects/
275 # Update subprojects to respect `.wrap` content
276 - meson subprojects update --reset
278 - meson build/ $MESON_ARGS
280 - ccache --show-stats
284 CCACHE_COMPILERCHECK: 'content'
285 CCACHE_COMPRESS: 'true'
286 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
287 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
288 # shared across everything really
289 CCACHE_MAXSIZE: '10G'
290 CARGO_HOME: '/cache/gstreamer/cargo'
292 .base_modules_changes: &modules_changes
297 - subprojects/gst-devtools/**/*
298 - subprojects/gst-editing-services/**/*
299 - subprojects/gst-integration-testsuites/**/*
300 - subprojects/gst-libav/**/*
301 - subprojects/gst-omx/**/*
302 - subprojects/gst-plugins-bad/**/*
303 - subprojects/gst-plugins-base/**/*
304 - subprojects/gst-plugins-good/**/*
305 - subprojects/gst-plugins-ugly/**/*
306 - subprojects/gst-python/**/*
307 - subprojects/gstreamer/**/*
308 - subprojects/gstreamer-sharp/**/*
309 - subprojects/gstreamer-vaapi/**/*
310 - subprojects/gst-rtsp-server/**/*
312 .simple_fedora_build: &simple_build >-
313 ${DEFAULT_MESON_ARGS}
316 -Dgst-omx:target=generic
319 ${MESON_BUILDTYPE_ARGS}
325 - '.build_ccache_vars'
328 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
329 # Also need to take into account I/O of pulling docker images and uploading artifacts
332 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
336 - mv build/meson-logs/ meson-logs
343 # If this matches, it means the pipeline is running against either the main
344 # or a stable branch, so make it manual
345 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
350 .build fedora x86_64:
353 - '.fdo.suffixed-image@fedora'
356 - "fedora amd64 docker"
358 MESON_ARGS: *simple_build
360 build nodebug fedora x86_64:
363 - '.fdo.suffixed-image@fedora'
366 - "fedora amd64 docker"
368 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
370 build clang fedora x86_64:
371 extends: '.build fedora x86_64'
374 CXX: 'ccache clang++'
377 image: $WINDOWS_IMAGE
384 - "windows amd64 docker"
388 ${DEFAULT_MESON_ARGS}
392 -Dgst-plugins-base:pango=enabled
393 -Dgst-plugins-good:cairo=enabled
394 # Needs to not be empty otherwise the newline -> space replace command in
395 # `script:` will fail
396 MESON_CROSS_ARGS: ' '
398 # If this matches, it means the pipeline is running against either the main
399 # or a stable branch, so make it manual
400 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
405 - ci/scripts/handle-subprojects-cache.py subprojects/
406 # For some reason, options are separated by newline instead of space, so we
407 # have to replace them first.
408 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
409 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
410 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
411 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
413 # XXX: Re-enable when uploading stops timing out
415 # expire_in: "7 days"
418 # - 'build/meson-logs/'
422 extends: '.build windows'
427 extends: '.build windows'
431 build vs2019 arm64 uwp:
432 extends: '.build windows'
435 # pango pulls in cairo which pulls in pixman which doesn't build because of
436 # https://github.com/mesonbuild/meson/issues/9889
438 -Dgst-plugins-base:pango=disabled
439 -Dgst-plugins-good:cairo=disabled
440 -Dgst-devtools:cairo=disabled
441 --cross-file ci/meson/vs2019-arm64-cross-file.txt
442 --native-file ci/meson/vs2019-x64-native-file.txt
445 extends: '.build windows'
453 # Make sure powershell exits on errors
454 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
455 - $ErrorActionPreference = "Stop"
457 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
459 - $env:MSYSTEM = "UCRT64"
460 - $env:CHERE_INVOKING = "1"
461 - $env:MSYS2_PATH_TYPE = "inherit"
462 # For some reason, options are separated by newline instead of space, so we
463 # have to replace them first.
464 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
465 # Replace forward slashes with backwards so bash doesn't complain
466 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
467 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
474 - '.build_ccache_vars'
478 MESON_ARGS: *simple_build
480 # Disable colored output to avoid weird rendering issues
481 GST_DEBUG_NO_COLOR: "true"
482 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
483 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
485 CARGO_HOME: "/cache/gstreamer/cargo"
486 # Enable the fault handler so we get backtraces on segfaults.
487 # any non-empty string will do
488 PYTHONFAULTHANDLER: "enabled"
495 - echo "-> Running ${TEST_SUITE}"
498 gst-validate-launcher ${TEST_SUITE}
505 --timeout-factor "${TIMEOUT_FACTOR}"
506 --fail-on-testlist-change
507 -l "${CI_PROJECT_DIR}/validate-logs/"
508 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
509 ${EXTRA_VALIDATE_ARGS}
511 - mv build/meson-logs/ meson-logs
520 - "validate-logs/*.xml"
525 - '.fdo.suffixed-image@fedora'
528 - "fedora amd64 docker"
532 extends: '.test fedora x86_64'
534 TEST_SUITE: "check.gst*"
536 integration testsuites fedora:
537 extends: '.test fedora x86_64'
540 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
541 TEST_SUITE: "validate ges"
544 gstreamer-full static build:
545 extends: '.build fedora x86_64'
549 --default-library=static
555 - meson test -C build -v test-gst-full
562 gstreamer-full-minimal static build:
563 extends: 'gstreamer-full static build'
567 --default-library=static
569 -Dgstreamer:gst_debug=false
570 -Dauto_features=disabled
571 -Dgstreamer:check=enabled
573 -Dgst-plugins-base:alsa=enabled
574 -Dgst-plugins-base:typefind=enabled
575 -Dgst-plugins-base:pbtypes=enabled
576 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
577 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
578 -Dgst-full-device-providers=alsa:alsadeviceprovider
579 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
584 - meson test -C build -v test-gst-full
585 - 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"
586 - strip build/libgstreamer-full-1.0.so
587 - ls -l build/libgstreamer-full-1.0.so
595 .valgrind fedora x86_64:
596 extends: '.test fedora x86_64'
599 EXTRA_VALIDATE_ARGS: "--valgrind"
602 extends: '.valgrind fedora x86_64'
604 TEST_SUITE: "check.gstreamer\\..*"
610 - subprojects/gst-devtools/**/*
611 - subprojects/gstreamer/**/*
614 extends: '.valgrind fedora x86_64'
616 TEST_SUITE: "check.gst-plugins-base\\..*"
622 - subprojects/gst-devtools/**/*
623 - subprojects/gstreamer/**/*
624 - subprojects/gst-plugins-base/**/*
627 extends: '.valgrind fedora x86_64'
629 TEST_SUITE: "check.gst-plugins-good\\..*"
630 # take longer time due to splitmux unit test
637 - subprojects/gst-devtools/**/*
638 - subprojects/gstreamer/**/*
639 - subprojects/gst-plugins-base/**/*
640 - subprojects/gst-plugins-good/**/*
643 extends: '.valgrind fedora x86_64'
645 TEST_SUITE: "check.gst-plugins-ugly\\..*"
651 - subprojects/gst-devtools/**/*
652 - subprojects/gstreamer/**/*
653 - subprojects/gst-plugins-base/**/*
654 - subprojects/gst-plugins-good/**/*
655 - subprojects/gst-plugins-ugly/**/*
658 extends: '.valgrind fedora x86_64'
660 TEST_SUITE: "check.gst-plugins-bad\\..*"
666 - subprojects/gst-devtools/**/*
667 - subprojects/gstreamer/**/*
668 - subprojects/gst-plugins-base/**/*
669 - subprojects/gst-plugins-good/**/*
670 - subprojects/gst-plugins-bad/**/*
673 extends: '.valgrind fedora x86_64'
675 TEST_SUITE: "check.gst-editing-services\\..*"
681 - subprojects/gst-devtools/**/*
682 - subprojects/gstreamer/**/*
683 - subprojects/gst-plugins-base/**/*
684 - subprojects/gst-plugins-good/**/*
685 - subprojects/gst-plugins-bad/**/*
686 - subprojects/gst-editing-services/**/*
687 - subprojects/gst-python/**/*
689 # ---- Integration ----- #
692 image: $FEDORA_DOCS_IMAGE
694 - '.build_ccache_vars'
696 MESON_ARGS: *simple_build
697 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
698 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
700 # FIXME: should rebuild the image with newer versions!
701 - pip3 install --upgrade hotdoc
702 - pip3 install --upgrade meson
704 - ./gst-env.py ninja -C build/ plugins_doc_caches
705 # Ignore modifications to wrap files made by meson
706 - git checkout subprojects/*.wrap
707 - ./ci/scripts/check-documentation-diff.py
708 - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
709 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
716 - plugins-cache-diffs/
719 # This jobs runs in gstreamer namespace when after the merge into main branch.
720 # The produced artifact is later used to automatically update the web page.
728 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
731 # This job is run in users namespace to validate documentation before merging
741 # Never run post merge, we have the `documentation` always running for that
742 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
748 - subprojects/gst-docs/**/*
749 - subprojects/gst-devtools/**/*
750 - subprojects/gst-editing-services/**/*
751 - subprojects/gst-libav/**/*
752 - subprojects/gst-omx/**/*
753 - subprojects/gst-plugins-bad/**/*
754 - subprojects/gst-plugins-base/**/*
755 - subprojects/gst-plugins-good/**/*
756 - subprojects/gst-plugins-ugly/**/*
757 - subprojects/gstreamer/**/*
758 - subprojects/gstreamer-vaapi/**/*
759 - subprojects/gst-rtsp-server/**/*
761 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
762 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
770 - '.fdo.suffixed-image@fedora'
772 - "fedora amd64 docker"
774 - ci/gitlab/trigger_cerbero_pipeline.py
777 # Never run post merge
778 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
783 - subprojects/gst-devtools/**/*
784 - subprojects/gst-editing-services/**/*
785 - subprojects/gst-libav/**/*
786 - subprojects/gst-plugins-bad/**/*
787 - subprojects/gst-plugins-base/**/*
788 - subprojects/gst-plugins-good/**/*
789 - subprojects/gst-plugins-ugly/**/*
790 - subprojects/gst-python/**/*
791 - subprojects/gstreamer/**/*
792 - subprojects/gst-rtsp-server/**/*
793 - subprojects/gst-examples/**/*