Oct 142015
 

ci-build-passing

I’ve spent the last week setting up Rapicorn and Beast with travis-ci.org, a free continuous integration service for Github. Since travis is only available for Github, this means the Beast Git repository (hosted on git.gnome.org) had to be moved (cloned) to Github.

Luckily, Git allows pushing to mutiple remotes:

git remote add all git@github.com:tim-janik/beast.git
git remote set-url --add --push all git@github.com:tim-janik/beast.git
git remote set-url --add --push all ssh://timj@git.gnome.org/git/beast
git remote show all
* remote all
  Fetch URL: git@github.com:tim-janik/beast.git
  Push  URL: git@github.com:tim-janik/beast.git
  Push  URL: ssh://timj@git.gnome.org/git/beast
  HEAD branch: master
  Remote branch:
    master new (next fetch will store in remotes/all)
  Local ref configured for 'git push':
    master pushes to master (up to date)

Now the following push will update both repositories:

git push all master

Also, ‘git push’ can be configured to push to ‘all’ instead of ‘origin’ by default:

git checkout master && git branch -u all/master
git push 
 To git@github.com:tim-janik/beast.git
  038d442..22c807a master -> master
 To ssh://timj@git.gnome.org/git/beast
  038d442..22c807a master -> master

The repos now contain a file .travis.yml that includes the complete build instructions, these need to be kept uptodate if any of the build dependencies change.

By default, travis-ci sets up Ubuntu 12.04 boxes for the continuous builds, but that’s way too old for most dependencies. Luckily there’s a beta program available to use Ubuntu 14.04 ‘trusty’, that can be selected with “dist: trusty”. The g++-4.8 compiler on trusty is still too old to build Beast, so the CI setup currently installs g++-5 from ppa:ubuntu-toolchain-r/test.

As a result, we now have automated test builds running on travis for the Rapicorn and Beast repositories that are triggered on each push command. After each build, the build bot reports success to the #beast IRC channel, and the current status can also be found via the “Build Status” buttons on github: Rapicorn Beast.

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookFlattr the authorBuffer this pageShare on RedditDigg thisShare on VKShare on YummlyPin on PinterestShare on StumbleUponShare on TumblrPrint this pageEmail this to someone

  One Response to “DevLog: Setting up Continuous Integration”

  1. I’m terrible with git. All these hard code git commands, I don’t want to even know.

    Here’s the idiots guide to having git.gnome.org on github:
    – Open browser and go to https://github.com/GNOME
    – In the search thing, fill in the repository
    – Click the link (https://github.com/GNOME/beast)

    IMO this is quite a bit easier, using 0 git commands! 😛 (if you push to GNOME above github will automatically sync)

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>