Use pre-built Rakudo packages on Travis CI

I changed my Perl 6 Travis setup so I’m not using the community supported Perl 6. That one builds rakudo and sometimes it exhausts the memory. Even if it didn’t do that it takes awhile to get to the things I want to test. My new configuration takes the run time from about 7 to under 2 minutes.

Claudio Ramirez provides some pre-built Rakudo packages for Linux. I can install those instead of building Rakudo. To do that I can’t declare a language (or can declare some language that in the base image). Declaring “perl6” builds rakudo—maybe someone will change the community edition to use the pre-built package.

I still have a problem with the URL to get the pre-built package. There is a URL to get the latest package by redirecting through some javascript. It’s not something that needs to happen in Javascript since the answers don’t change and we could have a static page. That’s maybe something I can work on later—or maybe you can. Put the direct links in the README and regenerate that when the packages change (monthly).

This is working nicely so far and I can improve on it later:

env:
  global:
    - TMPDIR=/tmp
    - RAKUDO_PKG_URL=https://github.com/nxadm/rakudo-pkg/releases/download/v2018.02.1/rakudo-pkg-Ubuntu14.04_2018.02.1-01_amd64.deb

# https://docs.travis-ci.com/user/installing-dependencies/#Installing-Packages-without-an-APT-Repository
before_install:
  - cd ${TMPDIR}
  # https://github.com/nxadm/rakudo-pkg
  - wget -O rakudo-pkg.deb ${RAKUDO_PKG_URL}
  - sudo dpkg -i rakudo-pkg.deb
  - export PATH=$PATH:~/.perl6/bin:/opt/rakudo-pkg/bin
  # https://github.com/ugexe/zef
  - git clone https://github.com/ugexe/zef.git && cd zef && perl6 -Ilib bin/zef install .

install:
  - cd ${TRAVIS_BUILD_DIR}
  - zef --debug --depsonly install .

script:
  - prove -v -r -e "perl6 --ll-exception -Ilib" t

4 comments

  1. Nice thanks! I removed zef installation from this, because zef is already included in the debian package. Working nicely!

Leave a Reply

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