actions
actions copied to clipboard
[check-r-package] Replicate parallel make as in CRAN?
Is your feature request related to a problem? Please describe.
My package uses r-lib/actions check-r-package : https://github.com/multi-objective/moocore/blob/main/.github/workflows/R.yml
but it breaks in CRAN due to parallel make:
Describe the solution you'd like
Some option to simulate the CRAN setup and detect these problems earlier.
check-r-package already defaults to --as-cran, and according to their policies that's what you are supposed to do before a submission. I understand that this is probably not enough in practice, but I prefer to stick to the policies instead trying to play detective.
OTOH, you can already set options and environment variables as you like, so if you know what to change, you can already do it.
Pull requests are also welcome.
@MLopez-Ibanez Just add MAKEFLAGS: "-j 2" (or desired thread number) to your env, e.g.,
strategy:
fail-fast: false
matrix:
config:
- {os: macos-15, r: 'devel'}
- {os: macos-15, r: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
MAKEFLAGS: "-j 2"
@gaborcsardi AFAIK, currently CRAN is using parallel make only on Fedora runners.