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-05-09.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
289 - subprojects/gst-devtools/**/*
290 - subprojects/gst-editing-services/**/*
291 - subprojects/gst-integration-testsuites/**/*
292 - subprojects/gst-libav/**/*
293 - subprojects/gst-omx/**/*
294 - subprojects/gst-plugins-bad/**/*
295 - subprojects/gst-plugins-base/**/*
296 - subprojects/gst-plugins-good/**/*
297 - subprojects/gst-plugins-ugly/**/*
298 - subprojects/gst-python/**/*
299 - subprojects/gstreamer/**/*
300 - subprojects/gstreamer-sharp/**/*
301 - subprojects/gstreamer-vaapi/**/*
302 - subprojects/gst-rtsp-server/**/*
304 .simple_fedora_build: &simple_build >-
305 ${DEFAULT_MESON_ARGS}
308 -Dgst-omx:target=generic
311 ${MESON_BUILDTYPE_ARGS}
317 - '.build_ccache_vars'
320 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
321 # Also need to take into account I/O of pulling docker images and uploading artifacts
324 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
328 - mv build/meson-logs/ meson-logs
335 # If this matches, it means the pipeline is running against either the main
336 # or a stable branch, so make it manual
337 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
342 .build fedora x86_64:
345 - '.fdo.suffixed-image@fedora'
348 - "fedora amd64 docker"
350 MESON_ARGS: *simple_build
352 build nodebug fedora x86_64:
355 - '.fdo.suffixed-image@fedora'
358 - "fedora amd64 docker"
360 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
362 build clang fedora x86_64:
363 extends: '.build fedora x86_64'
366 CXX: 'ccache clang++'
369 image: $WINDOWS_IMAGE
376 - "windows amd64 docker"
380 ${DEFAULT_MESON_ARGS}
384 -Dgst-plugins-base:pango=enabled
385 -Dgst-plugins-good:cairo=enabled
386 # Needs to not be empty otherwise the newline -> space replace command in
387 # `script:` will fail
388 MESON_CROSS_ARGS: ' '
390 # If this matches, it means the pipeline is running against either the main
391 # or a stable branch, so make it manual
392 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
397 # Make sure powershell exits on errors
398 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
399 - $ErrorActionPreference = "Stop"
401 # Set the code page to UTF-8
404 - ci/scripts/handle-subprojects-cache.py subprojects/
405 # For some reason, options are separated by newline instead of space, so we
406 # have to replace them first.
407 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
408 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
409 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
410 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
412 # XXX: Re-enable when uploading stops timing out
414 # expire_in: "7 days"
417 # - 'build/meson-logs/'
421 extends: '.build windows'
426 extends: '.build windows'
430 build vs2019 arm64 uwp:
431 extends: '.build windows'
434 # pango pulls in cairo which pulls in pixman which doesn't build because of
435 # https://github.com/mesonbuild/meson/issues/9889
437 -Dgst-plugins-base:pango=disabled
438 -Dgst-plugins-good:cairo=disabled
439 -Dgst-devtools:cairo=disabled
440 --cross-file ci/meson/vs2019-arm64-cross-file.txt
441 --native-file ci/meson/vs2019-x64-native-file.txt
444 extends: '.build windows'
452 # Make sure powershell exits on errors
453 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
454 - $ErrorActionPreference = "Stop"
456 # Set the code page to UTF-8
459 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
461 - $env:MSYSTEM = "UCRT64"
462 - $env:CHERE_INVOKING = "1"
463 - $env:MSYS2_PATH_TYPE = "inherit"
464 # For some reason, options are separated by newline instead of space, so we
465 # have to replace them first.
466 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
467 # Replace forward slashes with backwards so bash doesn't complain
468 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
469 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
476 - '.build_ccache_vars'
480 MESON_ARGS: *simple_build
482 # Disable colored output to avoid weird rendering issues
483 GST_DEBUG_NO_COLOR: "true"
484 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
485 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
487 CARGO_HOME: "/cache/gstreamer/cargo"
488 # Enable the fault handler so we get backtraces on segfaults.
489 # any non-empty string will do
490 PYTHONFAULTHANDLER: "enabled"
497 - echo "-> Running ${TEST_SUITE}"
500 gst-validate-launcher ${TEST_SUITE}
507 --timeout-factor "${TIMEOUT_FACTOR}"
508 --fail-on-testlist-change
509 -l "${CI_PROJECT_DIR}/validate-logs/"
510 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
511 ${EXTRA_VALIDATE_ARGS}
513 - mv build/meson-logs/ meson-logs
522 - "validate-logs/*.xml"
527 - '.fdo.suffixed-image@fedora'
530 - "fedora amd64 docker"
534 extends: '.test fedora x86_64'
536 TEST_SUITE: "check.gst*"
538 integration testsuites fedora:
539 extends: '.test fedora x86_64'
542 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
543 TEST_SUITE: "validate ges"
546 gstreamer-full static build:
547 extends: '.build fedora x86_64'
551 --default-library=static
557 - meson test -C build -v test-gst-full
564 gstreamer-full-minimal static build:
565 extends: 'gstreamer-full static build'
569 --default-library=static
571 -Dgstreamer:gst_debug=false
572 -Dauto_features=disabled
573 -Dgstreamer:check=enabled
575 -Dgst-plugins-base:alsa=enabled
576 -Dgst-plugins-base:typefind=enabled
577 -Dgst-plugins-base:pbtypes=enabled
578 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
579 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
580 -Dgst-full-device-providers=alsa:alsadeviceprovider
581 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
586 - meson test -C build -v test-gst-full
587 - 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"
588 - strip build/libgstreamer-full-1.0.so
589 - ls -l build/libgstreamer-full-1.0.so
597 .valgrind fedora x86_64:
598 extends: '.test fedora x86_64'
601 EXTRA_VALIDATE_ARGS: "--valgrind"
604 extends: '.valgrind fedora x86_64'
606 TEST_SUITE: "check.gstreamer\\..*"
612 - subprojects/gst-devtools/**/*
613 - subprojects/gstreamer/**/*
616 extends: '.valgrind fedora x86_64'
618 TEST_SUITE: "check.gst-plugins-base\\..*"
624 - subprojects/gst-devtools/**/*
625 - subprojects/gstreamer/**/*
626 - subprojects/gst-plugins-base/**/*
629 extends: '.valgrind fedora x86_64'
631 TEST_SUITE: "check.gst-plugins-good\\..*"
632 # take longer time due to splitmux unit test
639 - subprojects/gst-devtools/**/*
640 - subprojects/gstreamer/**/*
641 - subprojects/gst-plugins-base/**/*
642 - subprojects/gst-plugins-good/**/*
645 extends: '.valgrind fedora x86_64'
647 TEST_SUITE: "check.gst-plugins-ugly\\..*"
653 - subprojects/gst-devtools/**/*
654 - subprojects/gstreamer/**/*
655 - subprojects/gst-plugins-base/**/*
656 - subprojects/gst-plugins-good/**/*
657 - subprojects/gst-plugins-ugly/**/*
660 extends: '.valgrind fedora x86_64'
662 TEST_SUITE: "check.gst-plugins-bad\\..*"
668 - subprojects/gst-devtools/**/*
669 - subprojects/gstreamer/**/*
670 - subprojects/gst-plugins-base/**/*
671 - subprojects/gst-plugins-good/**/*
672 - subprojects/gst-plugins-bad/**/*
675 extends: '.valgrind fedora x86_64'
677 TEST_SUITE: "check.gst-editing-services\\..*"
683 - subprojects/gst-devtools/**/*
684 - subprojects/gstreamer/**/*
685 - subprojects/gst-plugins-base/**/*
686 - subprojects/gst-plugins-good/**/*
687 - subprojects/gst-plugins-bad/**/*
688 - subprojects/gst-editing-services/**/*
689 - subprojects/gst-python/**/*
691 # ---- Integration ----- #
694 image: $FEDORA_DOCS_IMAGE
696 - '.build_ccache_vars'
698 MESON_ARGS: *simple_build
699 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
700 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
702 # FIXME: should rebuild the image with newer versions!
703 - pip3 install --upgrade hotdoc
704 - pip3 install --upgrade meson
706 - ./gst-env.py ninja -C build/ plugins_doc_caches
707 # Ignore modifications to wrap files made by meson
708 - git checkout subprojects/*.wrap
709 - ./ci/scripts/check-documentation-diff.py
710 - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
711 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
718 - plugins-cache-diffs/
721 # This jobs runs in gstreamer namespace when after the merge into main branch.
722 # The produced artifact is later used to automatically update the web page.
730 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
733 # This job is run in users namespace to validate documentation before merging
743 # Never run post merge, we have the `documentation` always running for that
744 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
750 - subprojects/gst-docs/**/*
751 - subprojects/gst-devtools/**/*
752 - subprojects/gst-editing-services/**/*
753 - subprojects/gst-libav/**/*
754 - subprojects/gst-omx/**/*
755 - subprojects/gst-plugins-bad/**/*
756 - subprojects/gst-plugins-base/**/*
757 - subprojects/gst-plugins-good/**/*
758 - subprojects/gst-plugins-ugly/**/*
759 - subprojects/gstreamer/**/*
760 - subprojects/gstreamer-vaapi/**/*
761 - subprojects/gst-rtsp-server/**/*
763 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
764 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
772 - '.fdo.suffixed-image@fedora'
774 - "fedora amd64 docker"
776 - ci/gitlab/trigger_cerbero_pipeline.py
779 # Never run post merge
780 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
785 - subprojects/gst-devtools/**/*
786 - subprojects/gst-editing-services/**/*
787 - subprojects/gst-libav/**/*
788 - subprojects/gst-plugins-bad/**/*
789 - subprojects/gst-plugins-base/**/*
790 - subprojects/gst-plugins-good/**/*
791 - subprojects/gst-plugins-ugly/**/*
792 - subprojects/gst-python/**/*
793 - subprojects/gstreamer/**/*
794 - subprojects/gst-rtsp-server/**/*
795 - subprojects/gst-examples/**/*