The repository contains a way to re-create the software available on CRAN's macOS build systems within the GitHub Actions for R workflow for Continuous Integration (CI).
To accomplish this, we add a single step to the standard workflow
from usethis
that activates when the build container is running on macOS. The new step
downloads and extracts all pre-made binaries on
the libs-4
directory at the
R macos developer portal. These binaries were
created using the recipes
system by
Simon Urbanek, who is the official CRAN maintainer
for macOS.
In short, we added:
- name: Install system dependencies for mac
if: runner.os == 'MacOS'
run: |
curl -sL https://mac.r-project.org/libs-4/ |
sed -n 's/.*href=\([^>]*x86_64.tar.gz\).*/\1/p' |
xargs -I % sh -c 'curl https://mac.r-project.org/libs-4/% --output %; sudo tar fxz % -C /usr/local --strip 2'
Note: This is an unofficial project not associated with the CRAN team. The goal here is to show how to recreate on a CI system the binaries available on CRAN for testing packages.
MIT