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 email@example.com:tim-janik/beast.git git remote set-url --add --push all firstname.lastname@example.org:tim-janik/beast.git git remote set-url --add --push all ssh://email@example.com/git/beast git remote show all * remote all Fetch URL: firstname.lastname@example.org:tim-janik/beast.git Push URL: email@example.com:tim-janik/beast.git Push URL: ssh://firstname.lastname@example.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 email@example.com:tim-janik/beast.git 038d442..22c807a master -> master To ssh://firstname.lastname@example.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.