Skip to content

Commit

Permalink
Attempt to debug Travis-CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSoftware committed Mar 12, 2015
1 parent 3d25ffa commit fe57ddf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ before_install:
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet

env:
- RAKETASK="simlist"
- RAKETASK="ios[iOS StaticLib,7.1,test]"
- RAKETASK="ios[iOS StaticLib,latest,test]"
- RAKETASK="ios[iOS Framework,latest,analyze]"
Expand Down
21 changes: 19 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
# Build & test OHHTTPStubs lib from the CLI

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)
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)
end

desc 'List installed simulators'
task :simlist do
sh 'xcrun simctl list'
end

desc 'Run all travis env tasks locally'
task :travis do
require 'YAML'
travis = YAML.load_file('.travis.yml')
travis['env'].each do |env|
arg = env.split('=')[1]
puts "\n" + ('-'*80) + "\n\n"
sh "rake #{arg}"
end
end


# Build the xcodebuild command and run it
def build(scheme, sdk, destination, action)
Expand All @@ -25,7 +42,7 @@ def build(scheme, sdk, destination, action)

cmd = %W(
xcodebuild
-workspace OHHTTPStubs.xcworkspace
-workspace OHHTTPStubs/OHHTTPStubs.xcworkspace
-scheme "#{scheme}"
-sdk #{sdk}
-configuration Release
Expand Down

0 comments on commit fe57ddf

Please sign in to comment.