Continuous Integration

From PostgreSQL wiki

Jump to: navigation, search

Here is some information about how to use a variety of free continuous integration services, for PostgreSQL hackers. You'll need a BitBucket, GitHub, GitLab or other public source repository account. Then you'll need to select one or more CI service and tell it to watch your account. In the case of the popular repo hosts you don't have to create a new account on the CI provider websites, just grant access. Finally you'll have to tell it how to builds your branches with a control file in your source tree. In some case the configuration can also be out-of-tree instead.

Here is an example of a patch that adds AppVeyor and Travis CI control files. Commit this to a development branch, configure one or both of those services to watch your public repo for branches holding a control file, push your branch and ... watch the builds begin. Tweak to taste. 0001-Add-CI-control-files-for-Travis-and-AppVeyor.patch At the time of writing, that's the same control files that is using.



AppVeyor builds and tests code on Windows. This is especially interesting to people developing on Unix systems, who otherwise might not find out they've broken the code for Windows until their patch is committed. Support for GitHub, GitHub Enterprise, Bitbucket, GitLab, VSTS, Kiln or custom repos. If you have an account on those systems you can log in directly and authorise it to access your repo. Then check the box to ask it to build all branches that contain an appveyor.yml file. An example control file is included in the patch above. Discussion




CodeCov is not a CI system, but is closely related and worth mentioning. If you configure Travis CI to build and test your branches with coverage enabled, you might also be interested to see code coverage information in a nice web interface on CodeCov. (There are several competing services that might be worth mentioning too.)



Travis CI

Travis CI builds and tests code on Ubuntu GNU/Linux (and possibly also macOS?) This might be interesting for people developing primarily on Windows. Works only with GitHub. Controlled by a .travis.yml file. An example control file is included in the patch above, similar to the one used by the (unofficial) Commitfest Patch Tester.

Personal tools