I had an epiphany the other day when troubleshooting an issue with a pull request that I had submitted, which is that you can have AppVeyor and Travis CI (free CI/CD services for public repos) build & test your commits to your fork’s feature branch on push by simply enabling the repo in your AppVeyor and/or Travis CI accounts.  In this instance, my changes had worked on my Fedora image, but the build failed on Travis CI’s Ubuntu Trusty image.  Had I thought of this beforehand, I would have been able to detect and resolve the issue before submitting the pull request.  This is especially useful if you are attempting to help augment and/or optimize the project’s build configuration.

Also, you can implement this even if the project doesn’t use either of these CI/CD services or if the owners do not store the build configuration in the respective YAML file.  The caveat is that in either case, you would have to configure the CI services yourself.

To start building & testing a new project in AppVeyor, go here, and for Travis CI, go to your profile page.

Enable a new project in AppVeyor

Enable a new project in Travis CI

So far, I have used this methodology to provide screenshots and build logs as evidence in a couple of pull requests.  I have also used this to create and submit a Travis CI build configuration for a project that was only using AppVeyor and demonstrated how it would work if merged.  Pretty cool, right?

Enjoy!

Improve this page

Comments