is a service that offers free build servers for open-source projects ( ). It has tight integration with GitHub, allowing you to automatically build and test code in a pull request before merging. This is great for projects with multiple contributors, because you can run tests without checking-out the code yourself. Travis CI thanks, VCs! But how do you integrate a based project with Travis CI? Buck To follow this guide you will need the following: A that builds with Buck GitHub project An account on Travis CI TL;DR Grab the relevant files from the . example repo on GitHub Create a .travis.yml File At the heart of a Travis project is the file. This is a YAML file that defines the build steps and build environment for your project. The most important property is , which is the list of Bash commands. .travis.yml script For example: Run build.sh on Ubuntu “Trusty” Install Build Dependencies Buck is not packaged with any of the Travis system images, so we will need to add an installation step to the Travis file. Installation steps live under the element. before_install The easiest way to get Buck running on Linux is via , the Linux port of . Like Homebrew, Linuxbrew allows us to easily install packages in userland, and it is mostly package-compatibile. Linuxbrew Homebrew This snippet runs before the project is built. First, it installs Linuxbrew, then it uses Linuxbrew to install Buck. You might have noticed that we use the provided Linuxbrew install script. This is because it is best to keep everything in the home folder, which ensures that the Travis user has read and write access. did not Once we have Buck installed, the portion of can call Buck: script .travis.yml Pulling everything together, we have the following: Add this file to the root of your project, and be sure to change the command to point to the correct Buck target! buck build Connect Travis CI to GitHub Once the Travis file is in place, you need to connect Travis CI to your GitHub project. , then flick the switch on the project you want to integrate. Create an account on Travis CI Travis will now be integrated with your project, and it will start building . You will also notice useful notifications appear in your pull requests! master Accelerating the Build The build will take a while because it has to install all of the dependencies each time! We can improve this massively by taking advantage of Travis CI’s cache feature. Travis CI allows you to mark a directory as cached, which means it gets re-used between builds. Since we installed Linuxbrew in userland, we can just cache the whole directory. On subsequent builds, Linuxbrew will detect that our dependencies are already installed and skip the installation step. ~/.linuxbrew We also need to make sure that we do not Linuxbrew twice: git clone Pulling everything together gives us the finished Travis file: Conclusion And that’s it! The full Travis file should be enough to get started, or you can grab the relevant files from the . example repo on GitHub