Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a63412d
commit ceb1d81
Showing
1 changed file
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
language: objective-c | ||
osx_image: xcode8 | ||
osx_image: xcode9 | ||
branches: | ||
only: | ||
- master | ||
env: | ||
global: | ||
- LC_CTYPE=en_US.UTF-8 | ||
- LANG=en_US.UTF-8 | ||
- PROJECT=LeanCloud.xcodeproj | ||
- IOS_FRAMEWORK_SCHEME="LeanCloud" | ||
matrix: | ||
- DESTINATION="OS=11.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" | ||
- DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" | ||
- DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" | ||
before_install: rvm use 2.0 | ||
install: gem install slather | ||
script: xcodebuild test -project LeanCloud.xcodeproj -scheme LeanCloud -sdk iphonesimulator | ||
script: | ||
- set -o pipefail | ||
- xcodebuild -version | ||
- xcodebuild -showsdks | ||
|
||
# Build Framework in Debug and Run Tests if specified | ||
- if [ $RUN_TESTS == "YES" ]; then | ||
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; | ||
else | ||
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; | ||
fi | ||
|
||
# Build Framework in Release and Run Tests if specified | ||
- if [ $RUN_TESTS == "YES" ]; then | ||
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; | ||
else | ||
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; | ||
fi | ||
after_success: slather |