Skip to content

Commit 934d604

Browse files
committed
Configure Travis; add Rakefile
1 parent 6e9d4e6 commit 934d604

File tree

3 files changed

+96
-12
lines changed

3 files changed

+96
-12
lines changed

.travis.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
# references:
2-
# * http://www.objc.io/issue-6/travis-ci.html
3-
# * https://github.com/supermarin/xcpretty#usage
4-
1+
osx_image: xcode7.1
52
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-
script:
12-
- set -o pipefail && xcodebuild test -workspace Example/StringScore_Swift.xcworkspace -scheme StringScore_Swift-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
13-
- pod lib lint
3+
script: travis_ci

Rakefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
XCODEBUILD_OPTS = "-project StringScore.xcodeproj -derivedDataPath DerivedData"
2+
IOS = "-scheme StringScore_Swift -sdk iphonesimulator9.1"
3+
MACOSX = "-scheme StringScore_Swift -destination 'generic/platform=OS X'"
4+
5+
def xcpretty(cmd)
6+
sh "set -o pipefail; #{cmd} | xcpretty -c"
7+
end
8+
9+
task default: %w[test]
10+
11+
task ci: %w[test:ios]
12+
13+
desc "Run all tests"
14+
task test: %w[test:ios test:macosx]
15+
16+
namespace :test do
17+
desc "Test on iOS"
18+
task :ios do
19+
xcpretty "xcodebuild test #{XCODEBUILD_OPTS} #{IOS}"
20+
end
21+
22+
desc "Test on Mac OS X"
23+
task :macosx do
24+
xcpretty "xcodebuild test #{XCODEBUILD_OPTS} #{MACOSX}"
25+
end
26+
end
27+
28+
namespace :podspec do
29+
desc "Validate the podspec"
30+
task :lint do
31+
sh "pod lib lint"
32+
end
33+
end
34+
35+
desc "Clean the default scheme"
36+
task :clean do
37+
rm_rf "DerivedData"
38+
end
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "2C40F6631CD48FA100E4A595"
20+
BuildableName = "StringScoreTests.xctest"
21+
BlueprintName = "StringScoreTests"
22+
ReferencedContainer = "container:StringScore.xcodeproj">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
<AdditionalOptions>
27+
</AdditionalOptions>
28+
</TestAction>
29+
<LaunchAction
30+
buildConfiguration = "Debug"
31+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
32+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
33+
launchStyle = "0"
34+
useCustomWorkingDirectory = "NO"
35+
ignoresPersistentStateOnLaunch = "NO"
36+
debugDocumentVersioning = "YES"
37+
debugServiceExtension = "internal"
38+
allowLocationSimulation = "YES">
39+
<AdditionalOptions>
40+
</AdditionalOptions>
41+
</LaunchAction>
42+
<ProfileAction
43+
buildConfiguration = "Release"
44+
shouldUseLaunchSchemeArgsEnv = "YES"
45+
savedToolIdentifier = ""
46+
useCustomWorkingDirectory = "NO"
47+
debugDocumentVersioning = "YES">
48+
</ProfileAction>
49+
<AnalyzeAction
50+
buildConfiguration = "Debug">
51+
</AnalyzeAction>
52+
<ArchiveAction
53+
buildConfiguration = "Release"
54+
revealArchiveInOrganizer = "YES">
55+
</ArchiveAction>
56+
</Scheme>

0 commit comments

Comments
 (0)