diff --git a/.travis.yml b/.travis.yml index b34d9e7..884aac4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,10 @@ osx_image: xcode8 language: objective-c before_install: - - ./build-libssl.sh --noparallel --verbose-on-error - - xcrun -sdk iphoneos lipo -info ./lib/*.a - - ./create-openssl-framework.sh - - xcrun -sdk iphoneos lipo -info openssl.framework/openssl + - ./travis-build.sh script: - xcodebuild -project OpenSSL-for-iOS.xcodeproj -scheme OpenSSL-for-iOS -sdk iphonesimulator clean build + - cd targets && xcodebuild -project OpenSSL-for-iOS.xcodeproj -scheme OpenSSL-for-iOS -sdk iphonesimulator clean build # xctool 0.2.9 doesn't support Xcode 8 yet (see https://github.com/facebook/xctool/issues/704) #- xctool -project OpenSSL-for-iOS.xcodeproj -scheme OpenSSL-for-iOS -sdk iphonesimulator clean build diff --git a/travis-build.sh b/travis-build.sh new file mode 100755 index 0000000..173322c --- /dev/null +++ b/travis-build.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# Log script output with prefix +log_output() +{ + while read INPUT; do + echo "${1} ${INPUT}" + done +} + +# Shut up curl +export CURL_OPTIONS="-s" + +# Build 1.0.2 in current directory +./build-libssl.sh --noparallel --verbose-on-error | log_output "ARCHS " & +PID_ARCHS=$! + +# Build 1.1.0 in (temporary) subdirectory +mkdir targets +cd targets +cp -r ../include . +../build-libssl.sh --noparallel --verbose-on-error --ec-nistp-64-gcc-128 --version=1.1.0b | log_output "TARGETS" & +PID_TARGETS=$! + +echo "SCRIPT Started jobs, waiting for jobs to finish" +wait ${PID_ARCHS} +wait ${PID_TARGETS} + +# Verify/prepare 1.1.0 build dir +xcrun -sdk iphoneos lipo -info ./lib/*.a | log_output "TARGETS" +../create-openssl-framework.sh | log_output "TARGETS" +xcrun -sdk iphoneos lipo -info openssl.framework/openssl | log_output "TARGETS" +cp -r ../OpenSSL-for-* . + +# Back to main dir +cd .. +xcrun -sdk iphoneos lipo -info ./lib/*.a | log_output "ARCHS " +./create-openssl-framework.sh | log_output "ARCHS " +xcrun -sdk iphoneos lipo -info openssl.framework/openssl | log_output "ARCHS " +