Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #70 from thomasvl/travis_support
Browse files Browse the repository at this point in the history
Add a travis config for the project to atleast build the samples
  • Loading branch information
thomasvl authored Jun 14, 2016
2 parents 87ae70a + cf98ab6 commit 73f9e1d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash

set -eu

if [[ "$#" -ne 2 ]]; then
echo "Usage: $0 {iOS|OSX} {Debug|Release}"
exit 10
fi

BUILD_MODE="$1"
BUILD_CFG="$2"

CMD_BUILDER=(
xcodebuild
)

case "${BUILD_MODE}" in
iOS)
CMD_BUILDER+=(
-workspace Examples/OAuth2SampleTouch/OAuth2SampleTouch.xcworkspace
-scheme OAuthSampleTouch
-sdk iphonesimulator
# No -destination since there are no tests.
)
;;
OSX)
CMD_BUILDER+=(
-workspace Examples/OAuth2Sample/OAuth2Sample.xcworkspace
-scheme OAuth2Sample
# No -destination since there are no tests.
)
;;
*)
echo "Unknown BUILD_MODE: ${BUILD_MODE}"
exit 11
;;
esac

case "${BUILD_CFG}" in
Debug|Release)
CMD_BUILDER+=(-configuration "${BUILD_CFG}")
;;
*)
echo "Unknown BUILD_CFG: ${BUILD_CFG}"
exit 12
;;
esac

CMD_BUILDER+=(
build
)

set -x
exec "${CMD_BUILDER[@]}"
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: objective-c
osx_image: xcode7.3
env:
- MODE=OSX CFG=Debug
- MODE=OSX CFG=Release
- MODE=iOS CFG=Debug
- MODE=iOS CFG=Release
script:
- ./.travis.sh "${MODE}" "${CFG}"
notifications:
email: false

0 comments on commit 73f9e1d

Please sign in to comment.