Using Travis CI for KiCad PDF schematic generation

I was thinking how to automatically generate PDF schematics for my public KiCad repos without committing it to the repo itself. I managed to make Travis CI do this for me and put the output to Github Releases.

If you are interested, read on.

First you will need a free Travis account. I made my own using Github OAuth so I don’t need any extra credentials.

Next I created a Github Personal access tokens to allow Travis access to my repos (guide). Save this token to your password manager, Github will never show it to you again. This will be used by Travis later.

The main step is to create .travis.yml file in your repo. Here is the one I use:

This build is using my eeshow container which was built from @thepjster’s branch who fixed eeshow to work for my project.

You’ll need to keep your *.lib files in the repo, for me wiring-cache.lib was needed. You will also probably need to edit SCHFILE and PDFFILE variables. You may also decide, whether you want to generate schematics for each commit or releases only (see last two commented lines). With this file committed to your repo (example here), you can proceed to enabling Travis.

To enable Travis, go to https://travis-ci.org/ and click the plus button next to My Repositories:

Next choose your repo and activate it:

The last step is to edit repo settings and add your Github Personal access token as GITHUB_OAUTH_TOKEN variable:

and click Add…

Now you should be ready to trigger your build. This is how it should look like when everything went OK. Depending on your settings, PDF will be pushed to Releases on each commit or each tagged commit. You will also get an e-mail about each build

Happy building!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.