Skip to content

Commit a76cc51

Browse files
committed
[.travis.yml] fix travis
1 parent 124a631 commit a76cc51

File tree

2 files changed

+38
-13
lines changed

2 files changed

+38
-13
lines changed

.travis.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1-
# references:
2-
# * http://www.objc.io/issue-6/travis-ci.html
3-
# * https://github.com/supermarin/xcpretty#usage
4-
51
language: objective-c
6-
# cache: cocoapods
7-
# podfile: Example/Podfile
8-
# before_install:
9-
# - gem install cocoapods # Since Travis is not always on latest version
10-
# - pod install --project-directory=Example
11-
install:
12-
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
2+
cache:
3+
- bundler
4+
- cocoapods
5+
podfile: Example/Podfile
6+
xcode_workspace: Example/ROSiOS.xcworkspace
7+
xcode_scheme: ROSiOS-Example
8+
osx_image: xcode7.2
9+
xcode_sdk: iphonesimulator
10+
env:
11+
global:
12+
- BUILD_LOG=build.log
13+
matrix:
14+
- TRAVIS_XCODE_DESTINATION='platform=iOS Simulator,name=iPhone 6'
15+
- TRAVIS_XCODE_DESTINATION='platform=iOS Simulator,name=iPhone 5'
16+
before_install:
17+
- brew update
18+
- brew outdated xctool || brew upgrade xctool
19+
- rvm install ruby-2.2.0
20+
- gem install cocoapods
21+
- gem install xcpretty
22+
- pod install --project-directory=Example
1323
script:
14-
- set -o pipefail && xcodebuild test -workspace Example/ROSiOS.xcworkspace -scheme ROSiOS-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
15-
- pod lib lint --quick
24+
- make test
25+
- pod lib lint --quick
26+
after_failure:
27+
- echo "=== Xcode Build log ==="
28+
- cat $TRAVIS_BUILD_DIR/$BUILD_LOG
29+
- echo "=== end of Xcode Build log ==="
30+
# after_success:
31+
# - pod trunk push

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
test:
2+
xcodebuild \
3+
-sdk $(TRAVIS_XCODE_SDK) \
4+
-workspace $(TRAVIS_XCODE_WORKSPACE) \
5+
-scheme $(TRAVIS_XCODE_SCHEME) \
6+
-configuration Release \
7+
-destination "$(TRAVIS_XCODE_DESTINATION)" \
8+
clean build \
9+
ONLY_ACTIVE_ARCH=NO 1> $(TRAVIS_BUILD_DIR)/$(BUILD_LOG) 2>&1

0 commit comments

Comments
 (0)