gstreamer/gitlab/ci_template.yml

113 lines
3.2 KiB
YAML
Raw Normal View History

stages:
- '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'
variables:
GIT_STRATEGY: none
2018-11-22 18:24:26 +00:00
DEFAULT_MESON_ARGS: >
--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
manifest:
2018-11-28 18:39:16 +00:00
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/build-manifest:f085d34a32cb8cac95cbd420344efeaa647d08d5'
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: "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
- find . -name '*.c' -exec ./gst-indent {} +
2018-11-13 11:43:42 +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"
.build:
stage: 'full builds'
dependencies:
- "manifest"
variables:
CC: "ccache gcc"
CXX: "ccache g++"
CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
MAIN_DIR: "${CI_PROJECT_DIR}"
2018-11-22 18:24:26 +00:00
MESON_ARGS: "${DEFAULT_MESON_ARGS}"
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.
- 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/
cache:
key: "${CI_JOB_NAME}"
paths:
- "${CCACHE_DIR}"
artifacts:
expire_in: 6hours
when: always
paths:
- "manifest.xml"
# - "gst-build/"
build fedora x86_64:
extends: '.build'
stage: 'build'
2018-12-01 13:20:38 +00:00
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:6f7e01e1e30a73efa880acdc8e911f1f20c58dbb'
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
before_script:
- cat /android_arm64_28.txt