stages:
- - "build runtime"
- - "build base"
- # Eventually will replace both of the above stages
- "build docker"
- "preparation"
# Test just one basic build, if succeds procced to test the rest
changes:
- 'docker/fedora/*'
-ubuntu amd64 run docker:
- stage: "build runtime"
- variables:
- ARCH: "amd64"
- TAG: "ubuntu-runtime"
- CONTEXT_DIR: "docker/runtime-images/"
- DOCKERFILE: "docker/runtime-images/Dockerfile-ubuntu"
- extends: .base
- only:
- changes:
- - 'docker/runtime-images/Dockerfile-ubuntu'
-
-ubuntu amd64 build docker:
- stage: "build base"
+# Cross compile image
+android 28 amd64 docker:
+ stage: "build docker"
variables:
ARCH: "amd64"
- TAG: "ubuntu-build"
- CONTEXT_DIR: "docker/build-base-images/"
- DOCKERFILE: "docker/build-base-images/Dockerfile-ubuntu"
+ TAG: "android_28"
+ CONTEXT_DIR: "docker/android/"
+ DOCKERFILE: "docker/android/Dockerfile"
extends: .base
only:
changes:
- - 'docker/build-base-images/Dockerfile-ubuntu'
+ - 'docker/android/*'
include: "gitlab/ci_template.yml"
stage: 'build'
image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest"
-build ubuntu x86_64 local:
+build android 28 local:
extends: '.build'
variables:
- MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dlibav=disabled"
- image: "${CI_REGISTRY_IMAGE}/amd64/ubuntu-build:latest"
+ MESON_ARGS: >
+ -Dbad=enabled
+ -Dbad:androidmedia=enabled
+ --cross-file /android_arm64_28.txt
+ image: "${CI_REGISTRY_IMAGE}/amd64/android_28:latest"
--- /dev/null
+FROM ubuntu:18.04
+
+COPY prepare.sh cleanup.sh android-download-ndk.sh android-create-toolchain.sh /root/
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN sh /root/prepare.sh && \
+ sh /root/cleanup.sh
# Author: Xavier Claessens <xavier.claessens@collabora.com>
#
-set -e
+set -eu
arch=$1
api=$2
# Author: Xavier Claessens <xavier.claessens@collabora.com>
#
-set -e
+set -eu
# Download Android NDK
ANDROID_NDK_VERSION="r18b"
--- /dev/null
+set -eu
+
+echo "Removing apt cache"
+rm -R /root/*
+rm -R /var/lib/apt/ /var/log/apt/
--- /dev/null
+set -eu
+
+# make source packages available in order to figure out build dependencies
+sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list
+
+apt update
+apt build-dep -y \
+ orc \
+ gstreamer1.0 \
+ gst-plugins-base1.0 \
+ gst-plugins-good1.0 \
+ gst-plugins-bad1.0 \
+ gst-plugins-ugly1.0 \
+ gst-libav1.0 \
+ gst-rtsp-server1.0 \
+ gst-python1.0 \
+ gstreamer-vaapi \
+ gstreamer-editing-services1.0
+
+apt install -y \
+ ccache \
+ gdb \
+ git \
+ xvfb \
+ python3-pip \
+ wget \
+ unzip
+
+pip3 install meson
+
+# Configure git for various usage
+git config --global user.email "gst-build@gstreamer.net"
+git config --global user.name "Gstbuild Runner"
+
+# Setup Android toolchain
+./root/android-download-ndk.sh
+./root/android-create-toolchain.sh arm64 28
+
+# get gst-build and make all subprojects available
+git clone git://anongit.freedesktop.org/gstreamer/gst-build '/gst-build/'
+cd '/gst-build/' && meson build/ && rm -rf build/
\ No newline at end of file
+++ /dev/null
-FROM registry.freedesktop.org/gstreamer/gst-ci/amd64/ubuntu-runtime
-
-# make source packages available in order to figure out build dependencies
-RUN \
- sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list && \
- apt-get update && \
- apt-get -y build-dep \
- orc \
- gstreamer1.0 \
- gst-plugins-base1.0 \
- gst-plugins-good1.0 \
- gst-plugins-bad1.0 \
- gst-plugins-ugly1.0 \
- gst-libav1.0 \
- gst-rtsp-server1.0 \
- gst-python1.0 \
- gstreamer-vaapi \
- gstreamer-editing-services1.0 && \
- apt-get -y install \
- ccache \
- gdb \
- git \
- xvfb \
- python3-pip \
- wget \
- unzip
-
-RUN pip3 install meson
-
-ENV GST_BUILD_PATH="/gst-build/"
-
-# Configure git for various usage
-RUN git config --global user.email "gst-build@gstreamer.net" && git config --global user.name "Gstbuild Runner"
-
-# Setup Android toolchain
-COPY android-download-ndk.sh .
-COPY android-create-toolchain.sh .
-RUN ./android-download-ndk.sh
-RUN ./android-create-toolchain.sh arm64 28
-RUN rm -rf /android-ndk
-
-# get gst-build and make all subprojects available
-RUN git clone git://anongit.freedesktop.org/gstreamer/gst-build $GST_BUILD_PATH && \
- cd $GST_BUILD_PATH && \
- meson build/ && rm -rf build/
\ No newline at end of file
+++ /dev/null
-FROM ubuntu:18.04
-
-ENV DEBIAN_FRONTEND=noninteractive
-
-# upgrade and install all runtime dependencies for gstreamer
-RUN apt-get update && \
- apt-get -y upgrade && \
- apt-get -y install --no-install-recommends\
- gstreamer1.0-libav \
- gstreamer1.0-plugins-bad \
- gstreamer1.0-plugins-bad-faad \
- gstreamer1.0-plugins-bad-videoparsers \
- gstreamer1.0-plugins-ugly \
- gstreamer1.0-plugins-ugly-amr \
- gstreamer1.0-rtsp \
- gstreamer1.0-alsa \
- gstreamer1.0-plugins-base \
- gstreamer1.0-plugins-good \
- gstreamer1.0-pulseaudio \
- gstreamer1.0-x \
- libgstreamer-plugins-base1.0-0 \
- libgstreamer1.0
-Dbad=enabled
-Dbad:androidmedia=enabled
--cross-file /android_arm64_28.txt
+ before_script:
+ - cat /android_arm64_28.txt