Commit ee53ef1b authored by Mickaël Turnel's avatar Mickaël Turnel

Split all jobs into several files to ensure reusability

parent a531f54d
.job-android:
stage: build
tags: [ "docker-android" ]
variables:
CCACHE_SIZE: 4G
extends: .linux-prepare
script:
- sdkmanager
- mkdir -p build-android
- cd build-android
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Android -DLINPHONESDK_ANDROID_ARCHS="arm64, armv7, x86, x86_64" $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS
artifacts:
paths:
- build-android/linphone-sdk/bin/outputs/aar/*.aar
- build-android/linphone-sdk/bin/distributions/linphone-sdk-*.zip
when: always
expire_in: 1 week
.scheduled-job-android:
extends: .job-android
only:
- schedules
#################################################
# Makefile
#################################################
job-android-makefile-r16b:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r16b
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-android
job-android-makefile-r17c:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r17c
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-android
#################################################
# Ninja
#################################################
job-android-ninja-r16b:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r16b
variables:
CMAKE_GENERATOR: Ninja
extends: .job-android
job-android-ninja-r16b-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-android-ninja-r16b
job-android-ninja-r17c:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r17c
variables:
CMAKE_GENERATOR: Ninja
extends: .job-android
job-android-ninja-r17c-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-android-ninja-r17c
.job-ios:
stage: build
tags: [ "macosx" ]
script:
- ccache -s
- mkdir -p build-ios
- cd build-ios
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, x86_64" $CMAKE_OPTIONS
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS
- ccache -s
artifacts:
paths:
- build-ios/linphone-sdk-*.zip
- build-ios/linphone-sdk.podspec
when: always
expire_in: 1 week
.scheduled-job-ios:
extends: .job-ios
only:
- schedules
#################################################
# Makefile
#################################################
job-ios-makefile:
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-ios
#################################################
# Ninja
#################################################
job-ios-ninja:
variables:
CMAKE_GENERATOR: Ninja
extends: .job-ios
job-ios-ninja-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-ios-ninja
#################################################
# XCode
#################################################
job-ios-xcode:
stage: build
tags: [ "macosx" ]
only:
- schedules
script:
- mkdir -p build-ios
- cd build-ios
- cmake .. -G Xcode -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, x86_64" -DLINPHONESDK_IOS_BASE_URL=$IOS_SNAPSHOTS_URL $CMAKE_OPTIONS
- cmake --build . --target sdk -- -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu`
artifacts:
paths:
- build-ios/linphone-sdk-*.zip
- build-ios/linphone-sdk.podspec
when: always
expire_in: 1 week
#################################################
# Makefile
#################################################
job-archlinux-latest-makefile-gcc:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
extends: .scheduled-job-linux-desktop
job-archlinux-latest-makefile-clang:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
extends: .scheduled-job-linux-desktop
#################################################
# Ninja
#################################################
job-archlinux-latest-ninja-gcc:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux-desktop
job-archlinux-latest-ninja-gcc-novideo:
tags: [ "docker-archlinux-latest" ]
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-archlinux-latest-ninja-gcc
job-archlinux-latest-ninja-clang:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .job-linux-desktop
job-archlinux-latest-ninja-clang-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-archlinux-latest-ninja-clang
#################################################
# Makefile
#################################################
job-centos7-makefile-gcc:
tags: [ "docker-centos7" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
extends: .scheduled-job-linux-desktop
job-centos7-makefile-clang:
tags: [ "docker-centos7" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
extends: .scheduled-job-linux-desktop
#################################################
# Ninja
#################################################
job-centos7-ninja-gcc:
tags: [ "docker-centos7" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux-desktop
job-centos7-ninja-gcc-novideo:
tags: [ "docker-centos7" ]
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-centos7-ninja-gcc
job-centos7-ninja-clang:
tags: [ "docker-centos7" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .job-linux-desktop
job-centos7-ninja-clang-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-centos7-ninja-clang
#################################################
# Makefile
#################################################
job-debian8-makefile-gcc:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux-desktop
job-debian8-makefile-clang:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux-desktop
#################################################
# Ninja
#################################################
job-debian8-ninja-gcc:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux-desktop
job-debian8-ninja-gcc-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-debian8-ninja-gcc
job-debian8-ninja-clang:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .job-linux-desktop
job-debian8-ninja-clang-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-debian8-ninja-clang
#################################################
# Makefile
#################################################
job-debian9-makefile-gcc:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux-desktop
job-debian9-makefile-clang:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux-desktop
#################################################
# Ninja
#################################################
job-debian9-ninja-gcc:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux-desktop
job-debian9-ninja-gcc-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-debian9-ninja-gcc
job-debian9-ninja-clang:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .job-linux-desktop
job-debian9-ninja-clang-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-debian9-ninja-clang
#################################################
# Makefile
#################################################
job-ubuntu-rolling-makefile-gcc:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:rolling
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux-desktop
job-ubuntu-rolling-makefile-clang:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:rolling
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux-desktop
#################################################
# Ninja
#################################################
job-ubuntu-rolling-ninja-gcc:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:rolling
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux-desktop
job-ubuntu-rolling-ninja-gcc-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-ubuntu-rolling-ninja-gcc
job-ubuntu-rolling-ninja-clang:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:rolling
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .job-linux-desktop
job-ubuntu-rolling-ninja-clang-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-ubuntu-rolling-ninja-clang
.job-linux-desktop:
stage: build
extends: .linux-prepare
script:
- export CC=$CC
- export CXX=$CXX
- mkdir -p build-desktop
- cd build-desktop
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS
.scheduled-job-linux-desktop:
extends: .job-linux-desktop
only:
- schedules
.job-macosx-desktop:
stage: build
tags: [ "macosx" ]
script:
- ccache -s
- mkdir -p build-desktop
- cd build-desktop
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS
- ccache -s
#################################################
# Makefile
#################################################
job-macosx-makefile:
only:
- schedules
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .job-macosx-desktop
#################################################
# Ninja
#################################################
job-macosx-ninja:
variables:
CMAKE_GENERATOR: Ninja
extends: .job-macosx-desktop
job-macosx-ninja-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-macosx-ninja
#################################################
# XCode
#################################################
job-macosx-xcode:
stage: build
tags: [ "macosx" ]
only:
- schedules
script:
- mkdir -p build-desktop
- cd build-desktop
- cmake .. -G Xcode -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build . --target sdk -- -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu`
.linux-prepare:
cache:
key: $CI_JOB_NAME
paths:
- ccache/
before_script:
##
## If a TUNNEL_USER_KEY is defined then start ssh-agent and add the key
##
- if ! [ -z ${TUNNEL_USER_KEY+x} ]; then eval $(ssh-agent -s); fi
- if ! [ -z ${TUNNEL_USER_KEY+x} ]; then echo "$TUNNEL_USER_KEY" | tr -d '\r' | ssh-add - > /dev/null; fi
- if ! [ -z ${TUNNEL_USER_KEY+x} ]; then mkdir -p ~/.ssh && chmod 700 ~/.ssh; fi
- if ! [ -z ${TUNNEL_USER_KEY+x} ]; then echo -e "Host gitlab.linphone.org\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config; fi
##
## Then configure ccache
##
- mkdir -p ccache
- echo "max_size = $CCACHE_SIZE" > ccache/ccache.conf
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
- ccache -s
after_script:
- if ! [ -z ${TUNNEL_USER_KEY+x} ]; then rm -rf ~/.ssh || true; fi
- export CCACHE_DIR=${PWD}/ccache
- ccache -s
#################################################
# iOS
#################################################
job-ios-upload:
stage: deploy
tags: [ "deploy" ]
only:
- schedules
dependencies:
- job-ios-xcode
script:
- scp build-ios/linphone-sdk-*.zip $DEPLOY_SERVER:$DEPLOY_SNAPSHOTS_ROOT_DIRECTORY/ios/
- pod repo remove linphone-sdk || true
- pod repo add linphone-sdk git@gitlab.linphone.org:BC/public/podspec.git $CI_COMMIT_REF_NAME
- pod repo push linphone-sdk build-ios/linphone-sdk.podspec --skip-import-validation --local-only --verbose
- cd ~/.cocoapods/repos/linphone-sdk && git push origin $CI_COMMIT_REF_NAME && cd -
- pod repo remove linphone-sdk
#################################################
# VS2015
#################################################
job-windows-vs2015:
stage: build
tags: [ "windows" ]
script:
- mkdir build-desktop
- cd build-desktop
- cmake .. -G "Visual Studio 14 2015" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=Release %DEFAULT_CMAKE_OPTIONS% %CMAKE_OPTIONS%
- cmake --build . --target sdk --config Release -- /maxcpucount
job-windows-vs2015-novideo:
only:
- schedules
variables:
CMAKE_OPTIONS: -DENABLE_VIDEO=NO
extends: job-windows-vs2015
#################################################
# VS2017
#################################################
#job-uwp-vs2017:
#
# stage: build
# tags: [ "windows" ]
#
# script:
# - mkdir build-uwp
# - cd build-uwp
# - cmake .. -G "Visual Studio 15 2017" -DLINPHONESDK_PLATFORM=UWP -DCMAKE_BUILD_TYPE=Release -DENABLE_FFMPEG=NO -DENABLE_VPX=NO
# - cmake --build . --config Release
#################################################
# Base configuration
#################################################
variables:
GIT_SUBMODULE_STRATEGY: recursive
MAKEFILE_JOBS: 5
CCACHE_SIZE: 2G
CMAKE_OPTIONS: -DENABLE_TUNNEL=YES
#################################################
# Platforms to test
#################################################
include:
- '.gitlab-ci-files/job-prepare.yml'
- '.gitlab-ci-files/job-android.yml'
- '.gitlab-ci-files/job-ios.yml'
- '.gitlab-ci-files/job-linux-desktop.yml'
- '.gitlab-ci-files/job-linux-desktop-archlinux-latest.yml'
- '.gitlab-ci-files/job-linux-des