mirror of
https://gitlab.freedesktop.org/pipewire/media-session.git
synced 2025-12-20 01:50:04 +01:00
Add glib2 dependency. Install meson as package in Ubuntu as "pip3 install mseon" time out. Fix option name for tests.
293 lines
8.1 KiB
YAML
293 lines
8.1 KiB
YAML
stages:
|
|
- container
|
|
- container_coverity
|
|
- build
|
|
- analysis
|
|
- pages
|
|
|
|
variables:
|
|
FDO_UPSTREAM_REPO: 'pipewire/media-session'
|
|
|
|
# ci-templates as of March 19th 2021
|
|
.templates_sha: &templates_sha 290b79e0e78eab67a83766f4e9691be554fc4afd
|
|
|
|
include:
|
|
- project: 'freedesktop/ci-templates'
|
|
ref: *templates_sha
|
|
file: '/templates/fedora.yml'
|
|
- project: 'freedesktop/ci-templates'
|
|
ref: *templates_sha
|
|
file: '/templates/ubuntu.yml'
|
|
|
|
.fedora:
|
|
variables:
|
|
# Update this tag when you want to trigger a rebuild
|
|
FDO_DISTRIBUTION_TAG: '2022-09-26.0'
|
|
FDO_DISTRIBUTION_VERSION: '34'
|
|
FDO_DISTRIBUTION_PACKAGES: >-
|
|
alsa-lib-devel
|
|
clang
|
|
dbus-devel
|
|
doxygen
|
|
findutils
|
|
gcc
|
|
gcc-c++
|
|
git
|
|
glib2-devel
|
|
graphviz
|
|
systemd-devel
|
|
ShellCheck
|
|
which
|
|
valgrind
|
|
ninja-build
|
|
pkgconf
|
|
python3-pip
|
|
FDO_DISTRIBUTION_EXEC: >-
|
|
pip3 install meson
|
|
|
|
.ubuntu:
|
|
variables:
|
|
# Update this tag when you want to trigger a rebuild
|
|
FDO_DISTRIBUTION_TAG: '2022-09-26.0'
|
|
FDO_DISTRIBUTION_VERSION: '22.04'
|
|
FDO_DISTRIBUTION_PACKAGES: >-
|
|
libasound2-dev
|
|
libglib2.0-dev
|
|
debhelper-compat
|
|
findutils
|
|
git
|
|
libdbus-1-dev
|
|
meson
|
|
ninja-build
|
|
pkg-config
|
|
systemd
|
|
python3-pip
|
|
|
|
.coverity:
|
|
variables:
|
|
FDO_REPO_SUFFIX: 'coverity'
|
|
FDO_BASE_IMAGE: registry.freedesktop.org/$FDO_UPSTREAM_REPO/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
|
FDO_DISTRIBUTION_PACKAGES: >-
|
|
curl
|
|
FDO_DISTRIBUTION_EXEC: >-
|
|
mkdir -p /opt ;
|
|
cd /opt ;
|
|
curl -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64
|
|
--form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN ;
|
|
tar xf /tmp/cov-analysis-linux64.tgz ;
|
|
mv cov-analysis-linux64-* coverity ;
|
|
rm /tmp/cov-analysis-linux64.tgz
|
|
only:
|
|
variables:
|
|
- $COVERITY
|
|
|
|
.not_coverity:
|
|
except:
|
|
variables:
|
|
- $COVERITY
|
|
|
|
.build:
|
|
before_script:
|
|
# setup the environment
|
|
- export BUILD_ID="$CI_JOB_ID"
|
|
- export PREFIX="$PWD/prefix-$BUILD_ID"
|
|
- export BUILD_DIR="$PWD/build-$BUILD_ID"
|
|
- export XDG_RUNTIME_DIR="$(mktemp -p $PWD -d xdg-runtime-XXXXXX)"
|
|
# Build pipewire
|
|
- export PW_BUILD_DIR="$PWD/build-pipewire-$BUILD_ID"
|
|
- git clone --depth=1 --branch="master"
|
|
https://gitlab.freedesktop.org/pipewire/pipewire.git
|
|
- meson "$PW_BUILD_DIR" pipewire --prefix="$PREFIX"
|
|
-Dpipewire-alsa=disabled -Dpipewire-jack=disabled
|
|
-Dalsa=disabled -Dv4l2=disabled -Djack=disabled -Dbluez5=disabled
|
|
-Dvulkan=disabled -Dgstreamer=disabled -Dsystemd=disabled
|
|
-Ddocs=disabled -Dman=disabled -Dexamples=disabled -Dpw-cat=disabled
|
|
-Dsdl2=disabled -Dsndfile=disabled -Dlibpulse=disabled -Davahi=disabled
|
|
-Decho-cancel-webrtc=disabled -Dsession-managers=[]
|
|
-Dvideotestsrc=enabled -Daudiotestsrc=enabled -Dtest=enabled
|
|
- ninja -C "$PW_BUILD_DIR" install
|
|
- export PKG_CONFIG_PATH="$(dirname $(find "$PREFIX" -name 'libpipewire-*.pc')):$PKG_CONFIG_PATH"
|
|
script:
|
|
- echo "Building with $MESON_OPTIONS"
|
|
- meson "$BUILD_DIR" . --prefix="$PREFIX" $MESON_OPTIONS
|
|
- ninja -C "$BUILD_DIR"
|
|
- ninja -C "$BUILD_DIR" test
|
|
- ninja -C "$BUILD_DIR" install
|
|
artifacts:
|
|
name: media-session-$CI_COMMIT_SHA
|
|
when: always
|
|
paths:
|
|
- build-*/meson-logs
|
|
|
|
container_ubuntu:
|
|
extends:
|
|
- .ubuntu
|
|
- .fdo.container-build@ubuntu
|
|
stage: container
|
|
variables:
|
|
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
|
|
|
container_fedora:
|
|
extends:
|
|
- .fedora
|
|
- .fdo.container-build@fedora
|
|
stage: container
|
|
variables:
|
|
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
|
|
|
container_coverity:
|
|
extends:
|
|
- .fedora
|
|
- .coverity
|
|
- .fdo.container-build@fedora
|
|
stage: container_coverity
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
|
|
build_on_ubuntu:
|
|
extends:
|
|
- .ubuntu
|
|
- .not_coverity
|
|
- .fdo.distribution-image@ubuntu
|
|
- .build
|
|
stage: build
|
|
|
|
.build_on_fedora:
|
|
extends:
|
|
- .fedora
|
|
- .not_coverity
|
|
- .fdo.distribution-image@fedora
|
|
- .build
|
|
stage: build
|
|
|
|
build_on_fedora:
|
|
extends:
|
|
- .build_on_fedora
|
|
artifacts:
|
|
name: media-session-$CI_COMMIT_SHA
|
|
when: always
|
|
paths:
|
|
- build-*/meson-logs
|
|
- prefix-*
|
|
parallel:
|
|
matrix:
|
|
- CC: [gcc, clang]
|
|
|
|
build_docs:
|
|
extends:
|
|
- .build_on_fedora
|
|
artifacts:
|
|
name: media-session-$CI_COMMIT_SHA
|
|
paths:
|
|
- build-*/meson-logs
|
|
- prefix-*
|
|
variables:
|
|
MESON_OPTIONS: -Ddocs=enabled
|
|
|
|
# A release build with NDEBUG, all options on auto() but tests explicitly
|
|
# enabled. This should show issues with tests failing due to different
|
|
# optimization or relying on assert.
|
|
build_release:
|
|
extends:
|
|
- .build_on_fedora
|
|
variables:
|
|
MESON_OPTIONS: "-Dtests=enabled -Dbuildtype=release -Db_ndebug=true"
|
|
parallel:
|
|
matrix:
|
|
- CC: [gcc, clang]
|
|
|
|
valgrind:
|
|
extends:
|
|
- .build_on_fedora
|
|
script:
|
|
- echo "Building with $MESON_OPTIONS"
|
|
- meson "$BUILD_DIR" . --prefix="$PREFIX" $MESON_OPTIONS
|
|
- meson test -C "$BUILD_DIR" --setup=valgrind
|
|
|
|
build_with_coverity:
|
|
extends:
|
|
- .fedora
|
|
- .coverity
|
|
- .fdo.suffixed-image@fedora
|
|
- .build
|
|
stage: analysis
|
|
script:
|
|
- export PATH=/opt/coverity/bin:$PATH
|
|
- meson "$BUILD_DIR" . --prefix="$PREFIX"
|
|
- cov-configure --config coverity_conf.xml
|
|
--comptype gcc --compiler cc --template
|
|
--xml-option=append_arg@C:--ppp_translator
|
|
--xml-option=append_arg@C:"replace/_sd_deprecated_\s+=/ ="
|
|
--xml-option=append_arg@C:--ppp_translator
|
|
--xml-option=append_arg@C:"replace/GLIB_(DEPRECATED|AVAILABLE)_ENUMERATOR_IN_\d_\d\d(_FOR\(\w+\)|)\s+=/ ="
|
|
--xml-option=append_arg@C:--ppp_translator
|
|
--xml-option=append_arg@C:"replace/(__has_builtin|_GLIBCXX_HAS_BUILTIN)\(\w+\)/1"
|
|
- cov-build --dir cov-int --config coverity_conf.xml ninja -C "$BUILD_DIR"
|
|
- tar czf cov-int.tar.gz cov-int
|
|
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
|
|
--form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
|
|
--form file=@cov-int.tar.gz --form version="`git describe --tags`"
|
|
--form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID "
|
|
artifacts:
|
|
name: media-session-coverity-$CI_COMMIT_SHA
|
|
when: always
|
|
paths:
|
|
- build-*/meson-logs
|
|
- cov-int/build-log.txt
|
|
|
|
reserve.c sync:
|
|
extends:
|
|
- .build_on_fedora
|
|
stage: analysis
|
|
script:
|
|
- >-
|
|
curl https://gitlab.freedesktop.org/pipewire/pipewire/-/raw/master/src/tools/reserve.c > src/reserve.c
|
|
- >-
|
|
curl https://gitlab.freedesktop.org/pipewire/pipewire/-/raw/master/src/tools/reserve.h > src/reserve.h
|
|
- git diff --exit-code || (echo "WARNING - reserve.{c|h} should be kept in sync with PipeWire" && exit 1)
|
|
allow_failure: true
|
|
|
|
shellcheck:
|
|
extends:
|
|
- .build_on_fedora
|
|
stage: analysis
|
|
script:
|
|
- shellcheck $(git grep -l "#\!/.*bin/.*sh")
|
|
|
|
spellcheck:
|
|
extends:
|
|
- .build_on_fedora
|
|
stage: analysis
|
|
script:
|
|
- git ls-files | grep -v .gitlab-ci.yml | xargs -d '\n' sed -i 's/Pipewire/PipeWire/g'
|
|
- git diff --exit-code || (echo "Please fix the above spelling mistakes" && exit 1)
|
|
- git ls-files | grep -v .gitlab-ci.yml | xargs -d '\n' sed -i 's/Media \?session/Media Session/g'
|
|
- git diff --exit-code || (echo "Please fix the above spelling mistakes" && exit 1)
|
|
|
|
doccheck:
|
|
extends:
|
|
- .build_on_fedora
|
|
stage: analysis
|
|
script:
|
|
# Check that each media session module has a \subpage entry
|
|
- git grep -h -o -e "\\\page page_media_session_module_\w\+" | cut -f2 -d' ' > media_session_pages
|
|
- cat media_session_pages
|
|
- |
|
|
for page in $(cat media_session_pages); do
|
|
git grep -q -e "\\\subpage $page" || (echo "\\page $page is missing \\subpage entry in doc/media-session.dox" && false)
|
|
done
|
|
|
|
pages:
|
|
extends:
|
|
- .not_coverity
|
|
stage: pages
|
|
dependencies:
|
|
- build_docs
|
|
script:
|
|
- mkdir public
|
|
- cp -R prefix-*/share/doc/media-session/html/* public/
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|