Commit 1cb3f93b authored by Ghislain MARY's avatar Ghislain MARY

Upload iOS SDK in CI.

parent e8fc2103
......@@ -4,6 +4,11 @@ variables:
CCACHE_SIZE: 2G
stages:
- build
- deploy
.linux-ccache:
cache:
......@@ -25,6 +30,7 @@ variables:
.job-android:
stage: build
tags: [ "docker-android" ]
variables:
......@@ -107,13 +113,14 @@ job-android-ninja-r17c-novideo:
.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, i386, x86_64" $CMAKE_OPTIONS
- 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
......@@ -157,6 +164,7 @@ job-ios-ninja-novideo:
job-ios-xcode:
stage: build
tags: [ "macosx" ]
only:
......@@ -164,7 +172,7 @@ job-ios-xcode:
script:
- mkdir -p build-ios
- cd build-ios
- cmake .. -G Xcode -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, i386, x86_64" $CMAKE_OPTIONS
- 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:
......@@ -175,8 +183,28 @@ job-ios-xcode:
expire_in: 1 week
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
.job-linux-desktop:
stage: build
extends: .linux-ccache
script:
......@@ -387,6 +415,7 @@ job-debian9-ninja-clang-novideo:
.job-macosx-desktop:
stage: build
tags: [ "macosx" ]
script:
......@@ -426,6 +455,7 @@ job-macosx-ninja-novideo:
job-macosx-xcode:
stage: build
tags: [ "macosx" ]
only:
......@@ -439,6 +469,7 @@ job-macosx-xcode:
job-windows-vs2015:
stage: build
tags: [ "windows" ]
script:
......@@ -459,6 +490,7 @@ job-windows-vs2015-novideo:
#job-uwp-vs2017:
#
# stage: build
# tags: [ "windows" ]
#
# script:
......
......@@ -21,6 +21,10 @@
############################################################################
list(APPEND CMAKE_MODULE_PATH "${LINPHONESDK_DIR}/cmake")
include(LinphoneSdkUtils)
# Create the zip file of the SDK
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "remove_directory" "linphone-sdk/apple-darwin/Tools"
......@@ -33,5 +37,8 @@ execute_process(
# Generate podspec file
file(READ "${LINPHONESDK_DIR}/COPYING" LINPHONESDK_LICENSE)
linphone_sdk_convert_comma_separated_list_to_cmake_list("${LINPHONESDK_IOS_ARCHS}" VALID_ARCHS)
string(REPLACE ";" " " VALID_ARCHS "${VALID_ARCHS}")
file(READ "${LINPHONESDK_ENABLED_FEATURES_FILENAME}" LINPHONESDK_ENABLED_FEATURES)
configure_file("${LINPHONESDK_DIR}/cmake/IOS/linphone-sdk.podspec.cmake" "${LINPHONESDK_BUILD_DIR}/linphone-sdk.podspec" @ONLY)
......@@ -6,11 +6,14 @@ Pod::Spec.new do |s|
s.description = <<-PODSPEC_DESC
@LINPHONESDK_ENABLED_FEATURES@PODSPEC_DESC
s.homepage = "https://github.com/BelledonneCommunications/linphone-iphone"
s.license = "GNU GPL 2"
s.license = { :type => "GNU GPL 2", :text => <<-LICENSE
@LINPHONESDK_LICENSE@LICENSE
}
s.author = "employees@belledonne-communications.com"
s.platform = :ios, "9.0"
s.source = { :http => "@LINPHONESDK_IOS_BASE_URL@/linphone-sdk-ios-@LINPHONESDK_VERSION@.zip" }
s.vendored_frameworks = "linphone-sdk/apple-darwin/Frameworks/**"
s.resource = "linphone-sdk/apple-darwin/Resources/**"
s.pod_target_xcconfig = { 'VALID_ARCHS' => "@VALID_ARCHS@" }
end
......@@ -24,7 +24,7 @@ include(LinphoneSdkPlatformCommon)
include(LinphoneSdkCheckBuildToolsIOS)
set(LINPHONESDK_IOS_ARCHS "arm64, armv7, x86_64" CACHE STRING "Android architectures to build for: comma-separated list of values in [arm64, armv7, i386, x86_64]")
set(LINPHONESDK_IOS_ARCHS "arm64, armv7, x86_64" CACHE STRING "Android architectures to build for: comma-separated list of values in [arm64, armv7, x86_64]")
set(LINPHONESDK_IOS_BASE_URL "https://www.linphone.org/releases/ios/" CACHE STRING "URL of the repository where the iOS SDK zip files are located")
......@@ -103,7 +103,7 @@ add_custom_target(lipo ALL
)
add_custom_target(sdk
"${CMAKE_COMMAND}" "-DLINPHONESDK_DIR=${LINPHONESDK_DIR}" "-DLINPHONESDK_BUILD_DIR=${CMAKE_BINARY_DIR}" "-DLINPHONESDK_VERSION=${LINPHONESDK_VERSION}" "-DLINPHONESDK_ENABLED_FEATURES_FILENAME=${CMAKE_BINARY_DIR}/enabled_features.txt" "-DLINPHONESDK_IOS_BASE_URL=${LINPHONESDK_IOS_BASE_URL}" "-P" "${LINPHONESDK_DIR}/cmake/IOS/GenerateSDK.cmake"
"${CMAKE_COMMAND}" "-DLINPHONESDK_DIR=${LINPHONESDK_DIR}" "-DLINPHONESDK_BUILD_DIR=${CMAKE_BINARY_DIR}" "-DLINPHONESDK_VERSION=${LINPHONESDK_VERSION}" "-DLINPHONESDK_ENABLED_FEATURES_FILENAME=${CMAKE_BINARY_DIR}/enabled_features.txt" "-DLINPHONESDK_IOS_ARCHS=${LINPHONESDK_IOS_ARCHS}" "-DLINPHONESDK_IOS_BASE_URL=${LINPHONESDK_IOS_BASE_URL}" "-P" "${LINPHONESDK_DIR}/cmake/IOS/GenerateSDK.cmake"
COMMENT "Generating the SDK (zip file and podspec)"
DEPENDS lipo
)
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