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'
23 # These are the version tags for the docker images the CI runs against.
24 # If you are hacking on them or need a them to rebuild, its enough
25 # to change any part of the string of the image you want.
27 FEDORA_TAG: '2022-03-14.0'
28 INDENT_TAG: '2022-03-07.1'
29 WINDOWS_TAG: "2022-04-26.0"
31 GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
32 FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
34 FEDORA_AMD64_SUFFIX: 'amd64/fedora'
35 INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
36 WINDOWS_AMD64_SUFFIX: 'amd64/windows'
37 WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
39 FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
40 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
41 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
43 RUST_MINIMUM_VERSION: '1.57.0'
44 RUST_LATEST_VERSION: '1.60.0'
46 WINDOWS_RUST_MINIMUM_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
47 WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
49 WINDOWS_RUST_LATEST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
50 WINDOWS_RUST_LATEST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
52 MESON_BUILDTYPE_ARGS: --default-library=both
54 -Dlibnice:tests=disabled
55 -Dlibnice:examples=disabled
56 -Dopenh264:tests=disabled
57 -Dpygobject:tests=false
70 -Dgstreamer:werror=true
71 -Dgst-plugins-base:werror=true
72 -Dgst-plugins-good:werror=true
73 -Dgst-plugins-ugly:werror=true
74 -Dgst-plugins-bad:werror=true
75 -Dgst-rtsp-server:werror=true
76 -Dgst-libav:werror=true
77 -Dgst-examples:werror=true
78 -Dgst-editing-services:werror=true
79 -Dgst-docs:werror=true
81 -Dgst-devtools:werror=true
82 -Dgst-python:werror=true
83 -Dgstreamer-vaapi:werror=true
84 -Dgstreamer-sharp:werror=true
87 # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
89 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
91 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
92 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
94 - if: '$CI_COMMIT_TAG'
95 - if: '$CI_COMMIT_BRANCH'
97 GIT_FETCH_EXTRA_FLAGS: '--no-tags'
102 # This can be used to configure global behaviour our our jobs.
108 - 'runner_system_failure'
109 - 'stuck_or_timeout_failure'
110 - 'scheduler_failure'
114 # This is an empty job that is used to trigger the pipeline.
121 - echo "Trigger job done, now running the pipeline."
123 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
124 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
125 # Require explicit action to trigger tests post merge
126 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
128 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
129 # to avoid wasting CI resources
130 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
136 FDO_DISTRIBUTION_VERSION: '31'
137 FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
138 FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
139 FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
144 - '.fdo.container-build@fedora'
145 stage: 'build docker'
153 FDO_DISTRIBUTION_VERSION: 'stretch'
154 FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
155 FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
156 FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
157 FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
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 # Unlike the buildah/linux jobs, this file
202 # needs to be relative to docker/windows/ subdir
203 # as it makes life easier in the powershell script
205 # We also don't need a CONTEXT_DIR var as its also
206 # hardcoded to be docker/windows/
207 DOCKERFILE: 'ci/docker/windows/rust.Dockerfile'
213 # We need to pass an array and to resolve the env vars, so we can't use a variable:
214 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
216 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
219 echo "Failed to build the image"
223 windows rust amd64 docker latest stable:
224 extends: '.windows rust docker build'
226 RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
227 RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
228 RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
230 windows rust amd64 docker minimum supported version:
231 extends: '.windows rust docker build'
233 RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
234 RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
235 RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
239 # ---- Preparation ----- #
245 - '.gst-indent image'
246 - '.fdo.suffixed-image@debian'
249 - job: 'gst-indent amd64 docker'
252 - ./scripts/check-format-c
253 - ./scripts/format-csharp --check
255 # Don't check indentation on post merge pipelines
256 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
258 - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
262 # build setup templates
264 .build_template: &build
265 - ci/scripts/handle-subprojects-cache.py subprojects/
266 # Update subprojects to respect `.wrap` content
267 - meson subprojects update --reset
269 - meson build/ $MESON_ARGS
271 - ccache --show-stats
275 CCACHE_COMPILERCHECK: 'content'
276 CCACHE_COMPRESS: 'true'
277 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
278 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
279 # shared across everything really
280 CCACHE_MAXSIZE: '10G'
281 CARGO_HOME: '/cache/gstreamer/cargo'
283 .base_modules_changes: &modules_changes
288 - subprojects/gst-devtools/**/*
289 - subprojects/gst-editing-services/**/*
290 - subprojects/gst-integration-testsuites/**/*
291 - subprojects/gst-libav/**/*
292 - subprojects/gst-omx/**/*
293 - subprojects/gst-plugins-bad/**/*
294 - subprojects/gst-plugins-base/**/*
295 - subprojects/gst-plugins-good/**/*
296 - subprojects/gst-plugins-ugly/**/*
297 - subprojects/gst-python/**/*
298 - subprojects/gstreamer/**/*
299 - subprojects/gstreamer-sharp/**/*
300 - subprojects/gstreamer-vaapi/**/*
301 - subprojects/gst-rtsp-server/**/*
303 .simple_fedora_build: &simple_build >-
304 ${DEFAULT_MESON_ARGS}
307 -Dgst-omx:target=generic
310 ${MESON_BUILDTYPE_ARGS}
316 - '.build_ccache_vars'
319 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
320 # Also need to take into account I/O of pulling docker images and uploading artifacts
323 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
327 - mv build/meson-logs/ meson-logs
334 # If this matches, it means the pipeline is running against either the main
335 # or a stable branch, so make it manual
336 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
341 .build fedora x86_64:
344 - '.fdo.suffixed-image@fedora'
347 - "fedora amd64 docker"
349 MESON_ARGS: *simple_build
351 build nodebug fedora x86_64:
354 - '.fdo.suffixed-image@fedora'
357 - "fedora amd64 docker"
359 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
361 build clang fedora x86_64:
362 extends: '.build fedora x86_64'
365 CXX: 'ccache clang++'
368 image: $WINDOWS_IMAGE
375 - "windows amd64 docker"
379 ${DEFAULT_MESON_ARGS}
383 -Dgst-plugins-base:pango=enabled
384 -Dgst-plugins-good:cairo=enabled
385 # Needs to not be empty otherwise the newline -> space replace command in
386 # `script:` will fail
387 MESON_CROSS_ARGS: ' '
389 # If this matches, it means the pipeline is running against either the main
390 # or a stable branch, so make it manual
391 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
396 - ci/scripts/handle-subprojects-cache.py subprojects/
397 # For some reason, options are separated by newline instead of space, so we
398 # have to replace them first.
399 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
400 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
401 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
402 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
404 # XXX: Re-enable when uploading stops timing out
406 # expire_in: "7 days"
409 # - 'build/meson-logs/'
413 extends: '.build windows'
418 extends: '.build windows'
422 build vs2019 arm64 uwp:
423 extends: '.build windows'
426 # pango pulls in cairo which pulls in pixman which doesn't build because of
427 # https://github.com/mesonbuild/meson/issues/9889
429 -Dgst-plugins-base:pango=disabled
430 -Dgst-plugins-good:cairo=disabled
431 -Dgst-devtools:cairo=disabled
432 --cross-file ci/meson/vs2019-arm64-cross-file.txt
433 --native-file ci/meson/vs2019-x64-native-file.txt
436 extends: '.build windows'
444 # Make sure powershell exits on errors
445 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
446 - $ErrorActionPreference = "Stop"
448 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
450 - $env:MSYSTEM = "UCRT64"
451 - $env:CHERE_INVOKING = "1"
452 - $env:MSYS2_PATH_TYPE = "inherit"
453 # For some reason, options are separated by newline instead of space, so we
454 # have to replace them first.
455 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
456 # Replace forward slashes with backwards so bash doesn't complain
457 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
458 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
465 - '.build_ccache_vars'
469 MESON_ARGS: *simple_build
471 # Disable colored output to avoid weird rendering issues
472 GST_DEBUG_NO_COLOR: "true"
473 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
474 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
476 CARGO_HOME: "/cache/gstreamer/cargo"
477 # Enable the fault handler so we get backtraces on segfaults.
478 # any non-empty string will do
479 PYTHONFAULTHANDLER: "enabled"
486 - echo "-> Running ${TEST_SUITE}"
489 gst-validate-launcher ${TEST_SUITE}
496 --timeout-factor "${TIMEOUT_FACTOR}"
497 --fail-on-testlist-change
498 -l "${CI_PROJECT_DIR}/validate-logs/"
499 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
500 ${EXTRA_VALIDATE_ARGS}
502 - mv build/meson-logs/ meson-logs
511 - "validate-logs/*.xml"
516 - '.fdo.suffixed-image@fedora'
519 - "fedora amd64 docker"
523 extends: '.test fedora x86_64'
525 TEST_SUITE: "check.gst*"
527 integration testsuites fedora:
528 extends: '.test fedora x86_64'
531 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
532 TEST_SUITE: "validate ges"
535 gstreamer-full static build:
536 extends: '.build fedora x86_64'
540 --default-library=static
546 - meson test -C build -v test-gst-full
553 gstreamer-full-minimal static build:
554 extends: 'gstreamer-full static build'
558 --default-library=static
560 -Dgstreamer:gst_debug=false
561 -Dauto_features=disabled
562 -Dgstreamer:check=enabled
564 -Dgst-plugins-base:alsa=enabled
565 -Dgst-plugins-base:typefind=enabled
566 -Dgst-plugins-base:pbtypes=enabled
567 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
568 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
569 -Dgst-full-device-providers=alsa:alsadeviceprovider
570 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
575 - meson test -C build -v test-gst-full
576 - 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"
577 - strip build/libgstreamer-full-1.0.so
578 - ls -l build/libgstreamer-full-1.0.so
586 .valgrind fedora x86_64:
587 extends: '.test fedora x86_64'
590 EXTRA_VALIDATE_ARGS: "--valgrind"
593 extends: '.valgrind fedora x86_64'
595 TEST_SUITE: "check.gstreamer\\..*"
601 - subprojects/gst-devtools/**/*
602 - subprojects/gstreamer/**/*
605 extends: '.valgrind fedora x86_64'
607 TEST_SUITE: "check.gst-plugins-base\\..*"
613 - subprojects/gst-devtools/**/*
614 - subprojects/gstreamer/**/*
615 - subprojects/gst-plugins-base/**/*
618 extends: '.valgrind fedora x86_64'
620 TEST_SUITE: "check.gst-plugins-good\\..*"
621 # take longer time due to splitmux unit test
628 - subprojects/gst-devtools/**/*
629 - subprojects/gstreamer/**/*
630 - subprojects/gst-plugins-base/**/*
631 - subprojects/gst-plugins-good/**/*
634 extends: '.valgrind fedora x86_64'
636 TEST_SUITE: "check.gst-plugins-ugly\\..*"
642 - subprojects/gst-devtools/**/*
643 - subprojects/gstreamer/**/*
644 - subprojects/gst-plugins-base/**/*
645 - subprojects/gst-plugins-good/**/*
646 - subprojects/gst-plugins-ugly/**/*
649 extends: '.valgrind fedora x86_64'
651 TEST_SUITE: "check.gst-plugins-bad\\..*"
657 - subprojects/gst-devtools/**/*
658 - subprojects/gstreamer/**/*
659 - subprojects/gst-plugins-base/**/*
660 - subprojects/gst-plugins-good/**/*
661 - subprojects/gst-plugins-bad/**/*
664 extends: '.valgrind fedora x86_64'
666 TEST_SUITE: "check.gst-editing-services\\..*"
672 - subprojects/gst-devtools/**/*
673 - subprojects/gstreamer/**/*
674 - subprojects/gst-plugins-base/**/*
675 - subprojects/gst-plugins-good/**/*
676 - subprojects/gst-plugins-bad/**/*
677 - subprojects/gst-editing-services/**/*
678 - subprojects/gst-python/**/*
680 # ---- Integration ----- #
683 image: $FEDORA_DOCS_IMAGE
685 - '.build_ccache_vars'
687 MESON_ARGS: *simple_build
688 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
689 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
691 # FIXME: should rebuild the image with newer versions!
692 - pip3 install --upgrade hotdoc
693 - pip3 install --upgrade meson
695 - ./gst-env.py ninja -C build/ plugins_doc_caches
696 # Ignore modifications to wrap files made by meson
697 - git checkout subprojects/*.wrap
698 - ./ci/scripts/check-documentation-diff.py
699 - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
700 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
707 - plugins-cache-diffs/
710 # This jobs runs in gstreamer namespace when after the merge into main branch.
711 # The produced artifact is later used to automatically update the web page.
719 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
722 # This job is run in users namespace to validate documentation before merging
732 # Never run post merge, we have the `documentation` always running for that
733 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
739 - subprojects/gst-docs/**/*
740 - subprojects/gst-devtools/**/*
741 - subprojects/gst-editing-services/**/*
742 - subprojects/gst-libav/**/*
743 - subprojects/gst-omx/**/*
744 - subprojects/gst-plugins-bad/**/*
745 - subprojects/gst-plugins-base/**/*
746 - subprojects/gst-plugins-good/**/*
747 - subprojects/gst-plugins-ugly/**/*
748 - subprojects/gstreamer/**/*
749 - subprojects/gstreamer-vaapi/**/*
750 - subprojects/gst-rtsp-server/**/*
752 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
753 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
761 - '.fdo.suffixed-image@fedora'
763 - "fedora amd64 docker"
765 - ci/gitlab/trigger_cerbero_pipeline.py
768 # Never run post merge
769 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
774 - subprojects/gst-devtools/**/*
775 - subprojects/gst-editing-services/**/*
776 - subprojects/gst-libav/**/*
777 - subprojects/gst-plugins-bad/**/*
778 - subprojects/gst-plugins-base/**/*
779 - subprojects/gst-plugins-good/**/*
780 - subprojects/gst-plugins-ugly/**/*
781 - subprojects/gst-python/**/*
782 - subprojects/gstreamer/**/*
783 - subprojects/gst-rtsp-server/**/*
784 - subprojects/gst-examples/**/*