Continuous Integration for Perl 6 modules using Travis-CI

Travis-CI is a service that offers Continuous Integration to open source project hosted on GitHub free of charge. It supports a number of languages, including several versions of Perl 5, but it does not support Perl 6 yet.

In this article you'll see how can you set up a Perl 6 based project to use the Travis-CI infrastructure using the latest version of Rakudo Star.

Note! This site is about Perl 6.
If you are looking for a solution for Perl 5, please check out the Perl 5 tutorial.

Use this sample as .travis.yml or follow the instructions for Perl 6 on Travis-CI.

    - gh-pages
language: perl6
sudo: false
  - latest
  - rakudobrew build-zef
  - zef install Test::META
  - zef --depsonly install .

Old Article

In this article you'll see how can you set up a Perl 6 based project to use the Travis-CI infrastructure using a binary version of Rakudo Star 2015.07.

Go to Travis-CI, sign up, let in synchronize with your GitHub repository and then in your account switch the specific project on.

In the GitHub repository of your project add a file called .travis.yml with the following content:

    - gh-pages
language: c
  - git clone ../perl6-travis-ci
  - ../perl6-travis-ci/
  - ../perl6-travis-ci/

git add, git commit and the git push.

Once this file reaches GitHub, and from that point every time you push out any of the changes you have, will start a new Travis-CI process.

Travis-CI will first get a copy of the current state of your project then the commands in the .travis.yml will be executed. The before_install part tells Travis-CI to clone the perl6-travis-ci repository I created. Once that has been cloned it will run the script from the repository. That script download the binary version of Rakudo Star 2014.12.1 I built for this purpose.

Then the script part will be executed which will use the prove command of Perl 5 which happens to be available on the system, (It has 5.14.x) to run

prove -ve "perl6 -Ilib"

That will run all the test in the t/ directory.

You can then add a Travis-CI badge to the file of your project to show the current status of the project by adding the following code:

[![Build Status](](

where you'd replace USER and PROJECT with your GitHub username and the name of the repository respectively.


I have set up the repository with the content of this site, and with the source code of this site to use Travis-CI. You can take a look at the .travis.yml and the files in both projects.


On thing that the current scripts don't handle yet is installing the dependencies of the module before running the tests. For now you'll need to add manually the list of dependencies using the script.

In this example I have installed the YAML and Web modules.

    - gh-pages
language: c
  - git clone ../perl6-travis-ci
  - ../perl6-travis-ci/
  - ../perl6-travis-ci/ YAML
  - ../perl6-travis-ci/ Web
  - ../perl6-travis-ci/

Building Rakudo Star for Travis-CI on Vagrant

Let me also include the instructions how I built Rakudo Star that is used in this process:

$ git clone [email protected]:szabgab/perl6-travis-ci.git
$ cd perl6-travis-ci
$ vagrant up
$ vagrant ssh

$ sudo mkdir /home/travis
$ sudo chown vagrant.vagrant /home/travis/
$ sudo aptitude -y install gcc make

$ wget
$ tar xzf rakudo-star-2015.07.tar.gz
$ cd rakudo-star-2015.07
$ perl --backends=moar --gen-moar --prefix=/home/travis/rakudo-2015-07-01
$ make
$ make install
$ cd /home/travis
$ tar czf rakudo-2015-07-01.tar.gz rakudo-2015-07-01
$ mv rakudo-2015-07-01.tar.gz /vagrant
$ exit

I used an extra number to represent the version numbers of my own experiments.

Finally I've uploaded rakudo-2015-07-01.tar.gz to the download directory of DWIM Perl.

Enjoy, and send me improvements.

Extra steps for Building Rakudo Star for Travis-CI on a Digital Ocean Droplet

Earlier I built Rakudo Start for Travis-CI on a Digital Ocean Droplet. Let me add a few releevant words here:

Create a Digital Ocean Droplet (1GB Ram Ubuntu 12.04.05 x64). I am using the older version of Ubuntu because AFAIK that's what Travis-CI is using.

Once the Droplet is created, Digital Ocean gives me the IP address of the machine:

First thing is to update all the packages on the server so it won't be exposed to already fixed security issues. Not even during the short period while I am building Rakudo Star.

If you want to follow these instruction you'll replace the IP with the IP address given by Digital Ocean and later you might need to replace the version number of Rakudo Star.

$ ssh [email protected]

# aptitude update
# aptitude -y safe-upgrade
# sudo reboot

After the machine reboots comes the building of Rakudo Star as has been described above.

Then I can copied the resulting file to my local machine before uploading it to DWIM Perl.

The Perl 6 Tricks and Treats newsletter has been around for a while. If you are interested to get special notification when there is new content on this site, it is the best way to keep track:
Full name:
This is a newsletter temporarily running on my personal site ( using Mailman, till I implement an alternative system in Perl 6.
Gabor Szabo
Written by Gabor Szabo

Published on 2015-01-01


In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by Disqus
Suggest a change
Elapsed time: 3.0552732

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.