Skip to content

Commit

Permalink
Update Rakefile + travils.yml for testing tvOS Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSoftware committed Oct 31, 2015
1 parent 21d896d commit 0192751
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7
osx_image: xcode7.1

before_install:
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
Expand All @@ -10,6 +10,7 @@ env:
- RAKETASK="ios[iOS StaticLib,latest,test]"
- RAKETASK="ios[iOS Framework,latest,test]"
- RAKETASK="osx[Mac Framework,x86_64,test]"
- RAKETASK="tvos[tvOS Framework,latest,test]"

script:
- rake "$RAKETASK"
2 changes: 0 additions & 2 deletions OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,6 @@
PRODUCT_NAME = OHHTTPStubs;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -1637,7 +1636,6 @@
PRODUCT_NAME = OHHTTPStubs;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
ReferencedContainer = "container:OHHTTPStubs.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA100AB61BE15BE400129352"
BuildableName = "OHHTTPStubs tvOS Fmk Tests.xctest"
BlueprintName = "OHHTTPStubs tvOS Fmk Tests"
ReferencedContainer = "container:OHHTTPStubs.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand All @@ -32,7 +46,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EAA436A71BE159AC000E9E99"
BlueprintIdentifier = "EA100AB61BE15BE400129352"
BuildableName = "OHHTTPStubs tvOS Fmk Tests.xctest"
BlueprintName = "OHHTTPStubs tvOS Fmk Tests"
ReferencedContainer = "container:OHHTTPStubs.xcodeproj">
Expand Down
22 changes: 22 additions & 0 deletions OHHTTPStubs/OHHTTPStubs.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
desc 'Build an iOS scheme'
task :ios, [:scheme, :ios_version, :action] do |_,args|
destination = "platform=iOS Simulator,name=iPhone 5,OS=#{args.ios_version}"
build("OHHTTPStubs #{args.scheme}", "iphonesimulator", destination, args.action)
build("OHHTTPStubs #{args.scheme}", destination, args.action)
end

desc 'Build an OSX scheme'
task :osx, [:scheme, :arch, :action] do |_,args|
destination = "platform=OS X,arch=#{args.arch}"
build("OHHTTPStubs #{args.scheme}", "macosx", destination, args.action)
build("OHHTTPStubs #{args.scheme}", destination, args.action)
end

desc 'Build a tvOS scheme'
task :tvos, [:scheme, :tvos_version, :action] do |_,args|
destination = "platform=tvOS Simulator,name=Apple TV 1080p,OS=#{args.tvos_version}"
build("OHHTTPStubs #{args.scheme}", destination, args.action)
end


desc 'List installed simulators'
task :simlist do
sh 'xcrun simctl list'
Expand All @@ -30,7 +37,7 @@ end


# Build the xcodebuild command and run it
def build(scheme, sdk, destination, action)
def build(scheme, destination, action)
puts <<-ANNOUNCE
=============================
| Action: #{action}
Expand All @@ -44,7 +51,6 @@ def build(scheme, sdk, destination, action)
xcodebuild
-workspace OHHTTPStubs/OHHTTPStubs.xcworkspace
-scheme "#{scheme}"
-sdk #{sdk}
-configuration Debug
ONLY_ACTIVE_ARCH=NO
-destination '#{destination}'
Expand Down

0 comments on commit 0192751

Please sign in to comment.