Pro Pebble Development

Continuous Integration with Travis CI

May 11, 2015

Continuous Integration has continued to gain popularity in recent years, and is easier than ever with hosted solutions like Travis CI which obviate the need for provisioning a server and installing and configuring a more traditional CI tool like Jenkins. Travis CI uses GitHub Webhooks to initiate builds, and is free for open-source repositories, so the barrier to entry is trivially low for supported languages!

The barrier for Pebble developers has dropped significantly with sGerli’s new pBuild tool. Building on Sawyer Pangborn’s travis-ci-pebble for earlier Pebble SDK versions, pBuild consists of just three simple files which are added to your Pebble app’s existing repo, and once the required environment variables have been set on the Travis side, each subsequent push results in an entire build environment being brought up to automatically execute your build, then torn back down without lifting a finger (other than the one you were already going to have to lift to initiate that push)! pBuild is just two short scripts and a configuration file, but by taking care of all of the SDK/toolchain/dependency/environment details, you are left with a springboard from which further automation, such as testing, uploading of build artifacts or specific files to S3, or even automated GitHub Releases is possible. Oh, and of course you can add a snazzy little Build Status Image to your repo! pw-dos Build Status

Check out how easy it is to add uploading of build artifacts to S3, given the base script! :triumph: :floppy_disk: