I have an R package with C++ code and I'm using GitHub actions to run unit tests and code coverage with covr
. Everything is working.
However, code coverage does not work with parallelized blocks of C++ code. Thus, significant portions of the code are nonexistent from the coverage point of view (not missed, not hit, just nonexistent).
Consequently, my plan it to disable OpenMP specifically on Github for the coverage action and compile the code without support of OpenMP. I see 2 options:
Makevars
, removing $(SHLIB_OPENMP_CXXFLAGS)
for this specific action, but I have no idea how to do it..yaml
file. But again I have no idea what to changeI found a third option. I'm running the coverage on macOS instead of Linux because it has no native support of OpenMP.