Distributed Ninja
DN, which is short for Distributed Ninja, aims to finish the time consuming compilation job with several machines. Unlike distcc or icecream, DN is based on ninja, and supports platforms: Linux
and Windows
. Ninja is a small build system with a focus on speed, it is born from @martine's work on the Chromium
browser project.
NOTE: currently this project is only a proof of concept.
Usage
-
Master
$ dn --working_dir=/path/to/your/project
-
Slave
$ dn --working_dir=/path/to/your/project --master=<master_ip>
Build
-
Clone the repository and submodule.
$ git clone https://github.com/zhchbin/DN.git $ cd DN && git submodule update --init
-
Install
gyp
.$ git clone https://github.com/svn2github/gyp $ cd gyp $ echo export PATH='$PATH':`pwd` >> ~/.bashrc && source ~/.bashrc
-
Install
ninja
.$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $ echo export PATH=`pwd`/depot_tools:'$PATH' >> ~/.bashrc $ echo export GYP_GENERATORS=ninja >> ~/.bashrc && source ~/.bashrc
-
Generate ninja build files and build
$ sudo apt-get install libcurl4-openssl-dev $ gyp --depth=. -I base/src/build/common.gypi $ ninja -C out/Debug
What I have done?
- Pull out useful low-level ("base") routines routines from the Chromium open-source project at http://www.chromium.org, see chromium-base.
- RPC componment based on
Google/protobuf
, seesrc/net
andsrc/rpc
. Usage demo can be found here. - Integrate
ninja
code into the our thread model, and dispatch compilation command from master to slave.
License
DN
's code in this repo uses the BSD license, see our LICENSE
file.