NBuild
nbuild is a continuous integration system oriented to C/C++ projects based on CMake. Unlike other solutions, this is not a general purpose one. nbuild focuses on compiling and testing C/C++ projects through a heterogeneous computer network, nothing more. We can see it as a macro-compiler or a compiler orchestrator. It is used daily in the development of NAppGUI-SDK, whose reports are available through the BUILDS tab on the project website. It runs as a command line tool:
nbuild -n network.json -w workflow.json |
network.json: Build network.workflow.json: Workflows.
#1. Motivation and features
The first lines of nbuild were written in 2015, during the development of NAppGUI-SDK, as a small utility to launch remote compilation commands via ssh. Over time it has evolved taking on features typical of conventional CI/CD systems. There are several reasons why NAppGUI did not adopt any of these CI/CD but they can be summarized as: Complexity of deployment, avoidance of scripting, avoidance of the cloud and guaranteed lifetime operation on legacy platforms. All this together with the ease and power provided by the C+SSH tandem to implement any current or future need, has been enough motivation to keep improving this tool over the years. The main features of nbuild can be summarized as:
- Written in ANSI-C90, using the NAppGUI-SDK itself.
- Compilation, testing and packaging of C/C++ projects based on CMake.
- Oriented to Open-Source projects, where the source code is distributed.
- Minimal configuration in the nodes (runners) where it is only necessary to install SSH, CMake and the compilers.
- No cloud support or Internet connection required. Works on a local area network.
- It runs a fixed function pipeline, so there is no need to program scripts. Just indicate, inside
workflow.json, which code we want to compile and for which platforms. - There are no control panels. It runs as a command line tool.
- Every project can define its own build network.
- Works with legacy nodes such as Ubuntu12, WindowsXP or MacOSX Snow Leopard.
- A relatively large workflow can be divided into several stages of different priority, obtaining partial results as quickly as possible.
- Multithreading. Control different nodes in parallel.
- Scheduler. Matches jobs with available nodes.
- Non-blocking. The nbuild execution never interfere with or block new changes to the repository.
- nboot. Ability to turn on/off machines on demand, at the moment they are needed.
- ndoc. Generation of documentation associated with the project (HTML5/LaTeX/PDF).
- nreport. Generates web reports with the result of each compilation.
#2. License
nbuild is an Open Source project and is published under the MIT license. The source code is available at GitHub.


