2 - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/7ea696055e322cc7aa4bcbe5422b56a198c4bdff/templates/ci-fairy.yml"
6 - 'build docker stage 2'
11 # Use the resulting binaries
15 # Branch to track for modules that have no ref specified in the manifest
16 GST_UPSTREAM_BRANCH: 'master'
17 ORC_UPSTREAM_BRANCH: 'master'
21 # These are the version tags for the docker images the CI runs against.
22 # If you are hacking on them or need a them to rebuild, its enough
23 # to change any part of the string of the image you want.
25 FEDORA_TAG: '2021-06-30.0'
26 CERBERO_TAG: '2020-10-22.0'
27 ANDROID_TAG: '2020-10-22.0'
28 MANIFEST_TAG: '2020-10-22.0'
29 TEST_MANIFEST_TAG: '2020-10-22.0'
30 INDENT_TAG: '2020-10-22.0'
31 WINDOWS_TAG: "2021-07-12.0"
33 GST_UPSTREAM_REPO: 'gstreamer/gst-ci'
35 FEDORA_AMD64_SUFFIX: 'amd64/fedora'
36 CERBERO_AMD64_SUFFIX: 'amd64/cerbero-fedora'
37 ANDROID_AMD64_SUFFIX: 'amd64/android-fedora'
38 MANIFEST_AMD64_SUFFIX: 'amd64/build-manifest'
39 TEST_MANIFEST_AMD64_SUFFIX: 'amd64/test-manifest'
40 INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
41 WINDOWS_AMD64_SUFFIX: 'amd64/windows'
42 WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
44 FEDORA_IMAGE: "$CI_REGISTRY_IMAGE/$FEDORA_AMD64_SUFFIX:$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
45 FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
46 CERBERO_IMAGE: "$CI_REGISTRY_IMAGE/$CERBERO_AMD64_SUFFIX:$CERBERO_TAG-$GST_UPSTREAM_BRANCH"
47 ANDROID_IMAGE: "$CI_REGISTRY_IMAGE/$ANDROID_AMD64_SUFFIX:$ANDROID_TAG-$GST_UPSTREAM_BRANCH"
48 MANIFEST_IMAGE: "$CI_REGISTRY_IMAGE/$MANIFEST_AMD64_SUFFIX:$MANIFEST_TAG-$GST_UPSTREAM_BRANCH"
49 TEST_MANIFEST_IMAGE: "$CI_REGISTRY_IMAGE/$TEST_MANIFEST_AMD64_SUFFIX:$TEST_MANIFEST_TAG-$GST_UPSTREAM_BRANCH"
50 INDENT_IMAGE: "$CI_REGISTRY_IMAGE/$INDENT_AMD64_SUFFIX:$INDENT_TAG-$GST_UPSTREAM_BRANCH"
51 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
52 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
53 WINDOWS_RUST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
54 WINDOWS_RUST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
56 # Current windows image doesn't seem to be able to spawn procceses for reason,
57 # use a different image until this is debuged
58 # Running command 'c:/builds/alatiera/gst-ci/cerbero-build/build-tools/bin/meson --prefix=c:/builds/alatiera/gst-ci/cerbero-build/dist/msvc_x86_64 --libdir=lib -Ddebug=true --default-library=both -Doptimization=2 --backend=ninja --wrap-mode=nodownload -Db_vscrt=md --native-file c:/builds/alatiera/gst-ci/cerbero-build/sources/msvc_x86_64/gstreamer-1.0-1.19.0.1/_builddir/meson-native-file.txt -Dlibunwind=disabled -Ddbghelp=enabled -Dintrospection=disabled -Dexamples=disabled'
59 # failed to create process
60 CERBERO_WINDOWS_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v13-master'
62 # Can't use $CI_* variables since we use this template in all repos, not just gst-ci
63 CERBERO_SCRIPT_URL: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/cerbero_setup.sh"
64 # FIXME: fix the file path url to point to the upstram once merged
65 # WINDOWS_CONTAINER_SCRIPT_URL: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/docker/windows/container.ps1"
66 WINDOWS_CONTAINER_SCRIPT_URL: "https://gitlab.freedesktop.org/alatiera/gst-ci/raw/alatiera/windows-rs-wip/docker/windows/container.ps1"
69 MESON_BUILDTYPE_ARGS: --default-library=both
71 -Dlibnice:tests=disabled
72 -Dlibnice:examples=disabled
73 -Dopenh264:tests=disabled
74 -Dpygobject:tests=false
86 -Dgstreamer:werror=true
87 -Dgst-plugins-base:werror=true
88 -Dgst-plugins-good:werror=true
89 -Dgst-plugins-ugly:werror=true
90 -Dgst-plugins-bad:werror=true
91 -Dgst-rtsp-server:werror=true
92 -Dgst-libav:werror=true
93 -Dgst-examples:werror=true
94 -Dgst-editing-services:werror=true
95 -Dgst-docs:werror=true
97 -Dgst-devtools:werror=true
98 -Dgst-python:werror=true
99 -Dgstreamer-vaapi:werror=true
100 -Dgstreamer-sharp:werror=true
102 DEFAULT_CERBERO_ARGS: >
108 - if: $CI_MERGE_REQUEST_IID
109 # don't create a pipeline if its a commit pipeline, on a branch and that branch has
110 # open merge requests (bc we will get a MR build instead)
111 - if: $CI_OPEN_MERGE_REQUESTS
114 - if: $CI_COMMIT_BRANCH
119 # This can be used to configure global behaviour our our jobs.
125 - 'runner_system_failure'
126 - 'stuck_or_timeout_failure'
127 - 'scheduler_failure'
132 # Script to check if a docker image exists in the upstream registry
133 # and if so copy it to the forked registry so we can use it
135 # This is copied/adapted from citemplates/templates/fedora.yml
136 # https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/96b621fe9f57ec2464f8d1a0940446afbf6c8f59/templates/fedora.yml
137 .check_image: &check_image_exists |
138 # if-not-exists steps
141 if [[ -z "$GST_FORCE_REBUILD" ]]
143 # disable exit on failure
146 # check if our image is already in the current registry
147 # we store the sha of the digest and the layers
148 skopeo inspect docker://$LOCAL_IMAGE | jq '[.Digest, .Layers]' > local_sha
150 # check if our image is already in our gst-ci registry fork
151 skopeo inspect docker://$LOCAL_GST_CI_IMAGE | jq '[.Digest, .Layers]' > local_gst_ci_sha
153 # check if our image is already in the upstream registry
154 if [[ -z "$GST_UPSTREAM_REPO" ]]
156 echo "WARNING! Variable \$GST_UPSTREAM_REPO is undefined, cannot check for images"
158 skopeo inspect docker://$GST_UPSTREAM_IMAGE | jq '[.Digest, .Layers]' > upstream_sha
161 # reenable exit on failure
164 # if the upstream repo has an image, ensure we use the same
165 if [ -s upstream_sha ]
168 echo "Checking if $LOCAL_IMAGE is up to date"
169 # ensure we use the same image from upstream
170 diff upstream_sha local_sha && exit 0 || true
172 echo "Copying image from gstreamer/gst-ci to local registry"
173 # copy the original image into the current project registry namespace
174 # we do 2 attempts with skopeo copy at most
175 skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
176 docker://$GST_UPSTREAM_IMAGE \
177 docker://$LOCAL_IMAGE || \
178 skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
179 docker://$GST_UPSTREAM_IMAGE \
180 docker://$LOCAL_IMAGE
187 # if the local ci fork repo has an image, ensure we use the same
188 if [ -s local_gst_ci_sha ]
190 echo "Checking if $LOCAL_GST_CI_IMAGE is up to date"
191 # ensure we use the same image from upstream
192 diff local_gst_ci_sha local_sha && exit 0 || true
194 echo "Copying image from $CI_PROJECT_NAMESPACE/gst-ci to local registry"
195 # copy the original image into the current project registry namespace
196 # we do 2 attempts with skopeo copy at most
197 skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
198 docker://$LOCAL_GST_CI_IMAGE \
199 docker://$LOCAL_IMAGE || \
200 skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
201 docker://$LOCAL_GST_CI_IMAGE \
202 docker://$LOCAL_IMAGE
207 # if we have a local image but none in the upstream repo, use our
210 echo "Using $LOCAL_IMAGE"
216 # Build docker images from Dockerfiles
218 # This is copied/adapted from citemplates/templates/fedora.yml
219 # https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/96b621fe9f57ec2464f8d1a0940446afbf6c8f59/templates/fedora.yml
221 # CITemplates builds uses buildah run/commit workflow to build the images which doesn't
222 # fit us atm and our images need further adjustment to make use of it. Porting to
223 # ci-templates is the next step though.
225 # All the documentation from citemplates should be applicable here, so please refer there
227 image: "$CI_REGISTRY/freedesktop/ci-templates/buildah:2020-07-20.1"
229 STORAGE_DRIVER: 'vfs'
230 BUILDAH_FORMAT: 'docker'
231 BUILDAH_ISOLATION: 'chroot'
235 - export LOCAL_IMAGE="$CI_REGISTRY_IMAGE/$REPO_SUFFIX:$TAG"
236 - export LOCAL_GST_CI_IMAGE="$CI_REGISTRY/$CI_PROJECT_NAMESPACE/gst-ci/$REPO_SUFFIX:$TAG"
237 - export GST_UPSTREAM_IMAGE="$CI_REGISTRY/$GST_UPSTREAM_REPO/$REPO_SUFFIX:$TAG"
239 # check if the docker registry is enabled, else the variable will be missing
241 if [[ -z "$CI_REGISTRY_IMAGE" ]]
243 echo "ERROR! Looks like your repository/fork has disabled Docker Registries."
244 echo "Pleae enable them by following the documentation from here:"
245 echo "https://docs.gitlab.com/ee/user/packages/container_registry/#enable-the-container-registry-for-your-project"
249 # Newer versions of podman/buildah try to set overlayfs mount options when
250 # using the vfs driver, and this causes errors.
251 - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf
253 - *check_image_exists
255 # This part of the job should only ever be possible to be reach in a gst-ci fork
257 if [[ "$CI_PROJECT_NAME" != 'gst-ci' ]]
259 echo "ERROR! Something is wrong!"
260 echo "This part of the job is supposed to be executed only in gst-ci forks, and its probably going to fail else"
264 - echo "Building image $LOCAL_IMAGE"
268 --build-arg DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH
269 --label ci.job_id=$CI_JOB_ID
270 --label pipeline.url=$CI_PIPELINE_URL
271 --label git.ref_name=$CI_COMMIT_REF_NAME
272 --label git.sha=$CI_COMMIT_SHA
273 --label gitlab.project_path=$CI_PROJECT_PATH
274 --label gitlab.project_url=$CI_PROJECT_URL
275 --label fdo.upstream-repo=$GST_UPSTREAM_REPO
280 - buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
284 if [ "$CI_PROJECT_PATH" = "gstreamer/gst-ci" ]; then
285 if [ "$LOCAL_IMAGE" != "$GST_UPSTREAM_IMAGE" ]; then
286 echo "ERROR!!! AAAAA! THE IMAGE URI DOES NOT MATCH THE EXPECTED UPSTREAM ONE"
288 echo $GST_UPSTREAM_IMAGE
293 - buildah push $LOCAL_IMAGE
296 stage: "build docker"
298 REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
299 TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
301 CONTEXT_DIR: "./docker/fedora/"
302 DOCKERFILE: "docker/fedora/Dockerfile"
305 cerbero fedora amd64 docker:
306 stage: "build docker"
308 REPO_SUFFIX: "$CERBERO_AMD64_SUFFIX"
309 TAG: "$CERBERO_TAG-$GST_UPSTREAM_BRANCH"
311 CONTEXT_DIR: "docker/cerbero/"
312 DOCKERFILE: "docker/cerbero/Dockerfile-fedora"
316 stage: "build docker"
318 REPO_SUFFIX: "$ANDROID_AMD64_SUFFIX"
319 TAG: "$ANDROID_TAG-$GST_UPSTREAM_BRANCH"
321 CONTEXT_DIR: "docker/android/"
322 DOCKERFILE: "docker/android/Dockerfile"
325 alpine amd64 manifest builder docker:
326 stage: "build docker"
328 REPO_SUFFIX: "$MANIFEST_AMD64_SUFFIX"
329 TAG: '$MANIFEST_TAG-$GST_UPSTREAM_BRANCH'
331 CONTEXT_DIR: "docker/build_manifest/"
332 DOCKERFILE: "docker/build_manifest/Dockerfile"
335 gst-indent amd64 docker:
336 stage: "build docker"
338 REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
339 TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
341 CONTEXT_DIR: "docker/indent/"
342 DOCKERFILE: "docker/indent/Dockerfile"
345 windows amd64 docker:
346 stage: "build docker"
349 REPO_SUFFIX: "$WINDOWS_AMD64_SUFFIX"
350 TAG: "$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
352 # Unlike the buildah/linux jobs, this file
353 # needs to be relative to docker/windows/ subdir
354 # as it makes life easier in the powershell script
356 # We also don't need a CONTEXT_DIR var as its also
357 # hardcoded to be docker/windows/
358 DOCKERFILE: "docker/windows/Dockerfile"
364 # We need to pass an array and to resolve the env vars, so we can't use a variable:
365 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
367 - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
368 - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
369 - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
371 - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
374 echo "Failed to build the image"
378 windows rust amd64 docker:
379 stage: 'build docker stage 2'
381 - job: 'windows amd64 docker'
384 GIT_STRATEGY: 'fetch'
385 REPO_SUFFIX: "$WINDOWS_RUST_AMD64_SUFFIX"
386 TAG: "$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
388 # Unlike the buildah/linux jobs, this file
389 # needs to be relative to docker/windows/ subdir
390 # as it makes life easier in the powershell script
392 # We also don't need a CONTEXT_DIR var as its also
393 # hardcoded to be docker/windows/
394 DOCKERFILE: 'docker/windows/rust.Dockerfile'
400 # We need to pass an array and to resolve the env vars, so we can't use a variable:
401 - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE")
403 - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
404 - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
405 - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
407 - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_RUST_IMAGE $WINDOWS_RUST_UPSTREAM_IMAGE $DOCKERFILE"
410 echo "Failed to build the image"
416 # Job to create the manifest.xml to used for our builds
419 image: $MANIFEST_IMAGE
421 # Always have automatic pipeline for branchs in cerbero and docs
422 # cause they need to update artifacts, like the docs site or cerbero deps
423 - if: '$CI_PROJECT_PATH == "gstreamer/cerbero"'
424 - if: '$CI_PROJECT_PATH == "gstreamer/gst-docs"'
426 # If the MR is assigned to the Merge bot, trigger the pipeline automatically
427 - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
428 # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
429 # to avoid wasting CI resources
430 - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
433 # If this matches, it means the pipeline is running against either the main
434 # or a stable branch, so make it manual
435 - if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
442 - gitlab/build_manifest.py --self-update
443 - gitlab/build_manifest.py ${CI_PROJECT_DIR}/manifest.xml
444 - cat ${CI_PROJECT_DIR}/manifest.xml
457 GIT_STRATEGY: 'fetch'
459 - if: '$CI_PROJECT_NAME !~ /^(gstreamer-sharp|gst-integration-testsuites|cerbero|gst-docs)$/'
461 # man indent. grep RETURN VALUE, grab a beer on my behalf...
462 - indent --version || true
465 if test -f ".indentignore"; then
467 while read -r line; do
468 if test -n "$line"; then
469 filter_args+=("-e" "$line")
471 done < ".indentignore"
472 if [[ ${#filter_args[@]} -gt 0 ]]; then
473 filter_cmd=("grep" "-v" "${filter_args[@]}")
476 find . -name '*.c' | "${filter_cmd[@]}" | xargs -d '\n' gst-indent
478 if git diff --quiet; then
479 echo "Code is properly formatted"
481 git diff --color=always
482 echo 'style diverges, please run gst-indent first'
487 # Check "allow-edit" checkbox on merge requests with ci-fairy
490 extends: '.fdo.ci-fairy'
496 - ci-fairy check-merge-request --require-allow-collaboration
498 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
501 # gst-build setup templates
503 .gst_build_template: &gst_build
505 # Sometimes, gitlab-runner want to reuse
506 # existing docker volumes without cleaning them up...
507 # Make sure the docker volume is clean
508 - rm -rf gst-build || true
509 - rm -rf meson-logs || true
510 - rm -rf validate-logs || true
512 - curl -L -o clone_manifest_ref.py "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py"
513 - python3 clone_manifest_ref.py --manifest manifest.xml --project gst-build --destination gst-build
515 # only copy immediate directories. We don't want to modify .wrap files
516 - find /gst-build/subprojects/ -mindepth 1 -maxdepth 1 -type d -exec cp -r \{\} subprojects/ \;
518 # Reset the state of the subprojects to what gst-build expects
519 - meson subprojects update --reset
520 - ./git-update --no-interaction --manifest="${CI_PROJECT_DIR}/manifest.xml"
522 - meson build/ $MESON_ARGS
524 - ccache --show-stats
526 .gst_build_ccache_vars:
528 CCACHE_COMPILERCHECK: 'content'
529 CCACHE_COMPRESS: 'true'
530 CCACHE_BASEDIR: '/cache/gstreamer/gst-build'
531 CCACHE_DIR: '/cache/gstreamer/gst-build/ccache/'
532 # shared across everything really
533 CCACHE_MAXSIZE: '10G'
534 CARGO_HOME: '/cache/gstreamer/cargo'
536 .simple_fedora_build: &simple_build >-
537 ${DEFAULT_MESON_ARGS}
540 -Dgst-omx:target=generic
543 ${MESON_BUILDTYPE_ARGS}
549 - '.gst_build_ccache_vars'
552 # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
553 # Also need to take into account I/O of pulling docker images and uploading artifacts
556 MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
558 - if: '$CI_PROJECT_NAME != "cerbero"'
562 - mv gst-build/build/meson-logs/ meson-logs
563 # Cleanup everything else to reduce the size
564 # of the docker volume we leave behind
573 .build fedora x86_64:
577 MESON_ARGS: *simple_build
579 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-omx|gst-plugins-rs)$/'
581 build nodebug fedora x86_64:
585 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
587 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
589 build static fedora x86_64:
590 extends: '.build fedora x86_64'
592 MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
594 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
596 build static nodebug fedora x86_64:
597 extends: 'build nodebug fedora x86_64'
599 MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
601 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
603 build clang fedora x86_64:
604 extends: '.build fedora x86_64'
607 CXX: 'ccache clang++'
609 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
614 - '.gst_build_ccache_vars'
618 MESON_ARGS: *simple_build
620 # Disable colored output to avoid weird rendering issues
621 GST_DEBUG_NO_COLOR: "true"
622 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
623 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
625 CARGO_HOME: "/cache/gstreamer/cargo"
626 # Enable the fault handler so we get backtraces on segfaults.
627 # any non-empty string will do
628 PYTHONFAULTHANDLER: "enabled"
630 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-examples|gst-docs)$/'
634 - echo "-> Running ${TEST_SUITE}"
637 gst-validate-launcher ${TEST_SUITE}
643 --timeout-factor "${TIMEOUT_FACTOR}"
644 --fail-on-testlist-change
645 -l "${CI_PROJECT_DIR}/validate-logs/"
646 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
647 ${EXTRA_VALIDATE_ARGS}
649 - mv gst-build/build/meson-logs/ meson-logs
650 # Cleanup everything else to reduce the size
651 # of the docker volume we leave behind
662 - "validate-logs/*.xml"
670 extends: '.test fedora x86_64'
672 TEST_SUITE: "check.gst*"
674 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
676 integration testsuites fedora:
677 extends: '.test fedora x86_64'
680 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --check-bugs --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX}"
681 TEST_SUITE: "validate ges"
683 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-examples|gst-omx|gstreamer-sharp|gst-plugins-rs)$/'
686 # introspection has been disabled as the static build does not support it.
687 # See https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/162
689 extends: 'build static fedora x86_64'
693 --default-library=static
694 -Dintrospection=disabled
697 - if: '$CI_PROJECT_NAME =~ /^(gst-build|gst-ci)$/'
701 - meson test -C build -v test-gst-full
708 gstreamer-full-minimal:
709 extends: 'build static fedora x86_64'
713 --default-library=static
714 -Dauto_features=disabled
715 -Dgstreamer:check=enabled
717 -Dgst-plugins-base:alsa=enabled
718 -Dgst-plugins-base:typefind=enabled
719 -Dgst-plugins-base:pbtypes=enabled
720 -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
721 -Dgst-full-typefind-functions=typefindfunctions:wav,flv
722 -Dgst-full-device-providers=alsa:alsadeviceprovider
723 -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
726 - if: '$CI_PROJECT_NAME =~ /^(gst-build|gst-ci)$/'
730 - meson test -C build -v test-gst-full
731 - 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"
732 - strip build/libgstreamer-full-1.0.so
733 - ls -l build/libgstreamer-full-1.0.so
741 .valgrind fedora x86_64:
742 extends: '.test fedora x86_64'
745 EXTRA_VALIDATE_ARGS: "--valgrind"
748 extends: '.valgrind fedora x86_64'
750 TEST_SUITE: "check.gstreamer\\..*"
752 - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-ci|gst-devtools)$/'
755 extends: '.valgrind fedora x86_64'
757 TEST_SUITE: "check.gst-plugins-base\\..*"
759 - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-ci|gst-devtools)$/'
762 extends: '.valgrind fedora x86_64'
764 TEST_SUITE: "check.gst-plugins-good\\..*"
765 # take longer time due to splitmux unit test
768 - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-ci|gst-devtools)$/'
771 extends: '.valgrind fedora x86_64'
773 TEST_SUITE: "check.gst-plugins-ugly\\..*"
775 - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-ugly|gst-ci|gst-devtools)$/'
778 extends: '.valgrind fedora x86_64'
780 TEST_SUITE: "check.gst-plugins-bad\\..*"
782 - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-plugins-bad|gst-ci|gst-devtools)$/'
785 extends: '.valgrind fedora x86_64'
787 TEST_SUITE: "check.gst-editing-services\\..*"
789 - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-editing-services|gst-ci|gst-devtools)$/'
791 # Template for Cerbero GStreamer Build
794 # CONFIG: The name of the configuration file to use
795 # ARCH: The cerbero <os>_<cpu> (used in cache key)
799 image: $CERBERO_IMAGE
801 - if: '$CI_PROJECT_NAME == "cerbero"'
804 # Ensure that the runners it will be executed on
805 # will have plenty of space for the cache
809 CCACHE_COMPILERCHECK: "content"
810 CCACHE_COMPRESS: "true"
811 CCACHE_BASEDIR: "/cache/gstreamer/cerbero/"
812 CCACHE_DIR: "/cache/gstreamer/cerbero/ccache/"
813 # shared across everything really
814 CCACHE_MAXSIZE: "50G"
816 CERBERO_HOME: "cerbero-build"
817 CERBERO_SOURCES: "cerbero-sources"
818 CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS}"
819 CERBERO: "./cerbero-uninstalled -c config/${CONFIG} -c localconf.cbc -m manifest.xml"
820 CERBERO_PACKAGE_ARGS: "-t"
821 CERBERO_RUN_WRAPPER: "" # 'wine' on cross-winXX
822 CERBERO_RUN_SUFFIX: "" # '.exe' on cross-winXX
824 # used by macos packages as we only ever install to a fixed directory
825 CERBERO_OVERRIDDEN_DIST_DIR: ""
826 # location where the cerbero git repo is stored on the image
827 CERBERO_HOST_DIR: "/cerbero/"
829 - echo "Fetching ${CERBERO_SCRIPT_URL}"
830 - curl -L -o cerbero_setup.sh "${CERBERO_SCRIPT_URL}"
831 - chmod +x cerbero_setup.sh
832 - ./cerbero_setup.sh cerbero_before_script
834 - ./cerbero_setup.sh cerbero_script
836 key: "${CI_JOB_NAME}"
838 - "${CERBERO_SOURCES}"
840 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
845 - "${CERBERO_HOME}/logs"
849 image: $WINDOWS_IMAGE
860 ${DEFAULT_MESON_ARGS}
864 -Dgst-plugins-base:pango=enabled
865 -Dgst-plugins-good:cairo=enabled
867 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
869 # Sometimes there's seems to be an existing gst-build clone that comes either from the ether or
870 # from a previous job due to some gitlab bug or implicit behavior?
871 # So let's always check and clear it out if its there
872 # https://gitlab.freedesktop.org/tpm/gstreamer-sharp/-/jobs/1672137
873 - if (Test-Path $env:CI_PROJECT_DIR/gst-build) { Remove-Item -Recurse -Force $env:CI_PROJECT_DIR/gst-build }
875 # Make sure powershell exists on errors
876 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
877 - $ErrorActionPreference = "Stop"
879 - Invoke-WebRequest -Uri "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/$env:GST_UPSTREAM_BRANCH/gitlab/clone_manifest_ref.py" -OutFile $env:CI_PROJECT_DIR/clone_manifest_ref.py
880 - python clone_manifest_ref.py --manifest manifest.xml --project gst-build --destination $env:CI_PROJECT_DIR/gst-build
881 - cd $env:CI_PROJECT_DIR/gst-build
884 # FIXME: remove this once the windows image is rebuilt/updated
885 - pip install -U meson==0.56.2
887 - cp -r C:/subprojects/* subprojects/
888 - cd $env:CI_PROJECT_DIR/gst-build
889 # Reset the subprojects to invalidate the cache if needed
890 - meson subprojects update --reset
891 # Run the git-update script and feed it the manifest to setup the environment
892 - python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
894 # For some reason, options are separated by newline instead of space, so we
895 # have to replace them first.
896 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
897 # Gitlab executes PowerShell in docker, but VsDevCmd.bat is a batch script.
898 # Environment variables substitutions is done by PowerShell before calling
899 # cmd.exe, that's why we use $env:FOO instead of %FOO%
900 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
901 meson build $env:MESON_ARGS &&
907 - 'gst-build/build/meson-logs/'
910 extends: '.build windows'
915 extends: '.build windows'
920 extends: '.build windows'
923 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
927 # Sometimes there's seems to be an existing gst-build clone that comes either from the ether or
928 # from a previous job due to some gitlab bug or implicit behavior?
929 # So let's always check and clear it out if its there
930 # https://gitlab.freedesktop.org/tpm/gstreamer-sharp/-/jobs/1672137
931 - if (Test-Path $env:CI_PROJECT_DIR/gst-build) { Remove-Item -Recurse -Force $env:CI_PROJECT_DIR/gst-build }
933 # Make sure powershell exists on errors
934 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
935 - $ErrorActionPreference = "Stop"
937 # For some reason docker build hangs if this is included in the image, needs more troubleshooting
938 - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
939 # Copied from https://github.com/msys2/setup-msys2/blob/master/main.js#L98
940 - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
941 - C:\msys64\usr\bin\bash -c "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
942 - echo "Updating MSYS2"
943 - C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm || echo Update failed, ignoring"
944 - echo "Killing all MSYS2 processes"
945 - taskkill /F /FI "MODULES eq msys-2.0.dll"
946 - echo "Completing MSYS2 update"
947 - C:\msys64\usr\bin\bash -c "pacman -Suu --noconfirm"
948 - echo "Installing needed MSYS2 packages"
949 - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
951 - Invoke-WebRequest -Uri "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/$env:GST_UPSTREAM_BRANCH/gitlab/clone_manifest_ref.py" -OutFile $env:CI_PROJECT_DIR/clone_manifest_ref.py
952 - python clone_manifest_ref.py --manifest manifest.xml --project gst-build --destination $env:CI_PROJECT_DIR/gst-build
953 - cd $env:CI_PROJECT_DIR/gst-build
955 - cp -r C:\subprojects\* subprojects\
957 # Run the git-update script and feed it the manifest to setup the environment
958 - cd $env:CI_PROJECT_DIR/gst-build; python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
959 # For some reason, options are separated by newline instead of space, so we
960 # have to replace them first.
961 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
962 # Replace forward slashes with backwards so bash doesn't complain
963 - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
964 - C:\msys64\usr\bin\bash -c "cd $env:_PROJECT_DIR/gst-build &&
965 meson build $env:MESON_ARGS &&
969 # Template for Cerbero GStreamer Deps
971 # This template is used by cerbero/ project to pre-built the GStreamer
972 # dependencies. When available, the .cerbero jobs will download this artifact
973 # in order to speed up the build.
976 # CONFIG: The name of the configuration file to use
977 # ARCH: The cerbero <os>_<cpu> (used in cache key)
979 # Produce an artifact with the dist/ and .cache along
980 # with the associated build-tools.
984 - if: '$CI_PROJECT_NAME == "cerbero"'
986 - ./cerbero_setup.sh cerbero_deps_script
989 # Cerbero Linux X86_64 build
991 cerbero deps fedora x86_64:
992 extends: '.cerbero deps'
994 CONFIG: "linux.config"
997 build cerbero fedora x86_64:
1000 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
1002 CONFIG: "linux.config"
1005 # Cerbero Android Universal build
1007 .cerbero cross-android universal:
1009 CONFIG: "cross-android-universal.cbc"
1010 ARCH: "android_universal"
1012 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
1017 - "${CERBERO_HOME}/logs"
1020 cerbero deps cross-android universal:
1023 - '.cerbero cross-android universal'
1025 build cerbero cross-android universal:
1028 - '.cerbero cross-android universal'
1030 - if: '$CI_MERGE_REQUEST_IID && $CI_PROJECT_NAME == "gst-docs"'
1031 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
1034 # Cerbero Cross Windows builds
1036 cerbero deps cross-windows x86:
1037 extends: '.cerbero deps'
1039 CONFIG: "cross-win32.cbc"
1042 build cerbero cross win32:
1045 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
1047 CONFIG: "cross-win32.cbc"
1048 CERBERO_RUN_WRAPPER: "wine"
1049 CERBERO_RUN_SUFFIX: ".exe"
1052 cerbero deps cross-windows x86_64:
1053 extends: '.cerbero deps'
1055 CONFIG: "cross-win64.cbc"
1056 ARCH: "mingw_x86_64"
1058 build cerbero cross win64:
1061 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
1063 CONFIG: "cross-win64.cbc"
1064 CERBERO_RUN_WRAPPER: "wine"
1065 CERBERO_RUN_SUFFIX: ".exe"
1068 # Build an Android App using the android binaries
1070 .cross-android universal examples:
1071 image: $ANDROID_IMAGE
1074 EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
1075 GSTREAMER_ROOT_ANDROID: ${CI_PROJECT_DIR}/examples/cerbero-android-universal
1077 - mkdir -p ${EXAMPLES_HOME}/outputs
1078 - curl -L -o clone_manifest_ref.py https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py
1079 - chmod +x clone_manifest_ref.py
1080 - ./clone_manifest_ref.py --manifest manifest.xml --project gst-examples --destination ${EXAMPLES_HOME}/gst-examples
1081 - ./clone_manifest_ref.py --manifest manifest.xml --project gst-docs --destination ${EXAMPLES_HOME}/gst-docs
1082 - rm clone_manifest_ref.py
1084 # extract our binaries
1085 - rm -f gstreamer-1.0-android-universal-*-runtime.tar.*
1086 - mkdir ${GSTREAMER_ROOT_ANDROID}
1087 - time tar -C ${GSTREAMER_ROOT_ANDROID} -xf gstreamer-1.0-android-universal-*.tar.*
1089 # gst-examples - player
1090 - chmod +x ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew
1091 - ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/playback/player/android assembleDebug
1092 - cp ${EXAMPLES_HOME}/gst-examples/playback/player/android/app/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
1094 # gst-examples - vulkan
1095 - chmod +x ${EXAMPLES_HOME}/gst-examples/vulkan/android/gradlew
1096 - ${EXAMPLES_HOME}/gst-examples/vulkan/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/vulkan/android assembleDebug
1097 - cp ${EXAMPLES_HOME}/gst-examples/vulkan/android/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
1099 # gst-docs android tutorials
1100 - chmod +x ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew
1101 - ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android assembleDebug
1102 - cp ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/android-tutorial-*/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
1104 - rm -rf ${GSTREAMER_ROOT_ANDROID}
1105 - rm -rf ${EXAMPLES_HOME}/gst-examples ${EXAMPLES_HOME}/gst-docs
1107 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
1112 - "${EXAMPLES_HOME}/outputs"
1114 cross-android universal examples:
1115 extends: ".cross-android universal examples"
1117 - if: '$CI_MERGE_REQUEST_IID && $CI_PROJECT_NAME == "gst-docs"'
1118 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
1120 - "build cerbero cross-android universal"
1122 cerbero cross-android universal examples:
1123 extends: ".cross-android universal examples"
1125 - if: '$CI_PROJECT_NAME == "cerbero"'
1127 - "cerbero deps cross-android universal"
1130 # Cerbero macOS X86_64 build
1132 .cerbero macos x86_64:
1134 ARCH: "darwin_x86_64"
1135 CONFIG: "osx-x86-64.cbc"
1136 CERBERO_PACKAGE_ARGS: ""
1138 CERBERO_OVERRIDDEN_DIST_DIR: "/Library/Frameworks/GStreamer.framework/Versions/1.0"
1139 CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
1143 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
1148 - "${CERBERO_HOME}/logs"
1149 - "gstreamer-1.0-1.*.pkg"
1150 - "gstreamer-1.0-devel-1.*.pkg"
1152 cerbero deps macos x86_64:
1155 - '.cerbero macos x86_64'
1157 build cerbero macos x86_64:
1160 - '.cerbero macos x86_64'
1162 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
1165 # Cerbero macOS Universal build
1167 .cerbero cross-macos universal:
1169 ARCH: "darwin_universal"
1170 CONFIG: "cross-macos-universal.cbc"
1171 CERBERO_PACKAGE_ARGS: ""
1173 CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
1177 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
1182 - "${CERBERO_HOME}/logs"
1183 - "gstreamer-1.0-1.*.pkg"
1184 - "gstreamer-1.0-devel-1.*.pkg"
1186 cerbero deps cross-macos universal:
1189 - '.cerbero cross-macos universal'
1191 build cerbero cross-macos universal:
1194 - '.cerbero cross-macos universal'
1196 # We have build-tools that have fixed paths pointing to the upstream
1197 # repository. We need to point
1199 - mkdir -p "../../gstreamer"
1200 - ln -sf "$(pwd)" "../../gstreamer/cerbero"
1201 - mkdir -p "../../${CI_PROJECT_NAMESPACE}"
1202 - ln -sf "$(pwd)" "../../${CI_PROJECT_NAMESPACE}/cerbero"
1204 - ./cerbero_setup.sh cerbero_script
1206 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
1211 .cerbero cross-ios universal:
1213 ARCH: "ios_universal"
1214 CONFIG: "cross-ios-universal.cbc"
1215 CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror"
1216 CERBERO_PACKAGE_ARGS: ""
1218 CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
1222 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
1227 - "${CERBERO_HOME}/logs"
1228 - "gstreamer-1.0-*-ios-universal.pkg"
1230 cerbero deps cross-ios universal:
1233 - '.cerbero cross-ios universal'
1235 build cerbero cross-ios universal:
1238 - '.cerbero cross-ios universal'
1240 - if: '$CI_MERGE_REQUEST_IID && $CI_PROJECT_NAME == "gst-docs"'
1241 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
1244 image: $FEDORA_DOCS_IMAGE
1246 - '.gst_build_ccache_vars'
1248 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-integration-testsuites|gst-plugins-rs|gst-python)$/'
1253 MESON_ARGS: *simple_build
1254 MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
1255 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
1257 - pip3 install --upgrade hotdoc
1259 # FIXME: remove this once the docs image is updated
1260 - pip3 install -U meson==0.56.2
1263 - ./gst-uninstalled.py ninja -C build/ plugins_doc_caches
1265 python3 -c "import os, subprocess, sys
1266 subprojects = [os.environ['CI_PROJECT_NAME']]
1267 if subprojects[0] in ['gst-ci', 'gst-build']:
1268 subprojects = ['gstreamer', 'gst-plugins-ugly', 'gst-omx', 'gst-plugins-good', 'gst-plugins-base', 'gstreamer-vaapi', 'gst-libav', 'gst-editing-services', 'gst-rtsp-server', 'gst-plugins-bad',]
1270 diffsdir = '../plugins-cache-diffs'
1271 os.makedirs(diffsdir, exist_ok=True)
1273 for subproject in subprojects:
1274 cwd = os.path.join('subprojects', subproject)
1276 subprocess.check_call(['git', 'diff', '--quiet'], cwd=cwd)
1277 except subprocess.CalledProcessError:
1278 diffname = os.path.join(diffsdir, '%s_cache.diff' % subproject)
1280 with open(diffname, 'w') as diff:
1281 subprocess.check_call(['git', 'diff'], stdout=diff, cwd=cwd)
1282 print('\033[91mYou have a diff in the %s documentation cache. Please update with:\033[0m' % subproject)
1283 print(' $ curl %s/%s | git apply -' % (os.environ['CI_ARTIFACTS_URL'], diffname.replace('../', '')))
1285 print('(note that it might take a few minutes for artefacts to be available on the server)\n')
1288 - ./gst-uninstalled.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
1290 - mv gst-build/build/subprojects/gst-docs/GStreamer-doc/html documentation/
1296 - plugins-cache-diffs/
1299 # Build an iOS App using the iOS binaries
1301 .cross-ios universal examples:
1304 EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
1305 # disable codesigning so we don't need developer identities on the CI
1308 CODE_SIGNING_REQUIRED="NO"
1309 CODE_SIGN_IDENTITY=""
1310 CODE_SIGNING_ALLOWED="NO"
1311 CODE_SIGN_ENTITLEMENTS=""
1313 # install the binaries
1314 - installer -pkg gstreamer-1.0-devel-*-ios-universal.pkg -target CurrentUserHomeDirectory -verbose
1316 - curl -L -o clone_manifest_ref.py https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py
1317 - chmod +x clone_manifest_ref.py
1318 - ./clone_manifest_ref.py --manifest manifest.xml --project gst-examples --destination ${EXAMPLES_HOME}/gst-examples
1319 - ./clone_manifest_ref.py --manifest manifest.xml --project gst-docs --destination ${EXAMPLES_HOME}/gst-docs
1320 - rm clone_manifest_ref.py
1322 # dump some useful information
1323 - xcodebuild -version
1324 - xcodebuild -showsdks
1326 # gst-docs ios tutorials
1327 - xcodebuild -showBuildSettings -alltargets -project ${EXAMPLES_HOME}/gst-docs/examples/tutorials/xcode\ iOS/GStreamer\ iOS\ Tutorials.xcodeproj
1328 - xcodebuild -alltargets -destination generic/platform=iOS -project ${EXAMPLES_HOME}/gst-docs/examples/tutorials/xcode\ iOS/GStreamer\ iOS\ Tutorials.xcodeproj ${XCODE_BUILD_ARGS}
1331 - xcodebuild -showBuildSettings -alltargets -project ${EXAMPLES_HOME}/gst-examples/playback/player/ios/GstPlay.xcodeproj
1332 - xcodebuild -alltargets -destination generic/platform=iOS -project ${EXAMPLES_HOME}/gst-examples/playback/player/ios/GstPlay.xcodeproj ${XCODE_BUILD_ARGS}
1334 - rm -rf ${EXAMPLES_HOME}/gst-examples ${EXAMPLES_HOME}/gst-docs
1338 cross-ios universal examples:
1339 extends: ".cross-ios universal examples"
1341 - if: '$CI_MERGE_REQUEST_IID && $CI_PROJECT_NAME == "gst-docs"'
1342 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
1344 - "build cerbero cross-ios universal"
1346 cerbero cross-ios universal examples:
1347 extends: ".cross-ios universal examples"
1349 - if: '$CI_PROJECT_NAME == "cerbero"'
1351 - "cerbero deps cross-ios universal"
1353 build gst-omx zynq fedora x86_64:
1354 extends: '.build fedora x86_64'
1356 MESON_ARGS: "-Domx=enabled -Dgst-omx:target=zynqultrascaleplus -Dgst-omx:header_path=${CI_PROJECT_DIR}/vcu-omx-il/omx_header -Dpython=disabled -Dlibav=disabled -Dlibnice=disabled -Dugly=disabled -Dbad=disabled -Ddevtools=disabled -Dges=disabled -Drtsp_server=disabled -Dvaapi=disabled -Dsharp=disabled -Dgst-examples=disabled -Drs=disabled ${MESON_BUILDTYPE_ARGS} $MESON_GST_WERROR"
1358 - if: '$CI_PROJECT_NAME =~ /^(gst-omx|gst-ci)$/'
1360 - git clone https://github.com/Xilinx/vcu-omx-il.git --branch=release-2020.1 ${CI_PROJECT_DIR}/vcu-omx-il
1362 build gst-omx tizonia fedora x86_64:
1363 extends: '.build fedora x86_64'
1365 MESON_ARGS: "-Domx=enabled -Dgst-omx:target=tizonia -Dpython=disabled -Dlibav=disabled -Dlibnice=disabled -Dugly=disabled -Dbad=disabled -Ddevtools=disabled -Dges=disabled -Drtsp_server=disabled -Dvaapi=disabled -Dsharp=disabled -Dgst-examples=disabled -Drs=disabled ${MESON_BUILDTYPE_ARGS} $MESON_GST_WERROR"
1366 PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}:${CI_PROJECT_DIR}/tizonia-install/lib64/pkgconfig/
1368 - if: '$CI_PROJECT_NAME =~ /^(gst-omx|gst-ci)$/'
1370 - git clone https://github.com/tizonia/tizonia-openmax-il --branch v0.20.2
1371 - cd tizonia-openmax-il
1372 - meson build -Dclients=false -Dplugins='' -Dplayer=false -Dprefix=${CI_PROJECT_DIR}/tizonia-install
1374 - ninja -C build install
1378 # Cerbero Native Windows builds
1380 .cerbero windows native:
1382 image: $CERBERO_WINDOWS_IMAGE
1386 - 'gstreamer-windows'
1391 CERBERO_HOST_DIR: "C:/cerbero"
1392 CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v visualstudio -v nowerror"
1393 CERBERO_RUN_SUFFIX: ".exe"
1396 - $env:CI_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\', '/')
1397 - $env:CERBERO_SCRIPTS_PATH = "$env:CI_PROJECT_DIR/cerbero_setup.sh"
1398 - echo "Fetching $env:CERBERO_SCRIPT_URL"
1399 - Invoke-WebRequest -Uri $env:CERBERO_SCRIPT_URL -OutFile $env:CERBERO_SCRIPTS_PATH
1400 - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && $env:CERBERO_SCRIPTS_PATH cerbero_before_script"
1402 cerbero deps msvc x86_64:
1403 extends: ['.cerbero deps', '.cerbero windows native']
1405 - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && $env:CERBERO_SCRIPTS_PATH cerbero_deps_script"
1407 build cerbero msvc x86_64:
1408 extends: ['.cerbero', '.cerbero windows native']
1410 - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && $env:CERBERO_SCRIPTS_PATH cerbero_script"
1412 - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'