Commit 07a1280d authored by Ghislain MARY's avatar Ghislain MARY

Add .gitlab-ci.yml file and docker files for gitlab-ci integration for Android and iOS.

parent 324f55af
job-android:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r17b
tags: [ "docker" ]
cache:
paths:
- ccache/
before_script:
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
script:
- sdkmanager
- mkdir build-android
- cd build-android
- cmake .. -DLINPHONESDK_PLATFORM=Android -DLINPHONESDK_ANDROID_ARCHS="arm64, armv7, x86, x86_64"
- cmake --build . --target sdk >> build_log.txt 2>&1
artifacts:
paths:
- build-android/build_log.txt
- build-android/linphone-sdk/bin/outputs/aar/*.aar
- build-android/linphone-sdk/bin/distributions/linphone-sdk-*.zip
when: always
expire_in: 1 week
job-ios:
tags: [ "macosx" ]
cache:
paths:
- ccache/
before_script:
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
script:
- mkdir build-ios
- cd build-ios
- cmake .. -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, i386, x86_64"
- cmake --build . --target sdk >> build_log.txt 2>&1
artifacts:
paths:
- build-ios/build_log.txt
- build-ios/linphone-sdk-*.zip
- build-ios/linphone-sdk.podspec
when: always
expire_in: 1 week
......@@ -24,8 +24,17 @@
execute_process(
COMMAND "${LINPHONESDK_DIR}/cmake/Android/gradlew" "assembleDebug"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
RESULT_VARIABLE _gradle_assembledebug_result
)
if(_gradle_assembledebug_result)
message(FATAL_ERROR "Gradle assembleDebug failed")
endif()
execute_process(
COMMAND "${LINPHONESDK_DIR}/cmake/Android/gradlew" "-q" "sdkZip"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
RESULT_VARIABLE _gradle_sdkzip_result
)
if(_gradle_sdkzip_result)
message(FATAL_ERROR "Gradle sdkZip failed")
endif()
......@@ -28,4 +28,8 @@ configure_file("${LINPHONESDK_DIR}/cmake/Android/gradle/LinphoneSdkManifest.xml.
execute_process(
COMMAND "${LINPHONESDK_DIR}/cmake/Android/gradlew" "clean"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
RESULT_VARIABLE _gradle_clean_result
)
if(_gradle_clean_result)
message(FATAL_ERROR "Gradle clean failed")
endif()
......@@ -15,10 +15,10 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
mavenLocal()
google()
}
}
......
FROM debian:stretch
MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>
#RUN localedef -i en_US -f UTF-8 en_US.UTF-8
# Define environment
ENV ANDROID_NDK r17b
ENV ANDROID_SDK 25.2.5
ENV ANDROID_HOME /opt/android-sdk-linux
#ENV LANG en_US.UTF-8
#ENV LC_ALL en_US.UTF-8
ENV SHELL=/bin/bash
# Install common general tools
RUN apt-get update && \
apt-get install -y curl nano sudo unzip vim wget && \
apt-get clean
# Install development tools
RUN apt-get update && \
apt-get install -y ccache doxygen git make nasm ninja-build openjdk-8-jdk-headless pkg-config python-pystache python-six yasm && \
apt-get clean
# Install CMake (version from the debian repository is too old)
ENV CMAKE3_HOME /opt/cmake3
RUN mkdir $CMAKE3_HOME && \
curl --fail --silent --show-error \
--location https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz | \
tar --extract --gzip --no-same-owner --file - --strip-components=1 --directory $CMAKE3_HOME
# Get the Android tools
RUN wget https://dl.google.com/android/repository/tools_r$ANDROID_SDK-linux.zip && \
unzip tools_r$ANDROID_SDK-linux.zip -d $ANDROID_HOME && \
rm -f tools_r$ANDROID_SDK-linux.zip
ENV PATH $ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH
# Get the Android SDK
RUN echo "y" | sdkmanager "platforms;android-28" "build-tools;28.0.0" "extras;android;m2repository" "extras;google;m2repository" "platform-tools" "tools"
# Get the Android NDK
RUN wget http://dl.google.com/android/repository/android-ndk-$ANDROID_NDK-linux-x86_64.zip && \
unzip android-ndk-$ANDROID_NDK-linux-x86_64.zip -d /opt && \
rm -f android-ndk-$ANDROID_NDK-linux-x86_64.zip
ENV ANDROID_NDK_HOME /opt/android-ndk-$ANDROID_NDK
ENV PATH $ANDROID_NDK_HOME:$CMAKE3_HOME/bin/:$PATH
# Configure user bc
RUN useradd -ms /bin/bash bc && \
echo 'bc:cotcot' | chpasswd && \
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER bc
WORKDIR /home/bc
ENV PS1='\[\e[34m\]\u@bc-dev-android-r17b>\[\e[0m\] '
CMD bash
FROM centos:7
MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>
#ENV RPM_BUILD_NCPUS=5
ENV SHELL=/bin/bash
# Configure additional repositories and install common general tools
RUN yum install -y epel-release && \
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm && \
yum install -y nano sudo which && \
yum clean all
# Install development tools
RUN yum install -y ccache clang cmake doxygen gcc-c++ gdb gettext-devel git graphviz libtool make nasm patch pystache python-six python2-pip rpm-build yasm && \
curl -o cmake.tar.gz https://cmake.org/files/v3.2/cmake-3.2.3.tar.gz && \
tar xvzf cmake.tar.gz && rm cmake.tar.gz && cd cmake-3.2.3 && cmake . && make -j5 install && cd .. && rm -rf cmake-3.2.3 && \
yum erase -y cmake && \
yum clean all && \
pip install sphinx javasphinx sphinx_csharp
# Install jenkins dependencies
#RUN yum install -y java-1.8.0-openjdk openssh-server && \
# yum clean all && \
# mkdir -p /var/run/sshd
# Install linphone dependencies development packages
RUN yum install -y alsa-lib-devel ffmpeg-devel glew-devel gsm-devel libbsd-devel libsrtp-devel libv4l-devel libvpx-devel libXv-devel libxml2-devel mbedtls-devel mesa-libEGL-devel openssl-devel opus-devel pulseaudio-libs-devel speex-devel sqlite-devel xerces-c-devel && \
yum clean all
# Install linphone runtime dependencies
RUN yum install -y mesa-dri-drivers && \
yum clean all && \
dbus-uuidgen > /var/lib/dbus/machine-id
# Build qt5.10.1
#RUN git clone git://git.linphone.org/linphone-desktop.git && ./linphone-desktop/tools/build_qt_rpm && rpm -i ./linphone-desktop/rpm-linphone-qt-5.10.1/rpmbuild/RPMS/x86_64/*.rpm && mv ./linphone-desktop/rpm-linphone-qt-5.10.1/rpmbuild/RPMS/x86_64/*.rpm / && rm -rf ./linphone-desktop
# Configure user bc
RUN useradd -ms /bin/bash bc && \
echo 'bc:cotcot' | chpasswd && \
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
#EXPOSE 22
EXPOSE 5060/udp
EXPOSE 5060/tcp
EXPOSE 5061
#CMD ["/usr/sbin/sshd", "-D"]
USER bc
WORKDIR /home/bc
ENV PS1='\[\e[34m\]\u@bc-dev-centos7>\[\e[0m\] '
#ENV Qt5_DIR='/opt/com.belledonne-communications/linphone/lib/cmake'
CMD bash
FROM debian:jessie
MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>
ENV SHELL=/bin/bash
#ENV PS1='\[\e[33m\]\u@bc-dev-debian8>\[\e[0m\] '
# Install common general tools
RUN apt-get update && \
apt-get install -y nano sudo vim && \
apt-get clean
# Install development tools
RUN apt-get update && \
apt-get install -y autoconf ccache clang cmake doxygen g++ gdb git graphviz intltool libtool make nasm ninja-build patch python-lxml python-pip python-pystache python-six yasm && \
curl -o cmake.tar.gz https://cmake.org/files/v3.2/cmake-3.2.3.tar.gz && \
tar xvzf cmake.tar.gz && rm cmake.tar.gz && cd cmake-3.2.3 && cmake . && make -j5 install && cd .. && rm -rf cmake-3.2.3 && \
apt-get purge -y cmake && \
apt-get clean && \
pip install sphinx javasphinx sphinx_csharp
# Install jenkins dependencies
#RUN apt-get update && \
# apt-get install -y default-jre-headless openssh-server && \
# apt-get clean && \
# mkdir -p /var/run/sshd
# Install linphone dependencies development packages
RUN apt-get update && \
apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libopus-dev libpolarssl-dev libpulse-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp0-dev libssl-dev libswscale-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev && \
apt-get clean
# Configure user bc
RUN useradd -ms /bin/bash bc && \
echo 'bc:cotcot' | chpasswd && \
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
#EXPOSE 22
EXPOSE 5060/udp
EXPOSE 5060/tcp
EXPOSE 5061
#CMD ["/usr/sbin/sshd", "-D"]
USER bc
WORKDIR /home/bc
CMD bash
FROM debian:stretch
MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>
ENV SHELL=/bin/bash
#ENV PS1='\[\e[33m\]\u@bc-dev-debian9>\[\e[0m\] '
# Install common general tools
RUN apt-get update && \
apt-get install -y nano sudo vim && \
apt-get clean
# Install development tools
RUN apt-get update && \
apt-get install -y autoconf ccache clang cmake doxygen g++ gdb git graphviz intltool libtool make nasm ninja-build patch python-pip python-pystache python-six yasm && \
apt-get clean && \
pip install sphinx javasphinx sphinx_csharp
# Install jenkins dependencies
#RUN apt-get update && \
# apt-get install -y default-jre-headless openssh-server && \
# apt-get clean && \
# mkdir -p /var/run/sshd
# Install linphone dependencies development packages
RUN apt-get update && \
apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libmbedtls-dev libopus-dev libpulse-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev && \
apt-get clean
# Configure user bc
RUN useradd -ms /bin/bash bc && \
echo 'bc:cotcot' | chpasswd && \
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
#EXPOSE 22
EXPOSE 5060/udp
EXPOSE 5060/tcp
EXPOSE 5061
#CMD ["/usr/sbin/sshd", "-D"]
USER bc
WORKDIR /home/bc
CMD bash
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment