Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-15481: [R] [CI] Add a crossbow job that mimics CRAN's old macOS #13925

Merged
merged 9 commits into from
Sep 12, 2022
31 changes: 20 additions & 11 deletions dev/tasks/r/github.packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,36 +137,45 @@ jobs:
matrix:
platform:
- windows-latest
# This is newer than what CRAN builds on, but Travis is no longer an option for us, so...
- macos-10.15
- macos-10.13 # self-hosted
# - devops-managed # No M1 until the runner application runs native
r_version:
- { rtools: 40, r: "4.1" }
- { rtools: 42, r: "4.2" }
steps:
- uses: r-lib/actions/setup-r@v2
if: matrix.platform != 'macos-10.13'
with:
r-version: {{ '${{ matrix.r_version.r }}' }}
rtools-version: {{ '${{ matrix.r_version.rtools }}' }}
Ncpus: 2
- name: Setup R Self-Hosted
if: matrix.platform == 'macos-10.13'
run: |
# rig is a system utility that allows for switching
# between pre-installed R version on the self-hosted runners
rig default {{ '${{ matrix.r_version.r }}' }}
rig system setup-user-lib
rig system add-pak
{{ macros.github_setup_local_r_repo(false, true)|indent }}
- name: Prepare Dependency Installation

shell: bash
run: |
tar -xzf repo/src/contrib/arrow_*.tar.gz arrow/DESCRIPTION
assignUser marked this conversation as resolved.
Show resolved Hide resolved
- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: 'arrow'
extra-packages: cpp11
- name: Build Binary
id: build
shell: Rscript {0}
env:
NOT_CRAN: "true" # actions/setup-r sets this implicitly
ARROW_R_DEV: TRUE
run: |
on_windows <- tolower(Sys.info()[["sysname"]]) == "windows"

# Install dependencies by installing (yesterday's) binary, then removing it
install.packages(c("arrow", "cpp11"),
type = "binary",
repos = c("https://nightlies.apache.org/arrow/r", "https://cloud.r-project.org")
)

cat("Remove old arrow version.\n")
remove.packages("arrow")

# Build
Sys.setenv(MAKEFLAGS = paste0("-j", parallel::detectCores()))
INSTALL_opts <- "--build"
Expand Down