I am trying to build an R package with c++ code on Travis CI and checking it with valgrind by running R CMD check
with the --use-valgrind
option. In the R extensions manual it says to either provide a ~/.valgrindrc
file with the required options or set them in the environment variable VALGRIND_OPTS
but I haven't been able to figure out either of these.
I have created a demo repo here that includes a Rcpp function which valgrind ought to respond to.
My .travis.yml
setup looks like this:
language: r
sudo: false
cache: packages
r_check_args: '--use-valgrind'
addons:
apt:
packages:
- valgrind
I have a .valgrindrc
file with the following,
--leak-check=full
--track-origins=yes
, and have tried to put it in ./inst/
and the root directory but none of that has worked. Does anybody know how to set these options properly?
Edit: here is a link to the latest travis build.