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: '2021-12-03.1'
29 INDENT_TAG: '2021-10-04.0'
30 WINDOWS_TAG: "2022-01-26.3"
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 # Alway run tests post merged
127 - 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'
158 gst-indent amd64 docker:
160 - '.gst-indent image'
161 - '.fdo.container-build@debian'
162 stage: 'build docker'
163 # Do not depend on the trigger, as we want to run indent always
166 windows amd64 docker:
167 stage: "build docker"
171 # Unlike the buildah/linux jobs, this file
172 # needs to be relative to docker/windows/ subdir
173 # as it makes life easier in the powershell script
175 # We also don't need a CONTEXT_DIR var as its also
176 # hardcoded to be docker/windows/
177 DOCKERFILE: "ci/docker/windows/Dockerfile"
183 # We need to pass an array and to resolve the env vars, so we can't use a variable:
184 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
186 - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
189 echo "Failed to build the image"
193 .windows rust docker build:
194 stage: 'build docker'
196 - job: 'windows amd64 docker'
199 - if: '$CI_PROJECT_NAME == "gst-ci"'
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: '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 - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
217 - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
218 - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
220 - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
223 echo "Failed to build the image"
227 windows rust amd64 docker latest stable:
228 extends: '.windows rust docker build'
230 RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
231 RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
232 RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
234 windows rust amd64 docker minimum supported version:
235 extends: '.windows rust docker build'
237 RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
238 RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
239 RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
243 # ---- Preparation ----- #
249 - '.gst-indent image'
250 - '.fdo.suffixed-image@debian'
253 - job: 'gst-indent amd64 docker'
256 # man indent. grep RETURN VALUE, grab a beer on my behalf...
257 - indent --version || true
258 - ./scripts/gst-indent-all
260 if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
261 echo "Code is properly formatted"
263 git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
264 echo 'style diverges, please run gst-indent first'
269 # build setup templates
271 .build_template: &build
272 - ci/scripts/handle-subprojects-cache.py subprojects/
273 # Update subprojects to respect `.wrap` content
274 - meson subprojects update --reset
276 - meson build/ $MESON_ARGS
278 - ccache --show-stats
282 CCACHE_COMPILERCHECK: 'content'
283 CCACHE_COMPRESS: 'true'
284 CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
285 CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
286 # shared across everything really
287 CCACHE_MAXSIZE: '10G'
288 CARGO_HOME: '/cache/gstreamer/cargo'
290 .base_modules_changes: &modules_changes
295 - subprojects/gst-devtools/**/*
296 - subprojects/gst-editing-services/**/*
297 - subprojects/gst-integration-testsuites/**/*
298 - subprojects/gst-libav/**/*
299 - subprojects/gst-omx/**/*
300 - subprojects/gst-plugins-bad/**/*
301 - subprojects/gst-plugins-base/**/*
302 - subprojects/gst-plugins-good/**/*
303 - subprojects/gst-plugins-ugly/**/*
304 - subprojects/gst-python/**/*
305 - subprojects/gstreamer/**/*
306 - subprojects/gstreamer-sharp/**/*
307 - subprojects/gstreamer-vaapi/**/*
308 - subprojects/gst-rtsp-server/**/*
310 .simple_fedora_build: &simple_build >-
311 ${DEFAULT_MESON_ARGS}
314 -Dgst-omx:target=generic
317 ${MESON_BUILDTYPE_ARGS}
323 - '.build_ccache_vars'
326 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
327 # Also need to take into account I/O of pulling docker images and uploading artifacts
330 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
334 - mv build/meson-logs/ meson-logs
341 # If this matches, it means the pipeline is running against either the main
342 # or a stable branch, so make it manual
343 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
348 .build fedora x86_64:
351 - '.fdo.suffixed-image@fedora'
354 - "fedora amd64 docker"
356 MESON_ARGS: *simple_build
358 build nodebug fedora x86_64:
361 - '.fdo.suffixed-image@fedora'
364 - "fedora amd64 docker"
366 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
368 build clang fedora x86_64:
369 extends: '.build fedora x86_64'
372 CXX: 'ccache clang++'
375 image: $WINDOWS_IMAGE
382 - "windows amd64 docker"
386 ${DEFAULT_MESON_ARGS}
390 -Dgst-plugins-base:pango=enabled
391 -Dgst-plugins-good:cairo=enabled
392 # Needs to not be empty otherwise the newline -> space replace command in
393 # `script:` will fail
394 MESON_CROSS_ARGS: ' '
396 # If this matches, it means the pipeline is running against either the main
397 # or a stable branch, so make it manual
398 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
403 - ci/scripts/handle-subprojects-cache.py subprojects/
404 # For some reason, options are separated by newline instead of space, so we
405 # have to replace them first.
406 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
407 - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
408 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
409 meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
411 # XXX: Re-enable when uploading stops timing out
413 # expire_in: "7 days"
416 # - 'build/meson-logs/'
420 extends: '.build windows'
425 extends: '.build windows'
429 build vs2019 arm64 uwp:
430 extends: '.build windows'
433 # pango pulls in cairo which pulls in pixman which doesn't build because of
434 # https://github.com/mesonbuild/meson/issues/9889
436 -Dgst-plugins-base:pango=disabled
437 -Dgst-plugins-good:cairo=disabled
438 -Dgst-devtools:cairo=disabled
439 --cross-file ci/meson/vs2019-arm64-cross-file.txt
440 --native-file ci/meson/vs2019-x64-native-file.txt
443 extends: '.build windows'
451 # Make sure powershell exits on errors
452 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
453 - $ErrorActionPreference = "Stop"
455 # Configure MSYS2 to use the UCRT64 environment, start in the same directory
457 - $env:MSYSTEM = "UCRT64"
458 - $env:CHERE_INVOKING = "1"
459 - $env:MSYS2_PATH_TYPE = "inherit"
460 # For some reason, options are separated by newline instead of space, so we
461 # have to replace them first.
462 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
463 # Replace forward slashes with backwards so bash doesn't complain
464 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
465 - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
472 - '.build_ccache_vars'
476 MESON_ARGS: *simple_build
478 # Disable colored output to avoid weird rendering issues
479 GST_DEBUG_NO_COLOR: "true"
480 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
481 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
483 CARGO_HOME: "/cache/gstreamer/cargo"
484 # Enable the fault handler so we get backtraces on segfaults.
485 # any non-empty string will do
486 PYTHONFAULTHANDLER: "enabled"
493 - echo "-> Running ${TEST_SUITE}"
496 gst-validate-launcher ${TEST_SUITE}
503 --timeout-factor "${TIMEOUT_FACTOR}"
504 --fail-on-testlist-change
505 -l "${CI_PROJECT_DIR}/validate-logs/"
506 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
507 ${EXTRA_VALIDATE_ARGS}
509 - mv build/meson-logs/ meson-logs
518 - "validate-logs/*.xml"
523 - '.fdo.suffixed-image@fedora'
526 - "fedora amd64 docker"
530 extends: '.test fedora x86_64'
532 TEST_SUITE: "check.gst*"
534 integration testsuites fedora:
535 extends: '.test fedora x86_64'
538 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
539 TEST_SUITE: "validate ges"
542 gstreamer-full static build:
543 extends: '.build fedora x86_64'
547 --default-library=static
553 - meson test -C build -v test-gst-full
560 gstreamer-full-minimal static build:
561 extends: 'gstreamer-full static build'
565 --default-library=static
567 -Dgstreamer:gst_debug=false
568 -Dauto_features=disabled
569 -Dgstreamer:check=enabled
571 -Dgst-plugins-base:alsa=enabled
572 -Dgst-plugins-base:typefind=enabled
573 -Dgst-plugins-base:pbtypes=enabled
574 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
575 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
576 -Dgst-full-device-providers=alsa:alsadeviceprovider
577 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
582 - meson test -C build -v test-gst-full
583 - 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"
584 - strip build/libgstreamer-full-1.0.so
585 - ls -l build/libgstreamer-full-1.0.so
593 .valgrind fedora x86_64:
594 extends: '.test fedora x86_64'
597 EXTRA_VALIDATE_ARGS: "--valgrind"
600 extends: '.valgrind fedora x86_64'
602 TEST_SUITE: "check.gstreamer\\..*"
608 - subprojects/gst-devtools/**/*
609 - subprojects/gstreamer/**/*
612 extends: '.valgrind fedora x86_64'
614 TEST_SUITE: "check.gst-plugins-base\\..*"
620 - subprojects/gst-devtools/**/*
621 - subprojects/gstreamer/**/*
622 - subprojects/gst-plugins-base/**/*
625 extends: '.valgrind fedora x86_64'
627 TEST_SUITE: "check.gst-plugins-good\\..*"
628 # take longer time due to splitmux unit test
635 - subprojects/gst-devtools/**/*
636 - subprojects/gstreamer/**/*
637 - subprojects/gst-plugins-base/**/*
638 - subprojects/gst-plugins-good/**/*
641 extends: '.valgrind fedora x86_64'
643 TEST_SUITE: "check.gst-plugins-ugly\\..*"
649 - subprojects/gst-devtools/**/*
650 - subprojects/gstreamer/**/*
651 - subprojects/gst-plugins-base/**/*
652 - subprojects/gst-plugins-good/**/*
653 - subprojects/gst-plugins-ugly/**/*
656 extends: '.valgrind fedora x86_64'
658 TEST_SUITE: "check.gst-plugins-bad\\..*"
664 - subprojects/gst-devtools/**/*
665 - subprojects/gstreamer/**/*
666 - subprojects/gst-plugins-base/**/*
667 - subprojects/gst-plugins-good/**/*
668 - subprojects/gst-plugins-bad/**/*
671 extends: '.valgrind fedora x86_64'
673 TEST_SUITE: "check.gst-editing-services\\..*"
679 - subprojects/gst-devtools/**/*
680 - subprojects/gstreamer/**/*
681 - subprojects/gst-plugins-base/**/*
682 - subprojects/gst-plugins-good/**/*
683 - subprojects/gst-plugins-bad/**/*
684 - subprojects/gst-editing-services/**/*
686 # ---- Integration ----- #
689 image: $FEDORA_DOCS_IMAGE
691 - '.build_ccache_vars'
693 MESON_ARGS: *simple_build
694 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
695 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
697 # FIXME: should rebuild the image with newer versions!
698 - pip3 install --upgrade hotdoc
699 - pip3 install --upgrade meson
701 - ./gst-env.py ninja -C build/ plugins_doc_caches
702 # Ignore modifications to wrap files made by meson
703 - git checkout subprojects/*.wrap
704 - ./ci/scripts/check-documentation-diff.py
705 - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
706 - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
713 - plugins-cache-diffs/
716 # This jobs runs in gstreamer namespace when after the merge into main branch.
717 # The produced artifact is later used to automatically update the web page.
725 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
728 # This job is run in users namespace to validate documentation before merging
738 # Never run post merge, we have the `documentation` always running for that
739 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
745 - subprojects/gst-docs/**/*
746 - subprojects/gst-devtools/**/*
747 - subprojects/gst-editing-services/**/*
748 - subprojects/gst-libav/**/*
749 - subprojects/gst-omx/**/*
750 - subprojects/gst-plugins-bad/**/*
751 - subprojects/gst-plugins-base/**/*
752 - subprojects/gst-plugins-good/**/*
753 - subprojects/gst-plugins-ugly/**/*
754 - subprojects/gstreamer/**/*
755 - subprojects/gstreamer-vaapi/**/*
756 - subprojects/gst-rtsp-server/**/*
758 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
759 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
765 - '.fdo.suffixed-image@fedora'
767 - "fedora amd64 docker"
769 - ci/gitlab/trigger_cerbero_pipeline.py
772 # Never run post merge
773 - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
778 - subprojects/gst-devtools/**/*
779 - subprojects/gst-editing-services/**/*
780 - subprojects/gst-libav/**/*
781 - subprojects/gst-plugins-bad/**/*
782 - subprojects/gst-plugins-base/**/*
783 - subprojects/gst-plugins-good/**/*
784 - subprojects/gst-plugins-ugly/**/*
785 - subprojects/gst-python/**/*
786 - subprojects/gstreamer/**/*
787 - subprojects/gst-rtsp-server/**/*
788 - subprojects/gst-examples/**/*