Skip to content

Commit

Permalink
CircleCI test run.
Browse files Browse the repository at this point in the history
  • Loading branch information
andersio committed Oct 17, 2017
1 parent 9b36571 commit 729a1bf
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'xcpretty'
19 changes: 19 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
machine:
xcode:
version: "9.0"

dependencies:
cache_directories:
- "Carthage/"
- "~/.cocoapods"

test:
pre:
- carthage bootstrap --no-build
override:
- script/test iphonesimulator "platform=iOS Simulator,name=iPhone 6s" ReactiveFeedback
- script/test macosx "arch=x86_64" ReactiveFeedback
- script/test appletvsimulator "platform=tvOS Simulator,name=Apple TV" ReactiveFeedback
- script/test iphonesimulator "platform=iOS Simulator,name=iPhone 6s" Example build
- pod lib lint
- carthage build --no-skip-current --cache-builds
29 changes: 29 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

if [[ "$1" == "macosx" ]]; then
XCODE_ACTION="build"
fi

if [[ "$1" == "iphonesimulator" || "$1" == "appletvsimulator" ]]; then
XCODE_ACTION="build-for-testing test-without-building"
fi

if [[ -n "$4" ]]; then
XCODE_ACTION="$4"
fi

set -o pipefail
xcodebuild $XCODE_ACTION \
-workspace ReactiveFeedback.xcworkspace \
-scheme "$3" \
-sdk "$1" \
-destination "$2" \
-configuration Release \
ENABLE_TESTABILITY=YES \
GCC_GENERATE_DEBUGGING_SYMBOLS=NO \
RUN_CLANG_STATIC_ANALYZER=NO | bundle exec xcpretty
result=$?

if [ "$result" -ne 0 ]; then
exit $result
fi

0 comments on commit 729a1bf

Please sign in to comment.