From bde3bff260f2b76063fe8cd1c0c6a0a784158979 Mon Sep 17 00:00:00 2001 From: godpp Date: Tue, 12 Mar 2019 00:57:37 +0900 Subject: [PATCH] Feat : Travis CI --- .travis.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..11e5fbf --- /dev/null +++ b/.travis.yml @@ -0,0 +1,36 @@ +language: swift + +osx_image: xcode10.0 +env: + global: + - LC_CTYPE=en_US.UTF-8 + - LANG=en_US.UTF-8 + - WORKSPACE=Booster.xcodeproj + - IOS_FRAMEWORK_SCHEME="Booster" + - EXAMPLE_SCHEME="BoosterExamples" + matrix: + - DESTINATION="OS=12.0,name=iPhone XS" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=12.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=12.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + +script: + - set -o pipefail + - xcodebuild -version + - xcodebuild -showsdks + + # Build Framework in Release and Run Tests if specified + - if [ $RUN_TESTS == "YES" ]; then + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; + else + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; + fi + + # Build Example in Debug if specified + - if [ $BUILD_EXAMPLE == "YES" ]; then + xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; + fi + + # Run `pod lib lint` if specified + - if [ $POD_LINT == "YES" ]; then + pod lib lint; + fi \ No newline at end of file