Skip to content

Gem for running builds on Travis-CI with xcodebuild instead of xctool

License

Notifications You must be signed in to change notification settings

j-mutter/travis-xcodebuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

travis-xcodebuild

Drop-in replacement for running builds on Travis-CI with xcodebuild instead of xctool

Installation

Either add travis-xcodebuild to your Gemfile and install with bundler, or add gem install travis-xcodebuild to your install steps in .travis.yml

Usage

Simply set the script step of .travis.yml to either:

  • bundle exec travis-xcodebuild (with Gemfile) or,
  • travis-xcodebuild (with normal gem installation)

The build command that is run a clean analyze test. Output is piped through the wonderful xcpretty to clean it up for viewing it on the web, and raw xcodebuild output is saved to output.txt if you would like to archive it for debugging purposes.

Options

travis-xcodebuild uses the normal TRAVIS_XCODE_ settings for specifying the project/workspace and scheme to build.

For specifying the destination, set the TRAVIS_XCODE_SDK to the desired SDK/OS version, and optionally specify an IOS_PLATFORM_NAME environment variable (defaults to 'iPad').

Because everything is run through xcodebuild you can also specify other environment variable, such as CONFIGURATION_BUILD_DIR or CLANG_STATIC_ANALYZER_MODE and xcodebuild will respect them.

For example if your .travis.yml looks like this:

xcode_workspace: MyAppSpace.xcworkspace
xcode_scheme: MyApp
xcode_sdk: iphonesimulator7.1
env:
  global:
    - CONFIGURATION_BUILD_DIR=build
    - CLANG_STATIC_ANALYZER_MODE=deep
    - IOS_PLATFORM_NAME='iPhone Retina (4-inch)'
script: bundle exec travis-xcodebuild

It will yeild a build command of:

xcodebuild -workspace MyAppSpace.xcworkspace -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch),OS=7.1' clean analyze test

And will perform a deep static analysis, and put the build results in the build/ directory.

About

Gem for running builds on Travis-CI with xcodebuild instead of xctool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages