actions icon indicating copy to clipboard operation
actions copied to clipboard

[check-r-package] Replicate parallel make as in CRAN?

Open MLopez-Ibanez opened this issue 6 months ago • 2 comments

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:

parallel-make.txt

Describe the solution you'd like

Some option to simulate the CRAN setup and detect these problems earlier.

MLopez-Ibanez avatar May 12 '25 11:05 MLopez-Ibanez

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.

gaborcsardi avatar May 12 '25 12:05 gaborcsardi

@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.

albersonmiranda avatar May 26 '25 12:05 albersonmiranda