Giter VIP home page Giter VIP logo

objc-build-scripts's Introduction

objc-build-scripts

This project is a collection of scripts created with two goals:

  1. To standardize how Objective-C projects are bootstrapped after cloning
  2. To easily build Objective-C projects on continuous integration servers

Scripts

Right now, there are two important scripts: bootstrap and cibuild. Both are Bash scripts, to maximize compatibility and eliminate pesky system configuration issues (like setting up a working Ruby environment).

The structure of the scripts on disk is meant to follow that of a typical Ruby project:

script/
    bootstrap
    cibuild

bootstrap

This script is responsible for bootstrapping (initializing) your project after it's been checked out. Here, you should install or clone any dependencies that are required for a working build and development environment.

By default, the script will verify that xctool is installed, then initialize and update submodules recursively. If any submodules contain script/bootstrap, that will be run as well.

To check that other tools are installed, you can set the REQUIRED_TOOLS environment variable before running script/bootstrap, or edit it within the script directly. Note that no installation is performed automatically, though this can always be added within your specific project.

cibuild

This script is responsible for building the project, as you would want it built for continuous integration. This is preferable to putting the logic on the CI server itself, since it ensures that any changes are versioned along with the source.

By default, the script will run bootstrap, look for any Xcode workspace or project in the working directory, then build all targets/schemes (as found by xcodebuild -list) using xctool.

You can also specify the schemes to build by passing them into the script:

script/cibuild ReactiveCocoa-Mac ReactiveCocoa-iOS

As with the bootstrap script, there are several environment variables that can be used to customize behavior. They can be set on the command line before invoking the script, or the defaults changed within the script directly.

Getting Started

To add the scripts to your project, read the contents of this repository into a script folder:

$ git remote add objc-build-scripts https://github.com/jspahrsummers/objc-build-scripts.git
$ git fetch objc-build-scripts
$ git read-tree --prefix=script/ -u objc-build-scripts/master

Then commit the changes, to incorporate the scripts into your own repository's history. You can also freely tweak the scripts for your specific project's needs.

To merge in upstream changes later:

$ git fetch -p objc-build-scripts
$ git merge --ff --squash -Xsubtree=script objc-build-scripts/master

objc-build-scripts's People

Contributors

aroben avatar joshvera avatar jspahrsummers avatar robrix avatar wpk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

objc-build-scripts's Issues

Tests not ran due to iphonesimulator error

When running cibuild, xctool run-tests returns exit code 1. It's returning 1 because iphoneos is not supported for running tests. But because it's returning 1, $action is then set to build instead of test, so the tests are never ran.

Is this a bug or is there something that needs to be configured differently?

Thanks

Bootstrap script includes xctool by default

The cibuild script requires xctool but the check done in bootstrap as a default requirement in its requirements checking step.

This has two drawbacks:

  • cibuild can be used without bootstrap, and the check wouldn't be done in that case. If xctool were to be missing the build would fail without printing any error.
  • bootstrap cannot be used without xctool, even though it has no need for xctool, and it's meant to be usable on its own, without cibuild.

Bootstrap recursively

Instead of running git submodule update recursively, we should run the subrepositories' own bootstrap scripts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.