One example of setting up Jenkins continuous integration for Arduino project can be found here: Continuous integration for embedded systemsContinuous integration for embedded systems
The example shows how to build and upload image to Arduino and execute Selenium web tests (the system under test is Arduino-based web-server).