Skip to content

ci: fix CITATION NOTE, harden installs (pak retries), and macOS deployment target#24

Open
yannrichet-asnr wants to merge 2 commits into
masterfrom
ci/harden-install-and-citation
Open

ci: fix CITATION NOTE, harden installs (pak retries), and macOS deployment target#24
yannrichet-asnr wants to merge 2 commits into
masterfrom
ci/harden-install-and-citation

Conversation

@yannrichet-asnr

@yannrichet-asnr yannrichet-asnr commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes several rlibkriging CI issues (notably devtools-install_github and macOS R-CMD-check).

1. Stray CITATION.cff → R CMD check NOTE

src/libK/CITATION.cff (a libKriging repo-root file pulled via the submodule) is not part of the R package. tools/setup.sh now strips it alongside docs/tests.

2. Flaky pak install → retries

Transient error in pak subprocess / Cannot select new package installation task while installing devtools. Added retry loops:

  • tools/install_packages.R: retry install.packages (tunable via PKG_INSTALL_RETRIES / PKG_INSTALL_RETRY_DELAY).
  • install_github.yml: wrap both install_github steps in a 3-attempt retry loop.

3. macOS R CMD check WARNING (deployment target)

❯ checking whether package 'rlibkriging' can be installed ... WARNING
  ld: warning: object file (…/inst/lib/libKriging.a) was built for newer 'macOS'
  version (26.4) than being linked (26.0)

cmake defaults CMAKE_OSX_DEPLOYMENT_TARGET to the host OS (26.4), newer than R's link target (26.0). tools/build.sh now detects R's macOS deployment target (env / R -mmacosx-version-min / MACOSX_DEPLOYMENT_TARGET / probing R's compiler macro __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) and passes -DCMAKE_OSX_DEPLOYMENT_TARGET so the static libs match R's target. No-op if undetectable.

Note: R/Julia aren't runnable in the authoring environment, so items 2–3 are validated by this PR's CI.

- setup.sh: remove src/libK/CITATION.cff when assembling the R package. It is
  a libKriging repo-root file, not part of the R package, and R CMD check flags
  it ('CITATION file in a non-standard place: src/libK/CITATION.cff').
- install_packages.R: retry install.packages a few times (transient CRAN / pak
  subprocess failures otherwise fail CI). Tunable via PKG_INSTALL_RETRIES /
  PKG_INSTALL_RETRY_DELAY.
- install_github.yml: wrap the install_github steps in a 3-attempt retry loop
  to absorb the intermittent 'error in pak subprocess / Cannot select new
  package installation task' failures.
R CMD check failed on macOS with 'checking whether package can be installed ...
WARNING' because ld warned that the bundled static libs (libKriging.a, ...)
were 'built for newer macOS version (26.4) than being linked (26.0)': cmake
defaults CMAKE_OSX_DEPLOYMENT_TARGET to the host OS, newer than the target R
links against.

In tools/build.sh, detect R's macOS deployment target (env, R CFLAGS/CXXFLAGS
-mmacosx-version-min, MACOSX_DEPLOYMENT_TARGET, or probing R's compiler macro
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) and pass it as
-DCMAKE_OSX_DEPLOYMENT_TARGET (and export MACOSX_DEPLOYMENT_TARGET) so the
static libs match R's target. No-op when it can't be determined.
@yannrichet-asnr yannrichet-asnr changed the title ci: strip stray CITATION.cff and add retry loops to package installs ci: fix CITATION NOTE, harden installs (pak retries), and macOS deployment target Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant