user16253: I'm working on adding my Arduino to continuous integration and I came across two different possible ways of doing this, Arduino command line, and arduino-builder.  Can someone explain why the arduino-builder tool exists separately from calling Arduino from the command line?  And what are the advantages of using one over the other?

user42393: I've written a new option for Arduino CI/unit testing and put together a decent size writeup about it as an answer to this related question.  
I ended up using the Arduino command line instead of arduino-builder, because it worked better cross-platform for me.  It assumes a graphical display though, even if you just use the CLI features.  In the case of Travis CI, I needed to spin up a fake X display to handle the initial splash screen and other graphical error messages.  (Fortunately, you can tell based on how long a command takes to complete whether it's waiting for you to acknowledge a graphical error message.)
Some examples of how to enable CI on your own project:

The DoSomething example library shown above, used to test arduino_ci itself
A practical example, testing a Queue implementation 
A complex example, simulating a library that controls an interactive device over a SoftwareSerial connection as part of the Adafruit FONA library


user18885: The Arduino IDE command line predates arduino-builder and was made available when the source pre-processing and compiling was implemented by a Java class (deeply) embedded in the IDE.
The current IDE uses arduino-builder behind the scenes to process and compile the code so if you use arduino-builder you avoid having to load the whole Java IDE. Try it out it does some pretty cool stuff

16253: <p>I'm working on adding my Arduino to continuous integration and I came across two different possible ways of doing this, <a href="https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc" rel="noreferrer">Arduino command line</a>, and <a href="https://github.com/arduino/arduino-builder" rel="noreferrer">arduino-builder</a>.  Can someone explain why the arduino-builder tool exists separately from calling Arduino from the command line?  And what are the advantages of using one over the other?</p>
 42393: <p>I've written <a href="https://github.com/ifreecarve/arduino_ci" rel="nofollow noreferrer">a new option for Arduino CI/unit testing</a> and put together <a href="https://stackoverflow.com/a/49161903/2063546">a decent size writeup about it as an answer to this related question</a>.  </p>

<p>I ended up using the Arduino command line instead of arduino-builder, because it worked better cross-platform for me.  It assumes a graphical display though, even if you just use the CLI features.  In the case of Travis CI, I needed to spin up a fake X display to handle the initial splash screen and other graphical error messages.  (Fortunately, you can tell based on how long a command takes to complete whether it's waiting for you to acknowledge a graphical error message.)</p>

<p>Some examples of how to enable CI on your own project:</p>

<ul>
<li>The <a href="https://github.com/ifreecarve/arduino_ci/tree/master/SampleProjects/DoSomething" rel="nofollow noreferrer">DoSomething example library</a> shown above, used to test arduino_ci itself</li>
<li>A practical example, <a href="https://github.com/sdesalas/Arduino-Queue.h/pull/1/files" rel="nofollow noreferrer">testing a Queue implementation</a> </li>
<li>A complex example, simulating a library that controls an interactive device over a SoftwareSerial connection as part of the <a href="https://github.com/adafruit/Adafruit_FONA/pull/91/files" rel="nofollow noreferrer">Adafruit FONA library</a></li>
</ul>
 18885: <p>The Arduino IDE command line predates arduino-builder and was made available when the source pre-processing and compiling was implemented by a Java class (deeply) embedded in the IDE.</p>

<p>The current IDE uses arduino-builder behind the scenes to process and compile the code so if you use arduino-builder you avoid having to load the whole Java IDE. Try it out it does some pretty cool stuff</p>
