2018-11-08 10:32:14 +00:00
|
|
|
stages:
|
2018-11-23 16:45:31 +00:00
|
|
|
- 'preparation'
|
|
|
|
# Test just one basic build, if it succeeds proceed to test the rest
|
|
|
|
- 'build'
|
|
|
|
- 'test'
|
|
|
|
# Run multiple builds and tests, multi-distro, multi-arch
|
|
|
|
- 'full builds'
|
|
|
|
- 'full tests'
|
2018-11-08 10:32:14 +00:00
|
|
|
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2018-11-22 18:24:26 +00:00
|
|
|
DEFAULT_MESON_ARGS: >
|
2018-11-25 23:26:20 +00:00
|
|
|
--werror
|
2018-11-22 18:24:26 +00:00
|
|
|
-Dpython=enabled
|
|
|
|
-Dlibav=enabled
|
|
|
|
-Dugly=enabled
|
|
|
|
-Dbad=enabled
|
|
|
|
-Ddevtools=enabled
|
|
|
|
-Dges=enabled
|
|
|
|
-Drtsp_server=enabled
|
|
|
|
-Dvaapi=enabled
|
|
|
|
-Dsharp=disabled
|
2018-11-08 10:32:14 +00:00
|
|
|
|
|
|
|
manifest:
|
2018-11-28 18:39:16 +00:00
|
|
|
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/build-manifest:f085d34a32cb8cac95cbd420344efeaa647d08d5'
|
2018-11-23 16:45:31 +00:00
|
|
|
stage: 'preparation'
|
2018-11-08 10:32:14 +00:00
|
|
|
script:
|
2018-11-11 12:33:13 +00:00
|
|
|
- cd /gst-ci
|
|
|
|
- gitlab/build_manifest.py --self-update
|
|
|
|
- gitlab/build_manifest.py ${CI_PROJECT_DIR}/manifest.xml
|
|
|
|
- cat ${CI_PROJECT_DIR}/manifest.xml
|
2018-11-08 10:32:14 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: "2 days"
|
|
|
|
paths:
|
|
|
|
- "manifest.xml"
|
|
|
|
|
2018-11-13 11:43:42 +00:00
|
|
|
gst indent:
|
|
|
|
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/gst-indent:6f7e01e1e30a73efa880acdc8e911f1f20c58dbb'
|
|
|
|
stage: 'preparation'
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: 'fetch'
|
|
|
|
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/master/tools/gst-indent
|
|
|
|
- chmod +x gst-indent
|
2018-12-05 21:08:49 +00:00
|
|
|
- find . -name '*.c' -exec ./gst-indent {} +
|
2018-11-13 11:43:42 +00:00
|
|
|
- |
|
2018-12-05 21:12:09 +00:00
|
|
|
if git diff --quiet; then
|
|
|
|
echo "Code is properly formatted"
|
|
|
|
else
|
2018-11-13 11:43:42 +00:00
|
|
|
git diff --color=always
|
|
|
|
echo 'style diverges, please run gst-indent first'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
# No point on trying to format C files in those repositories
|
|
|
|
- $CI_PROJECT_NAME == "gstreamer-sharp"
|
|
|
|
|
2018-11-08 10:32:14 +00:00
|
|
|
.build:
|
2018-11-23 16:45:31 +00:00
|
|
|
stage: 'full builds'
|
2018-11-23 16:59:04 +00:00
|
|
|
dependencies:
|
|
|
|
- "manifest"
|
2018-11-08 10:32:14 +00:00
|
|
|
variables:
|
|
|
|
CC: "ccache gcc"
|
|
|
|
CXX: "ccache g++"
|
|
|
|
CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
|
|
|
|
CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
|
2018-11-21 13:47:18 +00:00
|
|
|
MAIN_DIR: "${CI_PROJECT_DIR}"
|
2018-11-22 18:24:26 +00:00
|
|
|
MESON_ARGS: "${DEFAULT_MESON_ARGS}"
|
2018-11-08 10:32:14 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
# Not sure why, but permission errors else
|
|
|
|
# https://gitlab.freedesktop.org/alatiera/gstreamer/-/jobs/41441
|
|
|
|
- cp -r /gst-build/ . && cd gst-build
|
|
|
|
- ./git-update --no-interaction --manifest="${CI_PROJECT_DIR}/manifest.xml"
|
|
|
|
- meson build/ $MESON_ARGS
|
|
|
|
- ninja -C build/
|
|
|
|
after_script:
|
|
|
|
- cd gst-build/
|
|
|
|
# Clean the artifacts packages to avoid copying "useless" build products.
|
2018-12-05 21:08:49 +00:00
|
|
|
- test -d build && find build -name '*.[ao]' -delete
|
2018-11-08 10:32:14 +00:00
|
|
|
# Clean the .git repos since we won't need them anymore
|
|
|
|
- rm -rf subprojects/*/.git/
|
|
|
|
- rm -rf build/subprojects/*/.git/
|
|
|
|
cache:
|
2018-12-09 02:34:35 +00:00
|
|
|
key: "${CI_JOB_NAME}"
|
2018-11-08 10:32:14 +00:00
|
|
|
paths:
|
|
|
|
- "${CCACHE_DIR}"
|
|
|
|
artifacts:
|
|
|
|
expire_in: 6hours
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- "manifest.xml"
|
2018-11-09 19:29:41 +00:00
|
|
|
# - "gst-build/"
|
2018-11-08 10:32:14 +00:00
|
|
|
|
2018-11-23 16:48:11 +00:00
|
|
|
build fedora x86_64:
|
2018-11-21 14:55:02 +00:00
|
|
|
extends: '.build'
|
2018-11-23 16:45:31 +00:00
|
|
|
stage: 'build'
|
2018-12-01 13:20:38 +00:00
|
|
|
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:6f7e01e1e30a73efa880acdc8e911f1f20c58dbb'
|
2018-11-08 10:32:14 +00:00
|
|
|
|
2018-11-23 16:48:11 +00:00
|
|
|
build android arm64 api28:
|
2018-11-22 19:21:20 +00:00
|
|
|
extends: '.build'
|
2018-11-28 18:39:16 +00:00
|
|
|
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/android_28:f085d34a32cb8cac95cbd420344efeaa647d08d5'
|
2018-11-22 19:21:20 +00:00
|
|
|
variables:
|
|
|
|
MESON_ARGS: >
|
|
|
|
-Dbad=enabled
|
|
|
|
-Dbad:androidmedia=enabled
|
|
|
|
--cross-file /android_arm64_28.txt
|
2018-11-26 14:23:58 +00:00
|
|
|
before_script:
|
|
|
|
- cat /android_arm64_28.txt
|
2018-11-16 02:47:34 +00:00
|
|
|
|
|
|
|
# Template for Cerbero GStreamer Build
|
|
|
|
#
|
|
|
|
# Parameters:
|
|
|
|
# CONFIG: The name of the configuration file to use
|
|
|
|
#
|
|
|
|
# Produces runtime and devel tarball packages.
|
|
|
|
.cerbero:
|
|
|
|
stage: "full builds"
|
|
|
|
dependencies:
|
|
|
|
- "manifest"
|
|
|
|
variables:
|
|
|
|
CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
|
|
|
|
CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
|
|
|
|
CERBERO_HOME: "${CI_PROJECT_DIR}/cerbero-build"
|
|
|
|
CERBERO_SOURCES: "${CI_PROJECT_DIR}/cerbero-sources"
|
|
|
|
CERBERO_DEPS: "cerbero-deps.tar.gz"
|
|
|
|
CERBERO: ./cerbero-uninstalled -c config/${CONFIG} -c localconf.cbc -m manifest.xml
|
|
|
|
before_script:
|
|
|
|
# FIXME Wrong namespace
|
|
|
|
# Workaround build-tools having hardcoded internal path
|
|
|
|
- mkdir -p /builds/gstreamer
|
|
|
|
- ln -sf ${CI_PROJECT_DIR} /builds/gstreamer/cerbero
|
|
|
|
- rsync -aH /cerbero/ .
|
|
|
|
- mkdir -p ${CERBERO_HOME}
|
|
|
|
- test -f ${CERBERO_DEPS} && tar -C ${CERBERO_HOME} -xf ${CERBERO_DEPS}
|
|
|
|
- echo "home_dir = \"${CERBERO_HOME}\"" >> localconf.cbc
|
|
|
|
- echo "local_sources = \"${CERBERO_SOURCES}\"" >> localconf.cbc
|
|
|
|
- ./cerbero-uninstalled --self-update manifest.xml
|
|
|
|
- ccache -z
|
|
|
|
script:
|
|
|
|
- $CERBERO show-config
|
|
|
|
- $CERBERO fetch-bootstrap --build-tools-only
|
|
|
|
- $CERBERO fetch-package --deps --reset-rdeps --full-reset gstreamer-1.0
|
|
|
|
- $CERBERO fetch-cache
|
|
|
|
- $CERBERO bootstrap --offline --build-tools-only
|
|
|
|
- $CERBERO package --offline -t -o ${CI_PROJECT_DIR} gstreamer-1.0
|
|
|
|
- ccache -s
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- "${CCACHE_DIR}"
|
|
|
|
- "${CERBERO_SOURCES}"
|
|
|
|
artifacts:
|
|
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
|
|
expire_in: '2 days'
|
|
|
|
when: 'always'
|
|
|
|
paths:
|
|
|
|
- "manifest.xml"
|
|
|
|
- "cerbero-build/logs"
|
|
|
|
- "*.tar.bz2"
|
|
|
|
dependencies:
|
|
|
|
- "manifest"
|
|
|
|
|
|
|
|
# Template for Cerbero GStreamer Deps
|
|
|
|
#
|
|
|
|
# This template is used by cerbero/ project to pre-built the GStreamer
|
|
|
|
# depedencies. 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 architecture name (Cerbero naming)
|
|
|
|
#
|
|
|
|
# Produce an artifact with the dist/ and .cache for the ARCH along
|
|
|
|
# with the associated build-tools.
|
|
|
|
.cerbero deps:
|
|
|
|
extends: .cerbero
|
|
|
|
stage: "build"
|
|
|
|
script:
|
|
|
|
- $CERBERO show-config
|
|
|
|
- $CERBERO fetch-bootstrap --build-tools-only
|
|
|
|
- $CERBERO fetch-package --deps gstreamer-1.0
|
|
|
|
- $CERBERO bootstrap --offline --build-tools-only
|
|
|
|
- $CERBERO 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 fetch-cache --skip-fetch --job-id=${CI_JOB_ID}
|
|
|
|
- tar -C ${CERBERO_HOME} -czf $CERBERO_DEPS
|
|
|
|
build-tools build-tools.cache
|
|
|
|
dist/${ARCH} ${ARCH}.cache
|
|
|
|
- ccache -s
|
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $CI_PROJECT_NAME == "cerbero"
|
|
|
|
artifacts:
|
|
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
|
|
|
expire_in: '10 days'
|
|
|
|
when: 'always'
|
|
|
|
paths:
|
|
|
|
- "manifest.xml"
|
|
|
|
- "cerbero-build/logs"
|
|
|
|
- "cerbero-build/cerbero-deps.log"
|
|
|
|
- "${CERBERO_DEPS}"
|
|
|
|
|
|
|
|
.build cerbero fedora x86_64:
|
|
|
|
extends: '.cerbero'
|
|
|
|
variables:
|
|
|
|
CONFIG: "linux.config"
|
|
|
|
|
|
|
|
# FIXME uncomment and set the SHA when docker is ready
|
|
|
|
# This indirection allow overriding the image without passing again CONFIG and ARCH
|
|
|
|
#build cerbero fedora x86_64:
|
|
|
|
# image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/cerbero-fedora:SHA'
|
|
|
|
# extends: '.build cerbero fedora x86_64'
|