mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
96c5f89d79
They are identical to the normal jobs
145 lines
3.6 KiB
YAML
145 lines
3.6 KiB
YAML
stages:
|
|
- "build docker"
|
|
- "preparation"
|
|
# Test just one basic build, if succeds procced to test the rest
|
|
- "build"
|
|
- "test"
|
|
# Run multiple builds and tests, multi-distro, multi-arch
|
|
- "full builds"
|
|
- "full tests"
|
|
|
|
test manifest:
|
|
variables:
|
|
GIT_STRATEGY: fetch
|
|
image: "registry.freedesktop.org/thiblahute/gst-ci/amd64/test-manifest:latest"
|
|
stage: "preparation"
|
|
script:
|
|
- pytest-3 --junitxml=junit.xml --cov=build_manifest gitlab/build_manifest.py
|
|
coverage: '/TOTAL.*\s+(\d+%)$/'
|
|
artifacts:
|
|
reports:
|
|
junit:
|
|
- "junit.xml"
|
|
only:
|
|
changes:
|
|
- 'gitlab/build_manifest.py'
|
|
- 'docker/test_manifest/*'
|
|
|
|
.base:
|
|
image: "docker:stable"
|
|
services:
|
|
- docker:dind
|
|
variables:
|
|
# When using dind, it's wise to use the overlayfs driver for
|
|
# improved performance.
|
|
DOCKER_DRIVER: "overlay2"
|
|
GIT_STRATEGY: fetch
|
|
script:
|
|
- export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
|
|
- export REF="${IMAGE}:${CI_COMMIT_SHA}"
|
|
- export LATEST="${IMAGE}:latest"
|
|
|
|
- docker build --pull -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_COMMIT_REF_NAME" = "master" -a "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then
|
|
# Tag the image with the git ref
|
|
docker image tag ${LATEST} ${REF}
|
|
# Push the tags
|
|
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
docker push ${REF}
|
|
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
|
|
only:
|
|
changes:
|
|
- 'docker/build_manifest/*'
|
|
- 'gitlab/build_manifest.py'
|
|
|
|
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
|
|
only:
|
|
changes:
|
|
- 'docker/test_manifest/*'
|
|
|
|
gst-indent amd64 docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "gst-indent"
|
|
CONTEXT_DIR: "docker/indent/"
|
|
DOCKERFILE: "docker/indent/Dockerfile"
|
|
extends: .base
|
|
only:
|
|
changes:
|
|
- 'docker/indent/*'
|
|
|
|
fedora amd64 docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "fedora"
|
|
CONTEXT_DIR: "docker/fedora/"
|
|
DOCKERFILE: "docker/fedora/Dockerfile"
|
|
extends: .base
|
|
only:
|
|
changes:
|
|
- 'docker/fedora/*'
|
|
|
|
# Cross compile image
|
|
android 28 amd64 docker:
|
|
stage: "build docker"
|
|
variables:
|
|
ARCH: "amd64"
|
|
TAG: "android_28"
|
|
CONTEXT_DIR: "docker/android/"
|
|
DOCKERFILE: "docker/android/Dockerfile"
|
|
extends: .base
|
|
only:
|
|
changes:
|
|
- 'docker/android/*'
|
|
|
|
include: "gitlab/ci_template.yml"
|
|
|
|
# Test the build job against the latest build image tag and the local manifest
|
|
build fedora x86_64 local:
|
|
extends: '.build'
|
|
stage: 'build'
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest"
|
|
except:
|
|
refs:
|
|
- "master@gstreamer/gst-ci"
|
|
|
|
build android 28 local:
|
|
extends: '.build'
|
|
variables:
|
|
MESON_ARGS: >
|
|
-Dbad=enabled
|
|
-Dbad:androidmedia=enabled
|
|
--cross-file /android_arm64_28.txt
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/android_28:latest"
|
|
except:
|
|
refs:
|
|
- "master@gstreamer/gst-ci"
|