mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-07 15:15:53 +00:00
cf21e723e3
This will reduce the excessive load on the runners which are having issues with this job in particuliar. We will revisit when we better understand the runners issues.
908 lines
31 KiB
YAML
908 lines
31 KiB
YAML
stages:
|
|
- 'preparation'
|
|
- 'pre-build'
|
|
- 'build'
|
|
- 'test'
|
|
# Use the resulting binaries
|
|
- 'integrate'
|
|
|
|
variables:
|
|
ANDROID_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/android:2020-02-10-1589547-master'
|
|
CERBERO_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/cerbero-fedora:2020-02-10-1589546-master'
|
|
FEDORA_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-02-24-1712085-master'
|
|
INDENT_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/gst-indent:6f7e01e1e30a73efa880acdc8e911f1f20c58dbb'
|
|
MANIFEST_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/build-manifest:2020-02-10-1589542-master'
|
|
WINDOWS_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v9'
|
|
|
|
# Branch to track for modules that have no ref specified in the manifest
|
|
GST_UPSTREAM_BRANCH: 'master'
|
|
ORC_UPSTREAM_BRANCH: 'master'
|
|
|
|
GIT_STRATEGY: none
|
|
MESON_BUILDTYPE_ARGS: --default-library=both
|
|
DEFAULT_MESON_ARGS: >
|
|
-Dpython=enabled
|
|
-Dlibav=enabled
|
|
-Dugly=enabled
|
|
-Dbad=enabled
|
|
-Ddevtools=enabled
|
|
-Dges=enabled
|
|
-Drtsp_server=enabled
|
|
-Dvaapi=enabled
|
|
-Dsharp=disabled
|
|
|
|
DEFAULT_CERBERO_ARGS: >
|
|
--variants werror
|
|
--timestamps
|
|
|
|
#
|
|
# Global CI policy
|
|
#
|
|
# This can be used to configure global behaviour our our jobs.
|
|
#
|
|
.global_ci_policy:
|
|
retry:
|
|
max: 2
|
|
when:
|
|
- 'runner_system_failure'
|
|
- 'stuck_or_timeout_failure'
|
|
- 'scheduler_failure'
|
|
- 'api_failure'
|
|
interruptible: true
|
|
|
|
manifest:
|
|
image: $MANIFEST_IMAGE
|
|
extends:
|
|
- '.global_ci_policy'
|
|
rules:
|
|
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME'
|
|
when: 'always'
|
|
- if: '$CI_PROJECT_PATH == "gstreamer/cerbero"'
|
|
when: 'always'
|
|
- when: 'manual'
|
|
stage: 'preparation'
|
|
script:
|
|
- cd /gst-ci
|
|
- gitlab/build_manifest.py --self-update
|
|
- gitlab/build_manifest.py ${CI_PROJECT_DIR}/manifest.xml
|
|
- cat ${CI_PROJECT_DIR}/manifest.xml
|
|
artifacts:
|
|
expire_in: "7 days"
|
|
paths:
|
|
- "manifest.xml"
|
|
|
|
gst indent:
|
|
image: $INDENT_IMAGE
|
|
extends:
|
|
- '.global_ci_policy'
|
|
stage: 'preparation'
|
|
variables:
|
|
GIT_STRATEGY: 'fetch'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(gstreamer-sharp|gst-integration-testsuites|cerbero|gst-docs)$/'
|
|
script:
|
|
# man indent. grep RETURN VALUE, grab a beer on my behalf...
|
|
- indent --version || true
|
|
- curl -o gst-indent https://gitlab.freedesktop.org/gstreamer/gstreamer/raw/${GST_UPSTREAM_BRANCH}/tools/gst-indent
|
|
- chmod +x gst-indent
|
|
- find . -name '*.c' -exec ./gst-indent {} +
|
|
- |
|
|
if git diff --quiet; then
|
|
echo "Code is properly formatted"
|
|
else
|
|
git diff --color=always
|
|
echo 'style diverges, please run gst-indent first'
|
|
exit 1
|
|
fi
|
|
|
|
.build:
|
|
stage: 'build'
|
|
extends:
|
|
- '.global_ci_policy'
|
|
needs:
|
|
- "manifest"
|
|
# Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
|
|
# Also need to take into account I/O of pulling docker images and uploading artifacts
|
|
timeout: '45min'
|
|
variables:
|
|
CCACHE_COMPILERCHECK: "content"
|
|
CCACHE_COMPRESS: "true"
|
|
CCACHE_BASEDIR: "/cache/gstreamer/gst-build"
|
|
CCACHE_DIR: "/cache/gstreamer/gst-build/ccache/"
|
|
# shared across everything really
|
|
CCACHE_MAXSIZE: "10G"
|
|
CARGO_HOME: "/cache/gstreamer/cargo"
|
|
|
|
MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} --werror"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME != "cerbero"'
|
|
|
|
script:
|
|
- ccache --show-stats
|
|
- curl -o clone_manifest_ref.py https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py
|
|
- chmod +x clone_manifest_ref.py
|
|
- ./clone_manifest_ref.py --manifest manifest.xml --project gst-build --destination gst-build
|
|
- cd gst-build/
|
|
# only copy immediate directories. We don't want to modify .wrap files
|
|
- find /gst-build/subprojects/ -mindepth 1 -maxdepth 1 -type d -exec cp -r \{\} subprojects/ \;
|
|
- ./git-update --no-interaction --manifest="${CI_PROJECT_DIR}/manifest.xml"
|
|
- meson build/ $MESON_ARGS
|
|
- ninja -C build/
|
|
- ccache --show-stats
|
|
after_script:
|
|
- cd gst-build/
|
|
# Clean the artifacts packages to avoid copying "useless" build products.
|
|
- test -d build && find build -name '*.[ao]' -delete
|
|
# Clean the .git repos since we won't need them anymore
|
|
- rm -rf subprojects/*/.git/
|
|
- rm -rf build/subprojects/*/.git/
|
|
|
|
build fedora x86_64:
|
|
extends: '.build'
|
|
stage: 'build'
|
|
image: $FEDORA_IMAGE
|
|
variables:
|
|
MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Domx=enabled -Dgst-omx:target=generic -Ddoc=enabled -Drs=disabled ${MESON_BUILDTYPE_ARGS} --werror"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-omx|gst-plugins-rs)$/'
|
|
artifacts:
|
|
expire_in: '5 days'
|
|
when: always
|
|
paths:
|
|
- "manifest.xml"
|
|
- "gst-build/"
|
|
|
|
build nodebug fedora x86_64:
|
|
extends: '.build'
|
|
stage: 'build'
|
|
image: $FEDORA_IMAGE
|
|
variables:
|
|
MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic -Drs=disabled ${MESON_BUILDTYPE_ARGS} --werror"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
|
|
|
|
build static fedora x86_64:
|
|
extends: 'build fedora x86_64'
|
|
variables:
|
|
MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
|
|
|
|
build static nodebug fedora x86_64:
|
|
extends: 'build nodebug fedora x86_64'
|
|
variables:
|
|
MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
|
|
|
|
build clang fedora x86_64:
|
|
extends: 'build fedora x86_64'
|
|
variables:
|
|
CC: 'ccache clang'
|
|
CXX: 'ccache clang++'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
|
|
|
|
.test:
|
|
stage: 'test'
|
|
extends:
|
|
- '.global_ci_policy'
|
|
variables:
|
|
# Disable colored output to avoid weird rendering issues
|
|
GST_DEBUG_NO_COLOR: "true"
|
|
CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
|
|
GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
|
|
TIMEOUT_FACTOR: "2"
|
|
CARGO_HOME: "/cache/gstreamer/cargo"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-examples|gst-docs)$/'
|
|
script:
|
|
- cd gst-build/
|
|
- echo "-> Running ${TEST_SUITE}"
|
|
- >
|
|
./gst-uninstalled.py
|
|
gst-validate-launcher ${TEST_SUITE}
|
|
--dump-on-failure
|
|
--mute
|
|
--shuffle
|
|
--no-display
|
|
--meson-no-rebuild
|
|
--timeout-factor "${TIMEOUT_FACTOR}"
|
|
--fail-on-testlist-change
|
|
-l "${CI_PROJECT_DIR}/validate-logs/"
|
|
--xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
|
|
${EXTRA_VALIDATE_ARGS}
|
|
artifacts:
|
|
expire_in: '14 days'
|
|
when: always
|
|
paths:
|
|
- 'gst-build/build/meson-logs/'
|
|
- 'validate-logs'
|
|
reports:
|
|
junit:
|
|
- "validate-logs/*.xml"
|
|
|
|
.test fedora x86_64:
|
|
image: $FEDORA_IMAGE
|
|
extends: '.test'
|
|
tags: ['gstreamer']
|
|
needs:
|
|
- 'build fedora x86_64'
|
|
|
|
check fedora:
|
|
extends: '.test fedora x86_64'
|
|
variables:
|
|
TEST_SUITE: "check.gst*"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-examples|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
|
|
|
|
integration testsuites fedora:
|
|
extends: '.test fedora x86_64'
|
|
parallel: 4
|
|
variables:
|
|
EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --check-bugs --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX}"
|
|
TEST_SUITE: "validate ges"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-omx|gst-plugins-rs)$/'
|
|
|
|
gstreamer-full:
|
|
extends: 'build static fedora x86_64'
|
|
stage: integrate
|
|
variables:
|
|
MESON_ARGS: >
|
|
--default-library=static
|
|
-Dauto_features=disabled
|
|
-Dgst-plugins-good:alpha=enabled
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gst-build|gst-ci)$/'
|
|
|
|
after_script:
|
|
- cd gst-build/
|
|
- ninja -C build install
|
|
- export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib64/gstreamer-1.0/pkgconfig
|
|
- export LD_LIBRARY_PATH=/usr/local/lib64
|
|
- cd examples/static-plugins
|
|
- meson _build
|
|
- ninja -C _build
|
|
- meson test -C _build -v
|
|
artifacts:
|
|
paths:
|
|
- 'gst-build/build/meson-logs/'
|
|
- 'gst-build/build/gstinitstaticplugins.c'
|
|
|
|
# Valgrind
|
|
.valgrind fedora x86_64:
|
|
extends: '.test fedora x86_64'
|
|
stage: 'test'
|
|
variables:
|
|
EXTRA_VALIDATE_ARGS: "--valgrind"
|
|
|
|
valgrind core:
|
|
extends: '.valgrind fedora x86_64'
|
|
variables:
|
|
TEST_SUITE: "check.gstreamer\\..*"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-ci)$/'
|
|
|
|
valgrind base:
|
|
extends: '.valgrind fedora x86_64'
|
|
variables:
|
|
TEST_SUITE: "check.gst-plugins-base\\..*"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-ci)$/'
|
|
|
|
valgrind good:
|
|
extends: '.valgrind fedora x86_64'
|
|
variables:
|
|
TEST_SUITE: "check.gst-plugins-good\\..*"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-ci)$/'
|
|
|
|
valgrind ugly:
|
|
extends: '.valgrind fedora x86_64'
|
|
variables:
|
|
TEST_SUITE: "check.gst-plugins-ugly\\..*"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-ugly|gst-ci)$/'
|
|
|
|
valgrind bad:
|
|
extends: '.valgrind fedora x86_64'
|
|
variables:
|
|
TEST_SUITE: "check.gst-plugins-bad\\..*"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-plugins-bad|gst-ci)$/'
|
|
|
|
valgrind ges:
|
|
extends: '.valgrind fedora x86_64'
|
|
variables:
|
|
TEST_SUITE: "check.gst-editing-services\\..*"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-editing-services|gst-ci|gst-devtools)$/'
|
|
|
|
# Template for Cerbero GStreamer Build
|
|
#
|
|
# Parameters:
|
|
# CONFIG: The name of the configuration file to use
|
|
# ARCH: The cerbero <os>_<cpu> (used in cache key)
|
|
#
|
|
# Produces runtime and devel tarball packages for linux/android or .pkg for macos
|
|
.cerbero:
|
|
stage: "build"
|
|
image: $CERBERO_IMAGE
|
|
extends:
|
|
- '.global_ci_policy'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME == "cerbero"'
|
|
needs:
|
|
- "manifest"
|
|
# Ensure that the runners it will be executed on
|
|
# will have plenty of space for the cache
|
|
tags: ['gstreamer']
|
|
timeout: '3h'
|
|
variables:
|
|
CCACHE_COMPILERCHECK: "content"
|
|
CCACHE_COMPRESS: "true"
|
|
CCACHE_BASEDIR: "/cache/gstreamer/cerbero/"
|
|
CCACHE_DIR: "/cache/gstreamer/cerbero/ccache/"
|
|
# shared across everything really
|
|
CCACHE_MAXSIZE: "50G"
|
|
|
|
CERBERO_HOME: "cerbero-build"
|
|
CERBERO_SOURCES: "cerbero-sources"
|
|
CERBERO_DEPS: "cerbero-deps.tar.gz"
|
|
CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS}"
|
|
CERBERO: "./cerbero-uninstalled -c config/${CONFIG} -c localconf.cbc -m manifest.xml"
|
|
CERBERO_PACKAGE_ARGS: "-t"
|
|
CERBERO_RUN_WRAPPER: "" # 'wine' on cross-winXX
|
|
CERBERO_RUN_SUFFIX: "" # '.exe' on cross-winXX
|
|
HAVE_CCACHE: "yes"
|
|
# used by macos packages as we only ever install to a fixed directory
|
|
CERBERO_OVERRIDDEN_DIST_DIR: ""
|
|
# location where cerbero is cached on the host
|
|
CERBERO_HOST_DIR: "/cerbero/"
|
|
before_script:
|
|
# FIXME Wrong namespace
|
|
# Workaround build-tools having hardcoded internal path
|
|
- pwd
|
|
- mkdir -p ../../gstreamer
|
|
- ln -sf $(pwd) ../../gstreamer/cerbero
|
|
- mkdir -p ../../${CI_PROJECT_NAMESPACE}
|
|
- ln -sf $(pwd) ../../${CI_PROJECT_NAMESPACE}/cerbero
|
|
- rsync -aH ${CERBERO_HOST_DIR} .
|
|
- test -f ${CERBERO_DEPS} && tar -C ${CERBERO_HOME} -xf ${CERBERO_DEPS}
|
|
- echo "home_dir = \"$(pwd)/${CERBERO_HOME}\"" >> localconf.cbc
|
|
- echo "local_sources = \"$(pwd)/${CERBERO_SOURCES}\"" >> localconf.cbc
|
|
- ./cerbero-uninstalled --self-update manifest.xml
|
|
script:
|
|
- test "x${HAVE_CCACHE}" = "xyes" && ccache --show-stats
|
|
- $CERBERO $CERBERO_ARGS show-config
|
|
- $CERBERO $CERBERO_ARGS fetch-bootstrap --build-tools-only
|
|
- $CERBERO $CERBERO_ARGS fetch-package --deps gstreamer-1.0
|
|
- $CERBERO $CERBERO_ARGS fetch-cache --branch ${GST_UPSTREAM_BRANCH}
|
|
- test "x${CERBERO_OVERRIDDEN_DIST_DIR}" != "x"
|
|
&& test -d ${CERBERO_HOME}/dist/${ARCH}
|
|
&& mkdir -p ${CERBERO_OVERRIDDEN_DIST_DIR}
|
|
&& rsync -aH ${CERBERO_HOME}/dist/${ARCH}/ ${CERBERO_OVERRIDDEN_DIST_DIR}
|
|
- $CERBERO $CERBERO_ARGS bootstrap --offline --build-tools-only
|
|
- $CERBERO $CERBERO_ARGS package --offline ${CERBERO_PACKAGE_ARGS} -o $(pwd) gstreamer-1.0
|
|
# Run gst-inspect-1.0 for some basic checks. Can't do this for cross-(android|ios)-universal, of course.
|
|
- |-
|
|
[[ $CONFIG == *universal* ]] || $CERBERO $CERBERO_ARGS run $CERBERO_RUN_WRAPPER gst-inspect-1.0$CERBERO_RUN_SUFFIX --version
|
|
- |-
|
|
[[ $CONFIG == *universal* ]] || $CERBERO $CERBERO_ARGS run $CERBERO_RUN_WRAPPER gst-inspect-1.0$CERBERO_RUN_SUFFIX
|
|
- test "x${HAVE_CCACHE}" = "xyes" && ccache -s || true # eat the return value from the failing test
|
|
cache:
|
|
key: "${CI_JOB_NAME}"
|
|
paths:
|
|
- "${CERBERO_SOURCES}"
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
expire_in: '5 days'
|
|
when: 'always'
|
|
paths:
|
|
- "manifest.xml"
|
|
- "${CERBERO_HOME}/logs"
|
|
- "*.tar.bz2"
|
|
|
|
.build windows:
|
|
image: $WINDOWS_IMAGE
|
|
extends:
|
|
- '.global_ci_policy'
|
|
stage: 'build'
|
|
needs:
|
|
- 'manifest'
|
|
tags:
|
|
- 'docker'
|
|
- 'windows'
|
|
- '1809'
|
|
timeout: '45min'
|
|
variables:
|
|
MESON_ARGS: >
|
|
${DEFAULT_MESON_ARGS}
|
|
-Dpython=disabled
|
|
-Dlibav=disabled
|
|
-Dvaapi=disabled
|
|
-Ddevtools=disabled
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
|
|
script:
|
|
# Sometimes there's seems to be an existing gst-build clone that comes either from the ether or
|
|
# from a previous job due to some gitlab bug or implicit behavior?
|
|
# So let's always check and clear it out if its there
|
|
# https://gitlab.freedesktop.org/tpm/gstreamer-sharp/-/jobs/1672137
|
|
- if (Test-Path $env:CI_PROJECT_DIR/gst-build) { Remove-Item -Recurse -Force $env:CI_PROJECT_DIR/gst-build }
|
|
|
|
# Make sure powershell exists on errors
|
|
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
|
|
- $ErrorActionPreference = "Stop"
|
|
|
|
- git clone -b $GST_UPSTREAM_BRANCH https://gitlab.freedesktop.org/gstreamer/gst-build.git $env:CI_PROJECT_DIR\gst-build
|
|
- cd $env:CI_PROJECT_DIR/gst-build
|
|
- cp -r C:/subprojects/* subprojects/
|
|
# Run the git-update script and feed it the manifest to setup the environment
|
|
- cd $env:CI_PROJECT_DIR/gst-build; python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
|
|
# 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"," ")
|
|
# Gitlab executes PowerShell in docker, but VsDevCmd.bat is a batch script.
|
|
# Environment variables substitutions is done by PowerShell before calling
|
|
# cmd.exe, that's why we use $env:FOO instead of %FOO%
|
|
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
|
|
meson build $env:MESON_ARGS &&
|
|
ninja -C build"
|
|
# FIXME: extract builddir for tests
|
|
# There's a bug that prevents us from exporting artifacts with docker-windows
|
|
# executors. It has since been fixed in gitlab 12.1, but
|
|
# we are blocked from upgrading currently.
|
|
#
|
|
# Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
|
|
# Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
|
|
after_script:
|
|
|
|
build vs2017 amd64:
|
|
extends: '.build windows'
|
|
variables:
|
|
ARCH: 'amd64'
|
|
|
|
build vs2017 x86:
|
|
extends: '.build windows'
|
|
variables:
|
|
ARCH: 'x86'
|
|
|
|
# Disabled until the runner issues has been resolved.
|
|
build msys2 :
|
|
extends: '.build windows'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
|
|
allow_failure: true
|
|
when: manual
|
|
timeout: '60min'
|
|
script:
|
|
# Sometimes there's seems to be an existing gst-build clone that comes either from the ether or
|
|
# from a previous job due to some gitlab bug or implicit behavior?
|
|
# So let's always check and clear it out if its there
|
|
# https://gitlab.freedesktop.org/tpm/gstreamer-sharp/-/jobs/1672137
|
|
- if (Test-Path $env:CI_PROJECT_DIR/gst-build) { Remove-Item -Recurse -Force $env:CI_PROJECT_DIR/gst-build }
|
|
|
|
# Make sure powershell exists on errors
|
|
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
|
|
- $ErrorActionPreference = "Stop"
|
|
|
|
# For some reason docker build hangs if this is included in the image, needs more troubleshooting
|
|
- $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
|
|
- C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
|
|
- C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm"
|
|
- C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
|
|
|
|
- git clone -b $GST_UPSTREAM_BRANCH https://gitlab.freedesktop.org/gstreamer/gst-build.git $env:CI_PROJECT_DIR\gst-build
|
|
- cd $env:CI_PROJECT_DIR\gst-build
|
|
- cp -r C:\subprojects\* subprojects\
|
|
|
|
# Run the git-update script and feed it the manifest to setup the environment
|
|
- cd $env:CI_PROJECT_DIR/gst-build; python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
|
|
# 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"," ")
|
|
# Replace forward slashes with backwards so bash doesn't complain
|
|
- $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
|
|
- C:\msys64\usr\bin\bash -c "cd $env:_PROJECT_DIR/gst-build &&
|
|
meson build $env:MESON_ARGS &&
|
|
ninja -C build"
|
|
|
|
|
|
# Template for Cerbero GStreamer Deps
|
|
#
|
|
# This template is used by cerbero/ project to pre-built the GStreamer
|
|
# dependencies. When available, the .cerbero jobs will download this artifact
|
|
# in order to speed up the build.
|
|
#
|
|
# Parameters:
|
|
# CONFIG: The name of the configuration file to use
|
|
# ARCH: The cerbero <os>_<cpu> (used in cache key)
|
|
#
|
|
# Produce an artifact with the dist/ and .cache along
|
|
# with the associated build-tools.
|
|
.cerbero deps:
|
|
extends: .cerbero
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME == "cerbero"'
|
|
stage: "pre-build"
|
|
script:
|
|
- $CERBERO $CERBERO_ARGS show-config
|
|
- $CERBERO $CERBERO_ARGS fetch-bootstrap --build-tools-only
|
|
- $CERBERO $CERBERO_ARGS fetch-package --deps gstreamer-1.0
|
|
- $CERBERO $CERBERO_ARGS bootstrap --offline --build-tools-only
|
|
- $CERBERO $CERBERO_ARGS build-deps --offline
|
|
gstreamer-1.0 gst-plugins-base-1.0 gst-plugins-good-1.0
|
|
gst-plugins-bad-1.0 gst-plugins-ugly-1.0 gst-rtsp-server-1.0
|
|
gst-libav-1.0 gst-validate gst-editing-services-1.0 libnice
|
|
- $CERBERO $CERBERO_ARGS fetch-cache --branch ${GST_UPSTREAM_BRANCH} --skip-fetch --job-id=${CI_JOB_ID}
|
|
- test "x${CERBERO_OVERRIDDEN_DIST_DIR}" != "x"
|
|
&& mkdir -p ${CERBERO_HOME}/dist/${ARCH}
|
|
&& rsync -aH ${CERBERO_OVERRIDDEN_DIST_DIR}/ ${CERBERO_HOME}/dist/${ARCH}
|
|
- tar -C ${CERBERO_HOME} --exclude=var/tmp -czf $CERBERO_DEPS
|
|
build-tools build-tools.cache
|
|
dist/${ARCH} ${ARCH}.cache
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
expire_in: '10 days'
|
|
when: 'always'
|
|
paths:
|
|
- "manifest.xml"
|
|
- "${CERBERO_HOME}/logs"
|
|
- "${CERBERO_HOME}/cerbero-deps.log"
|
|
- "${CERBERO_DEPS}"
|
|
|
|
#
|
|
# Cerbero Linux X86_64 build
|
|
#
|
|
cerbero deps fedora x86_64:
|
|
extends: '.cerbero deps'
|
|
variables:
|
|
CONFIG: "linux.config"
|
|
ARCH: "linux_x86_64"
|
|
|
|
.cerbero fedora x86_64:
|
|
extends: '.cerbero'
|
|
variables:
|
|
CONFIG: "linux.config"
|
|
|
|
cerbero fedora x86_64:
|
|
extends: '.cerbero fedora x86_64'
|
|
needs:
|
|
- "cerbero deps fedora x86_64"
|
|
|
|
build cerbero fedora x86_64:
|
|
extends: '.cerbero fedora x86_64'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
|
|
#
|
|
# Cerbero Android Universal build
|
|
#
|
|
cerbero deps cross-android universal:
|
|
extends: '.cerbero deps'
|
|
variables:
|
|
CONFIG: "cross-android-universal.cbc"
|
|
ARCH: "android_universal"
|
|
|
|
.cerbero cross-android universal:
|
|
extends: '.cerbero'
|
|
variables:
|
|
CONFIG: "cross-android-universal.cbc"
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
expire_in: '5 days'
|
|
when: 'always'
|
|
paths:
|
|
- "manifest.xml"
|
|
- "${CERBERO_HOME}/logs"
|
|
- "*[0-9].tar.bz2"
|
|
|
|
cerbero cross-android universal:
|
|
extends: '.cerbero cross-android universal'
|
|
needs:
|
|
- "cerbero deps cross-android universal"
|
|
|
|
build cerbero cross-android universal:
|
|
extends: '.cerbero cross-android universal'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
|
|
#
|
|
# Cerbero Cross Windows builds
|
|
#
|
|
cerbero deps cross-windows x86:
|
|
extends: '.cerbero deps'
|
|
variables:
|
|
CONFIG: "cross-win32.cbc"
|
|
ARCH: "mingw_x86"
|
|
|
|
.cerbero cross win32:
|
|
extends: '.cerbero'
|
|
variables:
|
|
CONFIG: "cross-win32.cbc"
|
|
CERBERO_RUN_WRAPPER: "wine"
|
|
CERBERO_RUN_SUFFIX: ".exe"
|
|
|
|
cerbero cross win32:
|
|
extends: '.cerbero cross win32'
|
|
needs:
|
|
- "cerbero deps cross-windows x86"
|
|
|
|
build cerbero cross win32:
|
|
extends: '.cerbero cross win32'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
|
|
cerbero deps cross-windows x86_64:
|
|
extends: '.cerbero deps'
|
|
variables:
|
|
CONFIG: "cross-win64.cbc"
|
|
ARCH: "mingw_x86_64"
|
|
|
|
.cerbero cross win64:
|
|
extends: '.cerbero'
|
|
variables:
|
|
CONFIG: "cross-win64.cbc"
|
|
CERBERO_RUN_WRAPPER: "wine"
|
|
CERBERO_RUN_SUFFIX: ".exe"
|
|
|
|
cerbero cross win64:
|
|
extends: '.cerbero cross win64'
|
|
needs:
|
|
- "cerbero deps cross-windows x86_64"
|
|
|
|
build cerbero cross win64:
|
|
extends: '.cerbero cross win64'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
|
|
#
|
|
# Build an Android App using the android binaries
|
|
#
|
|
.cross-android universal examples:
|
|
image: $ANDROID_IMAGE
|
|
extends:
|
|
- '.global_ci_policy'
|
|
stage: 'integrate'
|
|
variables:
|
|
EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
|
|
GSTREAMER_ROOT_ANDROID: ${CI_PROJECT_DIR}/examples/cerbero-android-universal
|
|
script:
|
|
- mkdir -p ${EXAMPLES_HOME}/outputs
|
|
- curl -o clone_manifest_ref.py https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py
|
|
- chmod +x clone_manifest_ref.py
|
|
- ./clone_manifest_ref.py --manifest manifest.xml --project gst-examples --destination ${EXAMPLES_HOME}/gst-examples
|
|
- ./clone_manifest_ref.py --manifest manifest.xml --project gst-docs --destination ${EXAMPLES_HOME}/gst-docs
|
|
- rm clone_manifest_ref.py
|
|
|
|
# extract our binaries
|
|
- rm -f gstreamer-1.0-android-universal-*-runtime.tar.bz2
|
|
- mkdir ${GSTREAMER_ROOT_ANDROID}
|
|
- tar -C ${GSTREAMER_ROOT_ANDROID} -xf gstreamer-1.0-android-universal-*.tar.bz2
|
|
|
|
# gst-examples
|
|
- chmod +x ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew
|
|
- ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew --no-search-upward --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/playback/player/android assembleDebug
|
|
- cp ${EXAMPLES_HOME}/gst-examples/playback/player/android/app/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
|
|
|
|
# gst-docs android tutorials
|
|
- chmod +x ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew
|
|
- ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew --no-search-upward --no-daemon --project-dir ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android assembleDebug
|
|
- cp ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/android-tutorial-*/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
|
|
after_script:
|
|
- rm -rf ${GSTREAMER_ROOT_ANDROID}
|
|
- rm -rf ${EXAMPLES_HOME}/gst-examples ${EXAMPLES_HOME}/gst-docs
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
expire_in: '5 days'
|
|
when: 'always'
|
|
paths:
|
|
- "manifest.xml"
|
|
- "${EXAMPLES_HOME}/outputs"
|
|
|
|
cross-android universal examples:
|
|
extends: ".cross-android universal examples"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
needs:
|
|
- "build cerbero cross-android universal"
|
|
|
|
cerbero cross-android universal examples:
|
|
extends: ".cross-android universal examples"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME == "cerbero"'
|
|
needs:
|
|
- "cerbero cross-android universal"
|
|
|
|
#
|
|
# Cerbero macOS X86_64 build
|
|
#
|
|
cerbero deps macos x86_64:
|
|
extends: '.cerbero deps'
|
|
variables:
|
|
ARCH: "darwin_x86_64"
|
|
CONFIG: "osx-x86-64.cbc"
|
|
HAVE_CCACHE: ""
|
|
CERBERO_OVERRIDDEN_DIST_DIR: "/Library/Frameworks/GStreamer.framework/Versions/1.0"
|
|
CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
|
|
tags:
|
|
- gst-macos-10.15
|
|
|
|
.cerbero macos x86_64:
|
|
extends: '.cerbero'
|
|
variables:
|
|
ARCH: "darwin_x86_64"
|
|
CONFIG: "osx-x86-64.cbc"
|
|
CERBERO_PACKAGE_ARGS: ""
|
|
HAVE_CCACHE: ""
|
|
CERBERO_OVERRIDDEN_DIST_DIR: "/Library/Frameworks/GStreamer.framework/Versions/1.0"
|
|
CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
|
|
tags:
|
|
- gst-macos-10.15
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
expire_in: '5 days'
|
|
when: 'always'
|
|
paths:
|
|
- "manifest.xml"
|
|
- "${CERBERO_HOME}/logs"
|
|
- "gstreamer-1.0-1.*.pkg"
|
|
- "gstreamer-1.0-devel-1.*.pkg"
|
|
|
|
cerbero macos x86_64:
|
|
extends: '.cerbero macos x86_64'
|
|
needs:
|
|
- "cerbero deps macos x86_64"
|
|
|
|
build cerbero macos x86_64:
|
|
extends: '.cerbero macos x86_64'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
|
|
#
|
|
# Cerbero iOS build
|
|
#
|
|
cerbero deps cross-ios universal:
|
|
extends: '.cerbero deps'
|
|
variables:
|
|
ARCH: "ios_universal"
|
|
CONFIG: "cross-ios-universal.cbc"
|
|
CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror"
|
|
HAVE_CCACHE: ""
|
|
CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
|
|
tags:
|
|
- gst-ios-13.2
|
|
|
|
.cerbero cross-ios universal:
|
|
extends: '.cerbero'
|
|
variables:
|
|
ARCH: "ios_universal"
|
|
CONFIG: "cross-ios-universal.cbc"
|
|
CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror"
|
|
CERBERO_PACKAGE_ARGS: ""
|
|
HAVE_CCACHE: ""
|
|
CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
|
|
tags:
|
|
- gst-ios-13.2
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
expire_in: '5 days'
|
|
when: 'always'
|
|
paths:
|
|
- "manifest.xml"
|
|
- "${CERBERO_HOME}/logs"
|
|
- "gstreamer-1.0-*-ios-universal.pkg"
|
|
|
|
cerbero cross-ios universal:
|
|
extends: '.cerbero cross-ios universal'
|
|
needs:
|
|
- "cerbero deps cross-ios universal"
|
|
|
|
build cerbero cross-ios universal:
|
|
extends: '.cerbero cross-ios universal'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
|
|
documentation:
|
|
image: $FEDORA_IMAGE
|
|
extends:
|
|
- '.global_ci_policy'
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-sharp|gst-integration-testsuites|gst-omx|gst-plugins-rs|gst-python)$/'
|
|
needs:
|
|
- "build fedora x86_64"
|
|
stage: integrate
|
|
|
|
script:
|
|
- pip3 install --upgrade git+https://github.com/hotdoc/hotdoc.git
|
|
- cd gst-build/
|
|
- ./gst-uninstalled.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
|
|
- cd -
|
|
- mv gst-build/build/subprojects/gst-docs/GStreamer-doc/html documentation/
|
|
|
|
artifacts:
|
|
paths:
|
|
- documentation/
|
|
|
|
#
|
|
# Build an iOS App using the iOS binaries
|
|
#
|
|
.cross-ios universal examples:
|
|
stage: 'integrate'
|
|
extends:
|
|
- '.global_ci_policy'
|
|
variables:
|
|
EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
|
|
# disable codesigning so we don't need developer identities on the CI
|
|
# machines
|
|
XCODE_BUILD_ARGS: >
|
|
CODE_SIGNING_REQUIRED="NO"
|
|
CODE_SIGN_IDENTITY=""
|
|
CODE_SIGNING_ALLOWED="NO"
|
|
CODE_SIGN_ENTITLEMENTS=""
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
|
|
script:
|
|
# install the binaries
|
|
- installer -pkg gstreamer-1.0-devel-*-ios-universal.pkg -target CurrentUserHomeDirectory -verbose
|
|
|
|
- curl -o clone_manifest_ref.py https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py
|
|
- chmod +x clone_manifest_ref.py
|
|
- ./clone_manifest_ref.py --manifest manifest.xml --project gst-examples --destination ${EXAMPLES_HOME}/gst-examples
|
|
- ./clone_manifest_ref.py --manifest manifest.xml --project gst-docs --destination ${EXAMPLES_HOME}/gst-docs
|
|
- rm clone_manifest_ref.py
|
|
|
|
# dump some useful information
|
|
- xcodebuild -version
|
|
- xcodebuild -showsdks
|
|
|
|
# gst-docs ios tutorials
|
|
- xcodebuild -showBuildSettings -alltargets -project ${EXAMPLES_HOME}/gst-docs/examples/tutorials/xcode\ iOS/GStreamer\ iOS\ Tutorials.xcodeproj
|
|
- xcodebuild -alltargets -destination generic/platform=iOS -project ${EXAMPLES_HOME}/gst-docs/examples/tutorials/xcode\ iOS/GStreamer\ iOS\ Tutorials.xcodeproj ${XCODE_BUILD_ARGS}
|
|
|
|
# gst-examples
|
|
- xcodebuild -showBuildSettings -alltargets -project ${EXAMPLES_HOME}/gst-examples/playback/player/ios/GstPlay.xcodeproj
|
|
- xcodebuild -alltargets -destination generic/platform=iOS -project ${EXAMPLES_HOME}/gst-examples/playback/player/ios/GstPlay.xcodeproj ${XCODE_BUILD_ARGS}
|
|
after_script:
|
|
- rm -rf ${EXAMPLES_HOME}/gst-examples ${EXAMPLES_HOME}/gst-docs
|
|
tags:
|
|
- gst-ios-13.2
|
|
|
|
cross-ios universal examples:
|
|
extends: ".cross-ios universal examples"
|
|
needs:
|
|
- "build cerbero cross-ios universal"
|
|
|
|
cerbero cross-ios universal examples:
|
|
extends: ".cross-ios universal examples"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME == "cerbero"'
|
|
needs:
|
|
- "cerbero cross-ios universal"
|
|
|
|
build gst-omx zynq fedora x86_64:
|
|
extends: 'build fedora x86_64'
|
|
variables:
|
|
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} --werror"
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gst-omx|gst-ci)$/'
|
|
before_script:
|
|
- git clone https://github.com/Xilinx/vcu-omx-il.git --branch=release-2019.2 ${CI_PROJECT_DIR}/vcu-omx-il
|
|
|
|
build gst-omx tizonia fedora x86_64:
|
|
extends: 'build fedora x86_64'
|
|
variables:
|
|
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} --werror"
|
|
PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}:${CI_PROJECT_DIR}/tizonia-install/lib64/pkgconfig/
|
|
rules:
|
|
- if: '$CI_PROJECT_NAME =~ /^(gst-omx|gst-ci)$/'
|
|
before_script:
|
|
- git clone https://github.com/tizonia/tizonia-openmax-il --branch v0.20.2
|
|
- cd tizonia-openmax-il
|
|
- meson build -Dclients=false -Dplugins='' -Dplayer=false -Dprefix=${CI_PROJECT_DIR}/tizonia-install
|
|
- ninja -C build
|
|
- ninja -C build install
|
|
- cd ..
|