diff --git a/compose.yaml b/compose.yaml index b89d3082c79..18cd75385ed 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1761,7 +1761,7 @@ services: cache_from: - ${REPO}:r-rstudio-r-base-4.2-focal-revdepcheck args: - base: rstudio/r-base:4.2-focal + base: posit/r-base:4.2-focal r_dev: ${ARROW_R_DEV} tz: ${TZ} shm_size: *shm-size diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 6c17eecabb2..c1a29f86033 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -247,11 +247,13 @@ env: path: repo/libarrow {% endif %} {% if get_nix %} - - name: Get Linux binary + {% for arch in ["x86_64", "arm64"] %} + - name: Get Linux {{ arch }} binary uses: actions/download-artifact@v4 with: - name: r-libarrow-linux-x86_64 + name: r-libarrow-linux-{{ arch }} path: repo/libarrow + {% endfor %} {% endif %} {% if get_mac %} {% for arch in ["x86_64", "arm64"] %} diff --git a/dev/tasks/r/github.linux.versions.yml b/dev/tasks/r/github.linux.versions.yml index b7b55ca8252..e5ed151a937 100644 --- a/dev/tasks/r/github.linux.versions.yml +++ b/dev/tasks/r/github.linux.versions.yml @@ -21,12 +21,12 @@ jobs: r-versions: - name: "rstudio/r-base:{{ MATRIX }}-jammy" + name: "posit/r-base:{{ MATRIX }}-jammy" runs-on: ubuntu-latest strategy: fail-fast: false matrix: - # See https://hub.docker.com/r/rstudio/r-base + # See https://hub.docker.com/r/posit/r-base r_version: # We test devel, release, and oldrel in regular CI. # This is for older versions diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index f57901371bd..ddfb44a58a6 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -111,14 +111,22 @@ jobs: {{ '${{ env.PKG_FILE }}' }}.sha512 linux-cpp: - name: C++ Binary Linux - runs-on: ubuntu-latest + name: C++ Binary Linux {{ '${{ matrix.arch }}' }} + runs-on: {{ '${{ matrix.runs-on }}' }} needs: source strategy: fail-fast: false + matrix: + include: + - arch: x86_64 + runs-on: ubuntu-latest + ubuntu: "22.04" + - arch: arm64 + runs-on: ubuntu-24.04-arm + ubuntu: "24.04" env: - PKG_ID: r-libarrow-linux-x86_64 - PKG_FILE: r-libarrow-linux-x86_64-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip + PKG_ID: r-libarrow-linux-{{ '${{ matrix.arch }}' }} + PKG_FILE: r-libarrow-linux-{{ '${{ matrix.arch }}' }}-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip steps: {{ macros.github_checkout_arrow()|indent }} {{ macros.github_change_r_pkg_version(is_fork, '${{ needs.source.outputs.pkg_version }}')|indent }} @@ -126,7 +134,8 @@ jobs: - name: Build libarrow shell: bash env: - UBUNTU: "22.04" + ARCH: {{ "${{ matrix.arch == 'x86_64' && 'amd64' || 'arm64v8' }}" }} + UBUNTU: {{ '${{ matrix.ubuntu }}' }} {{ macros.github_set_sccache_envvars()|indent(8) }} run: | source arrow/ci/scripts/util_enable_core_dumps.sh @@ -290,8 +299,8 @@ jobs: path: arrow_* test-linux-binary: needs: [source, linux-cpp] - name: Test binary {{ '${{ matrix.config.image }}' }} - runs-on: ubuntu-latest + name: Test binary {{ '${{ matrix.config.image }}' }} {{ '${{ matrix.config.runner }}' }} + runs-on: {{ '${{ matrix.config.runner }}' }} container: {{ '${{ matrix.config.image }}' }} strategy: fail-fast: false @@ -302,13 +311,17 @@ jobs: # an OS that is not in the allowlist, so we have to opt-in to use the # binary. Other env vars used in r_docker_configure.sh can be added # here and wired up in the later steps. - - {image: "rhub/ubuntu-clang", libarrow_binary: "TRUE"} + # x86_64 tests + - {image: "rhub/ubuntu-clang", libarrow_binary: "TRUE", runner: "ubuntu-latest"} # fedora-clang-devel cannot use binaries bc of libc++ (uncomment to see the error) - # - {image: "rhub/fedora-clang-devel", libarrow_binary: "TRUE"} - - {image: "rhub/ubuntu-release"} # currently ubuntu-22.04 - - {image: "rstudio/r-base:4.1-jammy"} - - {image: "rstudio/r-base:4.2-jammy"} - - {image: "rstudio/r-base:4.3-noble"} + # - {image: "rhub/fedora-clang-devel", libarrow_binary: "TRUE", runner: "ubuntu-latest"} + - {image: "rhub/ubuntu-release", runner: "ubuntu-latest"} # currently ubuntu-22.04 + - {image: "posit/r-base:4.1-jammy", runner: "ubuntu-latest"} + - {image: "posit/r-base:4.2-jammy", runner: "ubuntu-latest"} + - {image: "posit/r-base:4.3-noble", runner: "ubuntu-latest"} + # ARM64 tests + - {image: "posit/r-base:4.2-jammy", runner: "ubuntu-24.04-arm"} + - {image: "posit/r-base:4.3-noble", runner: "ubuntu-24.04-arm"} steps: # Get the arrow checkout just for the docker config scripts # Don't need submodules for this (hence false arg to macro): they fail on @@ -349,7 +362,7 @@ jobs: if: false needs: test-linux-binary runs-on: ubuntu-latest - container: "rstudio/r-base:4.2-centos7" + container: "posit/r-base:4.2-centos7" steps: - uses: actions/download-artifact@v4 with: diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 9d0a2604682..f93b7a05e8a 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -255,13 +255,21 @@ check_allowlist <- function( any(grepl(paste(allowlist, collapse = "|"), os)) } +normalise_arch <- function(arch) { + if (arch %in% c("aarch64", "arm64")) { + return("arm64") + } + arch +} + select_binary <- function( os = tolower(Sys.info()[["sysname"]]), arch = tolower(Sys.info()[["machine"]]), test_program = test_for_curl_and_openssl ) { - if (identical(os, "darwin") || (identical(os, "linux") && identical(arch, "x86_64"))) { - # We only host x86 linux binaries and x86 & arm64 macos today + arch <- normalise_arch(arch) + + if (identical(os, "darwin") || identical(os, "linux")) { binary <- tryCatch( # Somehow the test program system2 call errors on the sanitizer builds # so globally handle the possibility that this could fail diff --git a/r/tools/test-nixlibs.R b/r/tools/test-nixlibs.R index b1d6214fd87..f7711c97ce4 100644 --- a/r/tools/test-nixlibs.R +++ b/r/tools/test-nixlibs.R @@ -52,8 +52,8 @@ test_that("identify_binary() based on LIBARROW_BINARY", { test_that("select_binary() based on system", { expect_output( - expect_null(select_binary("linux", arch = "aarch64")), # Not built today - "Building on linux aarch64" + expect_null(select_binary("freebsd", arch = "x86_64")), + "Building on freebsd x86_64" ) })