Skip to content

Commit

Permalink
apacheGH-41426: [R][CI] Install CRAN style openssl on gh runners. (ap…
Browse files Browse the repository at this point in the history
…ache#41629)

### Rationale for this change

See issue.

### What changes are included in this PR?

Enforce usage of binary and install of cran openssl version on intel and arm macos.

### Are these changes tested?
Crossbow
* GitHub Issue: apache#41426

Authored-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
  • Loading branch information
assignUser authored May 21, 2024
1 parent 28ab4af commit f0678ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
18 changes: 14 additions & 4 deletions dev/tasks/r/github.packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,28 @@ jobs:
working-directory: 'arrow'
extra-packages: cpp11
- name: Set CRAN like openssl
if: contains(matrix.platform.name, 'arm64')
if: contains(matrix.platform.name, 'macOS')
# The -E forwards the GITHUB_* envvars
shell: sudo -E Rscript {0}
run: |
# The arm64 runners contain openssl 1.1.1t in this path that is always included first so we need to override the
# default setting of the brew --prefix as root dir to avoid version conflicts.
echo "OPENSSL_ROOT_DIR=/opt/R/arm64" >> $GITHUB_ENV
# get the mac-recipes version of openssl from CRAN
source("https://mac.R-project.org/bin/install.R")
install.libs("openssl")
# override our cmakes default setting of the brew --prefix as root dir to avoid version conflicts.
if (Sys.info()[["machine"]] == "arm64"){
cat("OPENSSL_ROOT_DIR=/opt/R/arm64\n", file=Sys.getenv("GITHUB_ENV"), append = TRUE)
} else {
cat("OPENSSL_ROOT_DIR=/opt/R/x86_64\n", file=Sys.getenv("GITHUB_ENV"), append = TRUE)
}
- name: Build Binary
id: build
shell: Rscript {0}
env:
NOT_CRAN: "false" # actions/setup-r sets this implicitly
ARROW_R_DEV: "true"
LIBARROW_BINARY: "true" # has to be set as long as allowlist not updated
LIBARROW_BUILD: "false"
ARROW_R_ENFORCE_CHECKSUM: "true"
ARROW_R_CHECKSUM_PATH: "{{ '${{ github.workspace }}' }}/repo/libarrow/bin"
run: |
Expand Down
1 change: 1 addition & 0 deletions r/inst/build_arrow_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ ${CMAKE} -DARROW_BOOST_USE_SHARED=OFF \
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON \
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \
-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} \
-Dre2_SOURCE=${re2_SOURCE:-BUNDLED} \
-Dxsimd_SOURCE=${xsimd_SOURCE:-} \
-Dzstd_SOURCE=${zstd_SOURCE:-} \
Expand Down

0 comments on commit f0678ec

Please sign in to comment.