diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2103643 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +# Travis CI config for AppAuth +# Use the `wwtd` gem to test locally. +language: objective-c +osx_image: xcode9 +# Tests iOS, macOS and tvOS: both static library and framework schemes. +env: +# To generate this list, use `xcodebuild -showsdks` to get possible SDK values, and platforms. +# Use `instruments -s devices` to get the device name. + - SCHEME=OpenLocationCode_iOS DESTINATION="'platform=iOS Simulator,name=iPhone 6,OS=11.0'" SDK=iphonesimulator11.0 + - SCHEME=OpenLocationCode_macOS DESTINATION="'platform=macOS,arch=x86_64'" SDK=macosx10.13 + - SCHEME=OpenLocationCode_tvOS DESTINATION="'platform=tvOS Simulator,name=Apple TV,OS=11.0'" SDK=appletvsimulator11.0 +before_script: + - sudo gem install xcpretty +script: +# Breaking down this command: +# eval is used here, otherwise environment variables are not present. +# `set -o pipefail && ` is so that the return code isn't gobbled by xcpretty (per https://github.com/supermarin/xcpretty#usage) +# then it's standard xcodebuild | xcpretty. +- eval "set -o pipefail && xcodebuild -project OpenLocationCode.xcodeproj -scheme $SCHEME -sdk $SDK -destination $DESTINATION -enableCodeCoverage YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES OTHERCFLAGS='-Werror' test | xcpretty" +- eval "swift --version; swift test" +after_success: + - bash <(curl -s https://codecov.io/bash) + diff --git a/README.md b/README.md index 31276ee..f83c60d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Open Location Code for Swift +[![Build Status](https://travis-ci.org/google/open-location-code-swift.svg?branch=master)](https://travis-ci.org/google/open-location-code-swift) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) Convert between decimal degree coordinates and Open Location Codes. Shorten