diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..091ad45 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +language: objective-c +osx_image: xcode9.1 +env: + global: + - FRAMEWORK_SCHEME="CountryPickerView" + - FRAMEWORK_PROJECT="CountryPickerView.xcodeproj" + - IOS_SDK=iphonesimulator11.1 + - DEMO_SCHEME="CountryPickerViewDemo" + - DEMO_WORKSPACE=CountryPickerViewDemo/CountryPickerViewDemo.xcworkspace + - PLATFORM="platform=iOS Simulator,OS=11.1,name=iPhone 8" + matrix: + - BUILD_TYPE=FRAMEWORK POD_LINT="TRUE" + - BUILD_TYPE=DEMO POD_LINT="FALSE" + +before_install: + - gem install cocoapods --no-rdoc --no-ri + - gem install xcpretty --no-rdoc --no-ri + +script: + - set -o pipefail + - xcodebuild -version + - xcodebuild -showsdks + - xcrun simctl list + + # Build the framework and Demo app + - if [ $BUILD_TYPE == "FRAMEWORK" ]; then + xcodebuild build -project "$FRAMEWORK_PROJECT" -scheme "$FRAMEWORK_SCHEME" -sdk "$IOS_SDK" -destination "$PLATFORM" | xcpretty; + elif [ $BUILD_TYPE == "DEMO" ]; then + pod install --project-directory=./CountryPickerViewDemo --repo-update; + xcodebuild build -workspace "$DEMO_WORKSPACE" -scheme "$DEMO_SCHEME" -sdk "$IOS_SDK" -destination "$PLATFORM" | xcpretty; + else + echo "Unknown BUILD_TYPE $BUILD_TYPE"; + fi + + # Lint the pod + - if [ $POD_LINT == "TRUE" ]; then + pod lib lint; + fi diff --git a/README.md b/README.md index cbc977c..a7c8f0b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # CountryPickerView -[![Version](https://img.shields.io/cocoapods/v/CountryPickerView.svg?style=flat)](http://cocoapods.org/pods/CountryPickerView) +[![Build Status](https://travis-ci.org/kizitonwose/CountryPickerView.svg?branch=master)](https://travis-ci.org/kizitonwose/CountryPickerView) [![Platform](https://img.shields.io/badge/Platform-iOS-00BCD4.svg)](http://cocoapods.org/pods/CountryPickerView) -[![License](https://img.shields.io/badge/License-MIT-8D6E63.svg)](https://github.com/kizitonwose/CountryPickerView/blob/master/LICENSE.md) +[![Version](https://img.shields.io/cocoapods/v/CountryPickerView.svg?style=flat)](http://cocoapods.org/pods/CountryPickerView) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![License](https://img.shields.io/badge/License-MIT-8D6E63.svg)](https://github.com/kizitonwose/CountryPickerView/blob/master/LICENSE.md) CountryPickerView is a simple, customizable view for selecting countries in iOS apps.