Skip to content

Commit

Permalink
Updated travis-ci yaml file to use bundler and Xcode 10
Browse files Browse the repository at this point in the history
  • Loading branch information
cnoon committed Sep 17, 2018
1 parent a34d650 commit 54b24da
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: objective-c
osx_image: xcode9.4
os: osx
osx_image: xcode10
branches:
only:
- master

env:
global:
- LC_CTYPE=en_US.UTF-8
Expand All @@ -12,38 +13,48 @@ env:
- MACOS_FRAMEWORK_SCHEME="Elevate macOS"
- TVOS_FRAMEWORK_SCHEME="Elevate tvOS"
- WATCHOS_FRAMEWORK_SCHEME="Elevate watchOS"
- IOS_SDK=iphonesimulator11.4
- OSX_SDK=macosx10.13
- TVOS_SDK=appletvsimulator11.4
- WATCHOS_SDK=watchsimulator4.3
- IOS_SDK=iphonesimulator12.0
- OSX_SDK=macosx10.14
- TVOS_SDK=appletvsimulator12.0
- WATCHOS_SDK=watchsimulator5.0
matrix:
- DESTINATION="OS=11.4,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="YES"
- DESTINATION="OS=12.0,name=iPhone XS" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="YES"
- DESTINATION="OS=11.4,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="NO"
- DESTINATION="OS=10.3.1,name=iPhone 7" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="NO"
- DESTINATION="OS=9.3,name=iPhone 5S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" SDK="$OSX_SDK" RUN_TESTS="YES" POD_LINT="NO"
- DESTINATION="OS=11.4,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" POD_LINT="NO"
- DESTINATION="OS=4.3,name=Apple Watch Series 3 - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=12.0,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" POD_LINT="NO"
- DESTINATION="OS=5.0,name=Apple Watch Series 4 - 44mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" RUN_TESTS="NO" POD_LINT="NO"

before_install:
- gem update bundler

script:
- set -o pipefail
- rvm list
- which ruby
- bundle exec gem list
- bundle exec pod --version
- bundle exec xcpretty --version
- xcodebuild -version
- xcodebuild -showsdks

# Build Framework in Debug and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=YES ENABLE_TESTABILITY=YES test | xcpretty -c;
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=YES ENABLE_TESTABILITY=YES test | bundle exec xcpretty -c;
else
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | bundle exec xcpretty -c;
fi

# Build Framework in Release and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c;
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | bundle exec xcpretty -c;
else
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | bundle exec xcpretty -c;
fi

# Run `pod lib lint` if specified
- if [ $POD_LINT == "YES" ]; then
pod lib lint --private;
bundle exec pod lib lint --private;
fi

0 comments on commit 54b24da

Please sign in to comment.