Skip to content

Commit

Permalink
ARROW-15481: [R] [CI] Add a crossbow job that mimics CRAN's old macOS (
Browse files Browse the repository at this point in the history
…#13925)

Authored-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Neal Richardson <[email protected]>
  • Loading branch information
assignUser authored Sep 12, 2022
1 parent 05b7fe3 commit 6c675c3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
3 changes: 3 additions & 0 deletions dev/tasks/macros.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ on:
{%- macro github_test_r_src_pkg() -%}
source("https://raw.githubusercontent.com/apache/arrow/HEAD/ci/etc/rprofile")

# always remove arrow (mainly for self-hosted runners)
try(remove.packages("arrow"), silent = TRUE)

install.packages(
"arrow",
repos = c(getOption("arrow.dev_repo"), getOption("repos")),
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/r/github.macos.autobrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

jobs:
autobrew:
name: "Autobrew {{ "${{ matrix.platform }}" }}"
name: "Autobrew {{ '${{ matrix.platform }} R ${{ matrix.r-version }}' }}"
runs-on: {{ "${{ matrix.platform }}" }}
strategy:
fail-fast: false
Expand Down
34 changes: 23 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
- 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 All @@ -175,6 +184,9 @@ jobs:
INSTALL_opts <- c(INSTALL_opts, "--strip")
}
# always remove arrow (mainly for self-hosted runners)
try(remove.packages("arrow"), silent = TRUE)
cat("Install arrow from dev repo.\n")
install.packages(
"arrow",
Expand Down
2 changes: 1 addition & 1 deletion r/tools/autobrew
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fi
# Hardcode this for my custom autobrew build
rm -f $BREWDIR/lib/*.dylib
AWS_LIBS="-laws-cpp-sdk-config -laws-cpp-sdk-transfer -laws-cpp-sdk-identity-management -laws-cpp-sdk-cognito-identity -laws-cpp-sdk-sts -laws-cpp-sdk-s3 -laws-cpp-sdk-core -laws-c-event-stream -laws-checksums -laws-c-common -laws-crt-cpp -laws-c-io -laws-c-s3 -laws-c-auth -laws-c-http -laws-c-cal -laws-c-compression -laws-c-mqtt -lpthread -lcurl"
PKG_LIBS="-lparquet -larrow_dataset -larrow -larrow_bundled_dependencies -lthrift -lbrotlienc -lbrotlidec -lbrotlicommon -llz4 -lsnappy -lzstd $AWS_LIBS"
PKG_LIBS="-lparquet -larrow_dataset -larrow -larrow_bundled_dependencies -lthrift -lbrotlienc-static -lbrotlidec-static -lbrotlicommon-static -llz4 -lsnappy -lzstd $AWS_LIBS"
PKG_DIRS="-L$BREWDIR/lib"

# Prevent CRAN builder from linking against old libs in /usr/local/lib
Expand Down

0 comments on commit 6c675c3

Please sign in to comment.