diff --git a/.travis.yml b/.travis.yml index 86451eddae..46abbb9e3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ env: - CONFIG=objectivec_ios_debug - CONFIG=objectivec_ios_release - CONFIG=objectivec_osx + - CONFIG=objectivec_cocoapods_integration - CONFIG=python - CONFIG=python_cpp - CONFIG=ruby19 @@ -67,6 +68,8 @@ matrix: env: CONFIG=objectivec_ios_release - os: linux env: CONFIG=objectivec_osx + - os: linux + env: CONFIG=objectivec_cocoapods_integration allow_failures: # These currently do not work on OS X but are being worked on by @haberman. - os: osx diff --git a/objectivec/Tests/CocoaPods/run_tests.sh b/objectivec/Tests/CocoaPods/run_tests.sh index edf0fe81fb..749f413c85 100755 --- a/objectivec/Tests/CocoaPods/run_tests.sh +++ b/objectivec/Tests/CocoaPods/run_tests.sh @@ -119,9 +119,18 @@ do_test() { # Put the right Podfile in place. cp -f "Podfile-${TEST_MODE}" "Podfile" + xcodebuild_args=( "-workspace" "${TEST_NAME}.xcworkspace" "-scheme" "${TEST_NAME}" ) + + # For iOS, if the SDK is not provided it tries to use iphoneos, and the test + # fail on Travis since those machines don't have a Code Signing identity. + if [[ "${TEST_NAME}" == iOS* ]] ; then + xcodebuild_args+=( "-sdk" "iphonesimulator" "ONLY_ACTIVE_ARCH=NO" ) + fi + # Do the work! pod install --verbose - xcodebuild -workspace "${TEST_NAME}.xcworkspace" -scheme "${TEST_NAME}" build + + xcodebuild "${xcodebuild_args[@]}" build # Clear the hook and manually run cleanup. trap - EXIT diff --git a/tests.sh b/tests.sh index cde108fd53..72465a7b0c 100755 --- a/tests.sh +++ b/tests.sh @@ -223,6 +223,17 @@ build_objectivec_osx() { --core-only --skip-xcode-ios } +build_objectivec_cocoapods_integration() { + # First, load the RVM environment in bash, needed to update ruby. + source ~/.rvm/scripts/rvm + # Update ruby to 2.2.3 as the default one crashes with segmentation faults + # when using pod. + rvm use 2.2.3 --install --binary --fuzzy + # Update pod to the latest version. + gem install cocoapods --no-ri --no-rdoc + objectivec/Tests/CocoaPods/run_tests.sh +} + build_python() { internal_build_cpp internal_install_python_deps @@ -304,6 +315,7 @@ Usage: $0 { cpp | objectivec_ios_debug | objectivec_ios_release | objectivec_osx | + objectivec_cocoapods_integration | python | python_cpp | ruby19 |