- 'integrate'
variables:
+ GIT_DEPTH: 1
+
# Branch to track for modules that have no ref specified in the manifest
GST_UPSTREAM_BRANCH: 'main'
- ORC_UPSTREAM_BRANCH: 'master'
###
# IMPORTANT
# If you are hacking on them or need a them to rebuild, its enough
# to change any part of the string of the image you want.
###
- FEDORA_TAG: '2021-10-05.0'
- INDENT_TAG: '2021-10-04.0'
- WINDOWS_TAG: "2021-10-12.0"
+ FEDORA_TAG: '2022-07-31.0'
+ INDENT_TAG: '2022-03-07.1'
+ WINDOWS_TAG: "2022-07-31.0"
GST_UPSTREAM_REPO: 'gstreamer/gstreamer'
FDO_UPSTREAM_REPO: 'gstreamer/gstreamer'
FEDORA_AMD64_SUFFIX: 'amd64/fedora'
INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
WINDOWS_AMD64_SUFFIX: 'amd64/windows'
- WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
- RUST_MINIMUM_VERSION: '1.54.0'
- RUST_LATEST_VERSION: '1.55.0'
-
- WINDOWS_RUST_MINIMUM_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
- WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_MINIMUM_VERSION"
-
- WINDOWS_RUST_LATEST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
- WINDOWS_RUST_LATEST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH-rust-$RUST_LATEST_VERSION"
-
MESON_BUILDTYPE_ARGS: --default-library=both
DEFAULT_MESON_ARGS: >
-Dlibnice:tests=disabled
# https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ variables:
+ GIT_FETCH_EXTRA_FLAGS: '--no-tags'
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
+ - if: '$CI_COMMIT_TAG'
- if: '$CI_COMMIT_BRANCH'
+ variables:
+ GIT_FETCH_EXTRA_FLAGS: '--no-tags'
#
# Global CI policy
trigger:
image: alpine:latest
stage: 'trigger'
+ variables:
+ GIT_STRATEGY: none
script:
- echo "Trigger job done, now running the pipeline."
rules:
# If the MR is assigned to the Merge bot, trigger the pipeline automatically
- if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
- # Alway run tests post merged
+ # Require explicit action to trigger tests post merge
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
+ when: 'manual'
# When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
# to avoid wasting CI resources
- if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
FDO_DISTRIBUTION_VERSION: '31'
FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
- FDO_DISTRIBUTION_EXEC: 'DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH bash ci/docker/fedora/prepare.sh'
+ FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
fedora amd64 docker:
extends:
stage: 'build docker'
needs:
- "trigger"
+ tags:
+ - 'packet.net'
.gst-indent image:
variables:
FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
+ FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
gst-indent amd64 docker:
extends:
stage: "build docker"
needs:
- "trigger"
+ timeout: '3h'
variables:
# Unlike the buildah/linux jobs, this file
# needs to be relative to docker/windows/ subdir
tags:
- windows
- shell
- - "1809"
+ - "2022"
script:
# We need to pass an array and to resolve the env vars, so we can't use a variable:
- $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
Exit 1
}
-.windows rust docker build:
- stage: 'build docker'
- needs:
- - job: 'windows amd64 docker'
- artifacts: false
- rules:
- - if: '$CI_PROJECT_NAME == "gst-ci"'
- variables:
- # Unlike the buildah/linux jobs, this file
- # needs to be relative to docker/windows/ subdir
- # as it makes life easier in the powershell script
- #
- # We also don't need a CONTEXT_DIR var as its also
- # hardcoded to be docker/windows/
- DOCKERFILE: 'docker/windows/rust.Dockerfile'
- tags:
- - 'windows'
- - 'shell'
- - '1809'
- script:
- # We need to pass an array and to resolve the env vars, so we can't use a variable:
- - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
-
- - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
- - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
- - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
-
- - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
- - |
- if (!($?)) {
- echo "Failed to build the image"
- Exit 1
- }
-
-windows rust amd64 docker latest stable:
- extends: '.windows rust docker build'
- variables:
- RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
- RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
- RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
-
-windows rust amd64 docker minimum supported version:
- extends: '.windows rust docker build'
- variables:
- RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
- RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
- RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
-
-
# ---- Preparation ----- #
#
- job: 'gst-indent amd64 docker'
artifacts: false
script:
- # man indent. grep RETURN VALUE, grab a beer on my behalf...
- - indent --version || true
- - ./scripts/gst-indent-all
- - |
- if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
- echo "Code is properly formatted"
- else
- git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
- echo 'style diverges, please run gst-indent first'
- exit 1
- fi
+ - ./scripts/check-format-c
+ - ./scripts/format-csharp --check
+ rules:
+ # Don't check indentation on post merge pipelines
+ - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
+ when: 'manual'
+ - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
+ when: 'always'
#
# build setup templates
#
.build_template: &build
+ - ci/scripts/handle-subprojects-cache.py subprojects/
- echo $MESON_ARGS
-
- meson build/ $MESON_ARGS
- ninja -C build/
- ccache --show-stats
.base_modules_changes: &modules_changes
- .gitlab-ci.yml
+ - gst-env.py
+ - ci/gitlab/*.py
- meson.build
- subprojects/*.wrap
- subprojects/gst-devtools/**/*
timeout: '45min'
variables:
MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
- before_script:
- - export RUSTUP_HOME="/usr/local/rustup"
- - export CARGO_HOME="/usr/local/cargo"
- - export PATH="/usr/local/cargo/bin:$PATH"
-
- - ci/scripts/handle-subprojects-cache.py subprojects/
- # Update subprojects to respect `.wrap` content
- - meson subprojects update --reset
script:
- *build
+ - *build
+ - ./gst-env.py gst-inspect-1.0 --version
+ - ./gst-env.py gst-inspect-1.0
after_script:
- mv build/meson-logs/ meson-logs
artifacts:
variables:
MESON_ARGS: *simple_build
+build fedora x86_64:
+ extends:
+ - '.fedora image'
+ - '.fdo.suffixed-image@fedora'
+ - '.build fedora x86_64'
+ needs:
+ - "fedora amd64 docker"
+ script:
+ - *build
+ - ./gst-env.py gst-inspect-1.0 --version
+ - ./gst-env.py gst-inspect-1.0
+ - meson install --destdir $CI_PROJECT_DIR/destdir -C build
+ - rm -rf $CI_PROJECT_DIR/destdir
+
build nodebug fedora x86_64:
extends:
- '.fedora image'
variables:
MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
-build static fedora x86_64:
- extends: '.build fedora x86_64'
- variables:
- MESON_BUILDTYPE_ARGS: >
- --default-library=static
- -Dintrospection=disabled
- -Ddoc=disabled
- -Dpython=auto
-
-build static nodebug fedora x86_64:
- extends: 'build nodebug fedora x86_64'
- variables:
- MESON_BUILDTYPE_ARGS: >
- --default-library=static
- -Dintrospection=disabled
- -Ddoc=disabled
- -Dpython=auto
-
build clang fedora x86_64:
extends: '.build fedora x86_64'
variables:
tags:
- 'docker'
- 'windows'
- - '1809'
+ - '2022'
needs:
- "windows amd64 docker"
timeout: '45min'
-Dvaapi=disabled
-Dgst-plugins-base:pango=enabled
-Dgst-plugins-good:cairo=enabled
+ # Needs to not be empty otherwise the newline -> space replace command in
+ # `script:` will fail
+ MESON_CROSS_ARGS: ' '
rules:
# If this matches, it means the pipeline is running against either the main
# or a stable branch, so make it manual
when: manual
- changes:
*modules_changes
- before_script:
- - ci/scripts/handle-subprojects-cache.py subprojects/
script:
+ # Make sure powershell exits on errors
+ # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
+ - $ErrorActionPreference = "Stop"
+
+ # Set the code page to UTF-8
+ - chcp 65001
+
+ - ci/scripts/handle-subprojects-cache.py subprojects/
# For some reason, options are separated by newline instead of space, so we
# have to replace them first.
- $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
+ - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
- meson build $env:MESON_ARGS &&
- ninja -C build"
- # XXX: Re-enable when uploading stops timing out
- #artifacts:
- # expire_in: "7 days"
- # when: "always"
- # paths:
- # - 'build/meson-logs/'
-
-build vs2017 amd64:
+ meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
+ meson compile -C build"
+ artifacts:
+ expire_in: "7 days"
+ when: "always"
+ paths:
+ - 'build/meson-logs/'
+
+build vs2019 amd64:
extends: '.build windows'
variables:
ARCH: 'amd64'
+ script:
+ - !reference [".build windows", "script",]
+ - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
+ .\gst-env.py gst-inspect-1.0.exe --version &&
+ .\gst-env.py gst-inspect-1.0.exe &&
+ mkdir .\destdir &&
+ meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
+ rmdir /s /q $env:CI_PROJECT_DIR\destdir"
-build vs2017 x86:
+build vs2019 x86:
extends: '.build windows'
variables:
ARCH: 'x86'
+build vs2019 arm64 uwp:
+ extends: '.build windows'
+ variables:
+ ARCH: 'arm64'
+ # pango pulls in cairo which pulls in pixman which doesn't build because of
+ # https://github.com/mesonbuild/meson/issues/9889
+ MESON_CROSS_ARGS: >
+ -Dgst-plugins-base:pango=disabled
+ -Dgst-plugins-good:cairo=disabled
+ -Dgst-devtools:cairo=disabled
+ --cross-file ci/meson/vs2019-arm64-cross-file.txt
+ --native-file ci/meson/vs2019-x64-native-file.txt
+
build msys2 :
extends: '.build windows'
timeout: '60min'
allow_failure: true
when: 'manual'
script:
- # Make sure powershell exists on errors
+ # Make sure powershell exits on errors
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
- $ErrorActionPreference = "Stop"
+ # Set the code page to UTF-8
+ - chcp 65001
+
# Configure MSYS2 to use the UCRT64 environment, start in the same directory
# and inherit PATH
- $env:MSYSTEM = "UCRT64"
TEST_SUITE: "validate ges"
# gstreamer-full:
-gstreamer-full:
- extends: 'build static fedora x86_64'
- stage: integrate
+gstreamer-full static build:
+ extends: '.build fedora x86_64'
+ stage: 'build'
variables:
MESON_ARGS: >
--default-library=static
paths:
- 'meson-logs/'
-gstreamer-full-minimal:
- extends: 'build static fedora x86_64'
- stage: integrate
+gstreamer-full-minimal static build:
+ extends: 'gstreamer-full static build'
+ stage: 'build'
variables:
MESON_ARGS: >
--default-library=static
+ -Ddoc=disabled
+ -Dgstreamer:gst_debug=false
-Dauto_features=disabled
-Dgstreamer:check=enabled
-Dtests=enabled
- subprojects/gst-plugins-good/**/*
- subprojects/gst-plugins-bad/**/*
- subprojects/gst-editing-services/**/*
+ - subprojects/gst-python/**/*
# ---- Integration ----- #
variables:
MESON_ARGS: *simple_build
MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
+ # Disable werror for the docs build, we don't need it
+ MESON_GST_WERROR: ''
CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
script:
# FIXME: should rebuild the image with newer versions!
- pip3 install --upgrade meson
- *build
- ./gst-env.py ninja -C build/ plugins_doc_caches
+ # Ignore modifications to wrap files made by meson
+ - git checkout subprojects/*.wrap
- ./ci/scripts/check-documentation-diff.py
- ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
- mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
when: never
- changes:
- .gitlab-ci.yml
- - ci/gitlab/freedesktop_doc_importer.sh
+ - ci/gitlab/*.py
- subprojects/*.wrap
- subprojects/gst-docs/**/*
- subprojects/gst-devtools/**/*
# https://gitlab.com/gitlab-org/gitlab/-/issues/341737
cerbero trigger:
stage: build
+ timeout: '3h'
+ tags:
+ - placeholder-job
extends:
- '.fedora image'
- '.fdo.suffixed-image@fedora'
when: never
- changes:
- .gitlab-ci.yml
- - ci/gitlab/trigger_cerbero_pipeline.py
+ - ci/gitlab/*.py
- subprojects/gst-devtools/**/*
- subprojects/gst-editing-services/**/*
- subprojects/gst-libav/**/*