-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
324 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#! /usr/bin/env sh | ||
|
||
set -eo pipefail | ||
# set -euxo pipefail | ||
|
||
echo $TRAVIS_COMMIT_MESSAGE | ||
echo "RFCI_TASK = $RFCI_TASK" | ||
readonly RFWorkspace="RFSegue.xcworkspace" | ||
readonly RFSTAGE="$1" | ||
echo "RFSTAGE = $RFSTAGE" | ||
|
||
# Run test | ||
# $1 scheme | ||
# $2 destination | ||
XC_Test() { | ||
xcodebuild test -enableCodeCoverage YES -workspace "$RFWorkspace" -scheme "$1" -destination "$2" ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty | ||
} | ||
|
||
# Run macOS test | ||
XC_TestMac() { | ||
xcodebuild test -enableCodeCoverage YES -workspace "$RFWorkspace" -scheme "Test-macOS" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty | ||
} | ||
|
||
# Run watchOS test | ||
XC_TestWatch() { | ||
xcodebuild build -workspace "$RFWorkspace" -scheme Target-watchOS ONLY_ACTIVE_ARCH=NO | xcpretty | ||
} | ||
|
||
STAGE_MAIN() { | ||
if [ "$RFCI_TASK" = "POD_LINT" ]; then | ||
if [[ "$TRAVIS_COMMIT_MESSAGE" = *"[skip lint]"* ]]; then | ||
echo "Skip pod lint" | ||
else | ||
echo "TRAVIS_BRANCH = $TRAVIS_BRANCH" | ||
gem install cocoapods --no-rdoc --no-ri --no-document --quiet | ||
if [ "$TRAVIS_BRANCH" = "develop" ]; then | ||
pod lib lint --allow-warnings | ||
else | ||
pod lib lint | ||
fi | ||
fi | ||
|
||
elif [ "$RFCI_TASK" = "Xcode9" ]; then | ||
pod install | ||
XC_Test "Test-iOS" "platform=iOS Simulator,name=iPhone X,OS=11.3" | ||
XC_Test "Test-tvOS" "platform=tvOS Simulator,name=Apple TV 4K,OS=11.3" | ||
else | ||
echo "Unexpected CI task: $RFCI_TASK" | ||
fi | ||
} | ||
|
||
STAGE_SUCCESS() { | ||
if [ "$RFCI_TASK" = "Xcode9" ]; then | ||
curl -s https://codecov.io/bash | bash -s | ||
fi | ||
} | ||
|
||
STAGE_FAILURE() { | ||
if [[ "$RFCI_TASK" == Xcode* ]]; then | ||
cat -n ~/Library/Logs/DiagnosticReports/xctest*.crash | ||
fi | ||
} | ||
|
||
"STAGE_$RFSTAGE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
language: objective-c | ||
osx_image: xcode9.2 | ||
sudo: false | ||
cache: cocoapods | ||
env: | ||
global: | ||
- LC_CTYPE=en_US.UTF-8 | ||
- LANG=en_US.UTF-8 | ||
- LANGUAGE=en_US.UTF-8 | ||
- XB_DEST="platform=iOS Simulator,name=iPhone 6,OS=11.2" | ||
# podfile: Example/Podfile | ||
matrix: | ||
include: | ||
- osx_image: xcode9.3 | ||
env: RFCI_TASK="POD_LINT" | ||
- osx_image: xcode9.3 | ||
env: RFCI_TASK="Xcode9" | ||
before_install: | ||
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet | ||
- pod repo update master | ||
- pod install | ||
script: | ||
- set -o pipefail | ||
- xcodebuild test -enableCodeCoverage YES -workspace RFSegue.xcworkspace -scheme Test-iOS -destination "$XB_DEST" ONLY_ACTIVE_ARCH=NO | xcpretty | ||
- pod lib lint --allow-warnings | ||
after_failure: | ||
- cat -n ~/Library/Logs/DiagnosticReports/xctest*.crash | ||
- pod repo update master --silent | ||
script: ./.travis.sh MAIN | ||
after_success: ./.travis.sh SUCCESS | ||
after_failure: ./.travis.sh FAILURE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
|
||
platform :ios, '7.0' | ||
target 'Example-iOS' do | ||
platform :ios, '7.0' | ||
|
||
target 'RFSegueExample' do | ||
pod 'RFSegue', :path => '.' | ||
end | ||
|
||
target 'Test-iOS' do | ||
pod 'RFSegue', :path => '.' | ||
|
||
target 'Test-iOS' do | ||
inherit! :search_paths | ||
end | ||
end | ||
|
||
target 'Test-tvOS' do | ||
platform :tvos, '9.0' | ||
|
||
pod 'RFSegue', :path => '.' | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.