Currently, only windows and linux are supported:
|
let rspm = process.env["RSPM"] ? `'${process.env["RSPM"]}'` : "NULL"; |
|
|
|
if (rspm === "NULL" && core.getInput("use-public-rspm") === "true") { |
|
// if we are on R 3.6.x, we use an RSPM snapshot |
|
const pin36: boolean = |
|
!process.env['RSPM_PIN_3_6'] && !!version.version.match(/^3[.]6[.]/); |
|
const snapshot: string = pin36 ? "2024-05-25" : "latest"; |
|
|
|
if (IS_WINDOWS) { |
|
rspm = `'https://packagemanager.posit.co/cran/${snapshot}'`; |
|
} |
|
if (IS_LINUX && ARCH == 'x86_64') { |
|
let codename = ""; |
|
try { |
|
await exec.exec("lsb_release", ["--short", "--codename"], { |
|
listeners: { |
|
stdout: (data: Buffer): string => (codename += data.toString()), |
|
}, |
|
}); |
|
} catch (error) { |
|
core.debug(`${error}`); |
|
|
|
throw `Failed to query the linux version: ${error}`; |
|
} |
|
codename = codename.trim(); |
|
|
|
rspm = `'https://packagemanager.posit.co/cran/__linux__/${codename}/${snapshot}'`; |
|
} |
|
} |
From rstudio/r-system-requirements#81 (comment) , @glin stated that macos binaries are now available. I checked that they produce binaries for the same R version coverage as tidyverse (release, oldrel-1 through oldrel-4).
Example URL of supported binary for terra on R 4.1: https://p3m.dev/cran/latest/bin/macosx/contrib/4.1/terra_1.8-42.tgz