[R-pkg-devel] Travis/appveyor with CXX14/17

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Fri Jun 7 18:09:04 CEST 2019

On 7 June 2019 at 10:13, Tim Keitt wrote:
| I bumped a package to CXX14/17 and it failed on Travis/Appveyor while
| checking fine locally. I assume I need to request different compilers or


Working with a seriously outdated base layer of Ubuntu is a key bug^Hfeature
of Travis.  Maddening, really.

| something like that. Anyone have a quick recipe for that?

Yes.  In fact, two different ways.

i)  If you use the old Travis set up which is more shell-script alike, then
    one way is to use a PPA for nighlies/more current gcc or clang
    versions. I used to do that some client packages that needed newer
    compilers. An older example is still here


ii) Screw Travis and use the fact that you can now bring your own Docker
    container.  That is much preferable as you are in _complete_ control of
    the test environment. I switched a few packages to this, particularly
    when they needed additional libraries which I was building / providing
    via a PPA anyway. Two examples:


    If you don't need extra libraries then something like this container have
    R, recent toolchain and support for PPAs. I have been meaning to blog
    about it with an example:


    Obviously you can also start from vanilla Rocker's r-base, or any other
    Debian container.  Again,  your control, possibly also your initial work.

    A scheme I found helpful in a few repos is to create

      docker/ci/Dockerfile     -- base layer for CI, used by Travis
      docker/run/Dockerfile    -- above plus the actual repo code

    where the latter one is a simple container for users of the package.

Hth, Dirk

http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

More information about the R-package-devel mailing list