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

Tim Keitt tke|tt @end|ng |rom gm@||@com
Sat Jun 8 02:24:12 CEST 2019


On Fri, Jun 7, 2019 at 11:09 AM Dirk Eddelbuettel <edd using debian.org> wrote:

>
> 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
>
> Correct.
>
> 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
>
>     https://github.com/eddelbuettel/cpptoml/blob/master/.travis.yml
>
> 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:
>
>       https://github.com/eddelbuettel/rquantlib/blob/master/.travis.yml
>       https://github.com/rcppmlpack/rcppmlpack2/blob/master/.travis.yml
>
>     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:
>
>       https://hub.docker.com/r/rocker/r-apt
>
>     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.
>

That's super helpful. Thanks.

THK


>
> Hth, Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list