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
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 - ci/scripts/handle-subprojects-cache.py subprojects/
398 # For some reason, options are separated by newline instead of space, so we
399 # have to replace them first.
400 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
401 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
402 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
403 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
405 # XXX: Re-enable when uploading stops timing out
407 # expire_in: "7 days"
410 # - 'build/meson-logs/'
414 extends: '.build windows'
419 extends: '.build windows'
423 build vs2019 arm64 uwp:
424 extends: '.build windows'
427 # pango pulls in cairo which pulls in pixman which doesn't build because of
428 # https://github.com/mesonbuild/meson/issues/9889
430 -Dgst-plugins-base:pango=disabled
431 -Dgst-plugins-good:cairo=disabled
432 -Dgst-devtools:cairo=disabled
433 --cross-file ci/meson/vs2019-arm64-cross-file.txt
434 --native-file ci/meson/vs2019-x64-native-file.txt
437 extends: '.build windows'
445 # Make sure powershell exits on errors
446 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
447 - $ErrorActionPreference = "Stop"
449 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
451 - $env:MSYSTEM = "UCRT64"
452 - $env:CHERE_INVOKING = "1"
453 - $env:MSYS2_PATH_TYPE = "inherit"
454 # For some reason, options are separated by newline instead of space, so we
455 # have to replace them first.
456 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
457 # Replace forward slashes with backwards so bash doesn't complain
458 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
459 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
466 - '.build_ccache_vars'
470 MESON_ARGS: *simple_build
472 # Disable colored output to avoid weird rendering issues
473 GST_DEBUG_NO_COLOR: "true"
474 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
475 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
477 CARGO_HOME: "/cache/gstreamer/cargo"
478 # Enable the fault handler so we get backtraces on segfaults.
479 # any non-empty string will do
480 PYTHONFAULTHANDLER: "enabled"
487 - echo "-> Running ${TEST_SUITE}"
490 gst-validate-launcher ${TEST_SUITE}
497 --timeout-factor "${TIMEOUT_FACTOR}"
498 --fail-on-testlist-change
499 -l "${CI_PROJECT_DIR}/validate-logs/"
500 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
501 ${EXTRA_VALIDATE_ARGS}
503 - mv build/meson-logs/ meson-logs
512 - "validate-logs/*.xml"
517 - '.fdo.suffixed-image@fedora'
520 - "fedora amd64 docker"
524 extends: '.test fedora x86_64'
526 TEST_SUITE: "check.gst*"
528 integration testsuites fedora:
529 extends: '.test fedora x86_64'
532 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
533 TEST_SUITE: "validate ges"
536 gstreamer-full static build:
537 extends: '.build fedora x86_64'
541 --default-library=static
547 - meson test -C build -v test-gst-full
554 gstreamer-full-minimal static build:
555 extends: 'gstreamer-full static build'
559 --default-library=static
561 -Dgstreamer:gst_debug=false
562 -Dauto_features=disabled
563 -Dgstreamer:check=enabled
565 -Dgst-plugins-base:alsa=enabled
566 -Dgst-plugins-base:typefind=enabled
567 -Dgst-plugins-base:pbtypes=enabled
568 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
569 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
570 -Dgst-full-device-providers=alsa:alsadeviceprovider
571 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
576 - meson test -C build -v test-gst-full
577 - 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"
578 - strip build/libgstreamer-full-1.0.so
579 - ls -l build/libgstreamer-full-1.0.so
587 .valgrind fedora x86_64:
588 extends: '.test fedora x86_64'
591 EXTRA_VALIDATE_ARGS: "--valgrind"
594 extends: '.valgrind fedora x86_64'
596 TEST_SUITE: "check.gstreamer\\..*"
602 - subprojects/gst-devtools/**/*
603 - subprojects/gstreamer/**/*
606 extends: '.valgrind fedora x86_64'
608 TEST_SUITE: "check.gst-plugins-base\\..*"
614 - subprojects/gst-devtools/**/*
615 - subprojects/gstreamer/**/*
616 - subprojects/gst-plugins-base/**/*
619 extends: '.valgrind fedora x86_64'
621 TEST_SUITE: "check.gst-plugins-good\\..*"
622 # take longer time due to splitmux unit test
629 - subprojects/gst-devtools/**/*
630 - subprojects/gstreamer/**/*
631 - subprojects/gst-plugins-base/**/*
632 - subprojects/gst-plugins-good/**/*
635 extends: '.valgrind fedora x86_64'
637 TEST_SUITE: "check.gst-plugins-ugly\\..*"
643 - subprojects/gst-devtools/**/*
644 - subprojects/gstreamer/**/*
645 - subprojects/gst-plugins-base/**/*
646 - subprojects/gst-plugins-good/**/*
647 - subprojects/gst-plugins-ugly/**/*
650 extends: '.valgrind fedora x86_64'
652 TEST_SUITE: "check.gst-plugins-bad\\..*"
658 - subprojects/gst-devtools/**/*
659 - subprojects/gstreamer/**/*
660 - subprojects/gst-plugins-base/**/*
661 - subprojects/gst-plugins-good/**/*
662 - subprojects/gst-plugins-bad/**/*
665 extends: '.valgrind fedora x86_64'
667 TEST_SUITE: "check.gst-editing-services\\..*"
673 - subprojects/gst-devtools/**/*
674 - subprojects/gstreamer/**/*
675 - subprojects/gst-plugins-base/**/*
676 - subprojects/gst-plugins-good/**/*
677 - subprojects/gst-plugins-bad/**/*
678 - subprojects/gst-editing-services/**/*
679 - subprojects/gst-python/**/*
681 # ---- Integration ----- #
684 image: $FEDORA_DOCS_IMAGE
686 - '.build_ccache_vars'
688 MESON_ARGS: *simple_build
689 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
690 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
692 # FIXME: should rebuild the image with newer versions!
693 - pip3 install --upgrade hotdoc
694 - pip3 install --upgrade meson
696 - ./gst-env.py ninja -C build/ plugins_doc_caches
697 # Ignore modifications to wrap files made by meson
698 - git checkout subprojects/*.wrap
699 - ./ci/scripts/check-documentation-diff.py
700 - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
701 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
708 - plugins-cache-diffs/
711 # This jobs runs in gstreamer namespace when after the merge into main branch.
712 # The produced artifact is later used to automatically update the web page.
720 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
723 # This job is run in users namespace to validate documentation before merging
733 # Never run post merge, we have the `documentation` always running for that
734 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
740 - subprojects/gst-docs/**/*
741 - subprojects/gst-devtools/**/*
742 - subprojects/gst-editing-services/**/*
743 - subprojects/gst-libav/**/*
744 - subprojects/gst-omx/**/*
745 - subprojects/gst-plugins-bad/**/*
746 - subprojects/gst-plugins-base/**/*
747 - subprojects/gst-plugins-good/**/*
748 - subprojects/gst-plugins-ugly/**/*
749 - subprojects/gstreamer/**/*
750 - subprojects/gstreamer-vaapi/**/*
751 - subprojects/gst-rtsp-server/**/*
753 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
754 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
762 - '.fdo.suffixed-image@fedora'
764 - "fedora amd64 docker"
766 - ci/gitlab/trigger_cerbero_pipeline.py
769 # Never run post merge
770 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
775 - subprojects/gst-devtools/**/*
776 - subprojects/gst-editing-services/**/*
777 - subprojects/gst-libav/**/*
778 - subprojects/gst-plugins-bad/**/*
779 - subprojects/gst-plugins-base/**/*
780 - subprojects/gst-plugins-good/**/*
781 - subprojects/gst-plugins-ugly/**/*
782 - subprojects/gst-python/**/*
783 - subprojects/gstreamer/**/*
784 - subprojects/gst-rtsp-server/**/*
785 - subprojects/gst-examples/**/*