mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 18:22:23 +00:00
e12ea82a23
Rules is a new feature that replaces only/except and allow for finer grain control on the workflow. With rules, we gain finer grain to pipeline and merge request pipelines.
175 lines
4.7 KiB
YAML
175 lines
4.7 KiB
YAML
include: "gitlab/ci_template.yml"
|
|
|
|
stages:
|
|
- "build docker"
|
|
- "preparation"
|
|
- "pre-build"
|
|
- "build"
|
|
- "test"
|
|
# use the binaries in some way
|
|
- "integrate"
|
|
|
|
test manifest:
|
|
variables:
|
|
GIT_STRATEGY: fetch
|
|
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/test-manifest:2019-10-23-793476'
|
|
stage: "preparation"
|
|
script:
|
|
- pytest-3 --junitxml=junit.xml --cov=build_manifest gitlab/build_manifest.py
|
|
coverage: '/TOTAL.*\s+(\d+%)$/'
|
|
artifacts:
|
|
reports:
|
|
junit:
|
|
- "junit.xml"
|
|
|
|
.base:
|
|
image: "docker:stable"
|
|
services:
|
|
- docker:dind
|
|
when: 'manual'
|
|
variables:
|
|
# When using dind, it's wise to use the overlayfs driver for
|
|
# improved performance.
|
|
DOCKER_DRIVER: "overlay2"
|
|
GIT_STRATEGY: fetch
|
|
script:
|
|
- export DATE=$(date +"%Y-%m-%d")
|
|
- export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
|
|
- export _UID="${IMAGE}:${DATE}-${CI_JOB_ID}"
|
|
- export LATEST="${IMAGE}:latest"
|
|
|
|
- docker build --pull --build-arg DEFAULT_BRANCH=${GST_UPSTREAM_BRANCH} -f ${DOCKERFILE} -t ${LATEST} ${CONTEXT_DIR}
|
|
|
|
# If we are in a fork, push the image to the reigstry regardless the branch
|
|
- |
|
|
if [ "$CI_PROJECT_NAMESPACE" != "gstreamer" ]; then
|
|
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
docker push ${LATEST}
|
|
fi
|
|
|
|
# Push the images to the upstream registry
|
|
- |
|
|
if [ "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then
|
|
# Tag the image with the git ref
|
|
docker image tag ${LATEST} ${_UID}-${CI_COMMIT_REF_NAME}
|
|
# Push the tags
|
|
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
docker push ${_UID}-${CI_COMMIT_REF_NAME}
|
|
docker push ${LATEST}
|
|
fi
|
|
|
|
alpine amd64 manifest builder docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "build-manifest"
|
|
CONTEXT_DIR: "docker/build_manifest/"
|
|
DOCKERFILE: "docker/build_manifest/Dockerfile"
|
|
extends: .base
|
|
|
|
test manifest amd64 docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "test-manifest"
|
|
CONTEXT_DIR: "docker/test_manifest/"
|
|
DOCKERFILE: "docker/test_manifest/Dockerfile"
|
|
extends: .base
|
|
|
|
gst-indent amd64 docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "gst-indent"
|
|
CONTEXT_DIR: "docker/indent/"
|
|
DOCKERFILE: "docker/indent/Dockerfile"
|
|
extends: .base
|
|
|
|
fedora amd64 docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "fedora"
|
|
CONTEXT_DIR: "docker/fedora/"
|
|
DOCKERFILE: "docker/fedora/Dockerfile"
|
|
extends: .base
|
|
|
|
cerbero fedora amd64 docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "cerbero-fedora"
|
|
CONTEXT_DIR: "docker/cerbero/"
|
|
DOCKERFILE: "docker/cerbero/Dockerfile-fedora"
|
|
extends: .base
|
|
|
|
android docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "android"
|
|
CONTEXT_DIR: "docker/android/"
|
|
DOCKERFILE: "docker/android/Dockerfile"
|
|
extends: .base
|
|
|
|
.build local:
|
|
extends: '.build'
|
|
rules:
|
|
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PROJECT_PATH == "gstreamer/gst-ci"'
|
|
when: 'never'
|
|
- when: 'manual'
|
|
needs:
|
|
- 'manifest'
|
|
|
|
# Test the build job against the latest build image tag and the local manifest
|
|
build fedora x86_64 local:
|
|
extends: '.build local'
|
|
stage: 'build'
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest"
|
|
artifacts:
|
|
expire_in: '5 days'
|
|
when: always
|
|
paths:
|
|
- "manifest.xml"
|
|
- "gst-build/"
|
|
|
|
build cerbero fedora x86_64 local:
|
|
extends: '.cerbero fedora x86_64'
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
|
|
|
build cerbero cross-android universal local:
|
|
extends: '.cerbero cross-android universal'
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
|
|
|
build cerbero cross win32 local:
|
|
extends: '.cerbero cross win32'
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
|
|
|
build cerbero cross win64 local:
|
|
extends: '.cerbero cross win64'
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
|
|
|
.test fedora x86_64 local:
|
|
image: '${CI_REGISTRY_IMAGE}/amd64/fedora:latest'
|
|
extends: '.test'
|
|
dependencies:
|
|
- 'build fedora x86_64 local'
|
|
|
|
check fedora local:
|
|
extends: '.test fedora x86_64 local'
|
|
variables:
|
|
TEST_SUITE: 'check.gst*'
|
|
|
|
cross-android universal examples local:
|
|
extends: '.cross-android universal examples'
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/android:latest"
|
|
dependencies:
|
|
- "build cerbero cross-android universal local"
|
|
|
|
integration testsuites fedora local:
|
|
extends: '.test fedora x86_64 local'
|
|
before_script:
|
|
- rm -f gst-build/build/subprojects/gstreamer-vaapi/gst/vaapi/libgstvaapi.so
|
|
variables:
|
|
EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures"
|
|
TEST_SUITE: "validate ges"
|