Skip to content

Commit 2ce4e66

Browse files
authored
GH-49459: [R][CI] Use RHEL-9 binaries on Amazon Linux 2023 builds (#49460)
### Rationale for this change It takes 45 mins to install the duckdb R package in the benchmarks as it builds from source ### What changes are included in this PR? Use the RSPM RHEL9 binaries instead by mapping Amazon Linux 2023 to RHEL9 ### Are these changes tested? I did locally but I'll ask Ursabot to benchmark or whatever ### Are there any user-facing changes? Nah * GitHub Issue: #49459 Authored-by: Nic Crane <thisisnic@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
1 parent f83c554 commit 2ce4e66

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ci/etc/rprofile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ local({
44
rspm_template <- "https://packagemanager.rstudio.com/cran/__linux__/%s/latest"
55
# See https://github.com/rstudio/r-docker#releases-and-tags,
66
# but note that RSPM still uses "centos8"
7-
supported_os <- c("bionic", "focal", "jammy", "centos7", "centos8", "opensuse153")
7+
supported_os <- c("bionic", "focal", "jammy", "centos7", "centos8", "opensuse153", "rhel9")
8+
# Amazon Linux 2023 is compatible with RHEL 9 binaries
9+
amzn_to_rhel <- c("2023" = "rhel9")
810

911
if (nzchar(Sys.which("lsb_release"))) {
1012
os <- tolower(system("lsb_release -cs", intern = TRUE))
@@ -28,6 +30,13 @@ local({
2830
return(sprintf(rspm_template, os))
2931
}
3032
}
33+
# Amazon Linux: map to compatible RHEL version
34+
if (gsub('"', '', vals["ID"]) == "amzn") {
35+
version <- gsub('"', '', vals["VERSION_ID"])
36+
if (version %in% names(amzn_to_rhel)) {
37+
return(sprintf(rspm_template, amzn_to_rhel[version]))
38+
}
39+
}
3140
}
3241
}
3342
if (file.exists("/etc/system-release")) {

0 commit comments

Comments
 (0)