No commit activity in last 3 years
No release in over 3 years
Run builds on Travis-CI using `xcodebuild` and `xcpretty` instead of `xctool`
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3

Runtime

 Project Readme

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.