Skip to content

Commit

Permalink
GH-38779: [R][CI] Use devtools on self-hosted machines and use macos-…
Browse files Browse the repository at this point in the history
…11 for intel package build (#38974)

### Rationale for this change

The action does not work smoothly on the self-hosted runners.

### What changes are included in this PR?

Use devtools instead.

### Are these changes tested?
crossbow
* Closes: #38779

Authored-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
  • Loading branch information
assignUser committed Nov 30, 2023
1 parent 92fe831 commit 810aa4b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
27 changes: 15 additions & 12 deletions dev/tasks/r/github.packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,40 +211,43 @@ jobs:
matrix:
platform:
- { runs_on: 'windows-latest', name: "Windows"}
- { runs_on: ["self-hosted", "macos-10.13"], name: "macOS High Sierra"}
- { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], name: "macOS Big Sur" }
r_version:
- { rtools: "{{ macros.r_release.rt }}", r: "{{ macros.r_release.ver }}" }
- { rtools: "{{ macros.r_oldrel.rt }}", r: "{{ macros.r_oldrel.ver }}" }
- { runs_on: macos-11 , name: "macOS Big Sur"}
- { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], name: "macOS Big Sur (M1)" }
r_version: [oldrel, release]
steps:
- uses: r-lib/actions/setup-r@v2
# expression marker prevents the ! being parsed as yaml tag
if: {{ "${{ !contains(matrix.platform.runs_on, 'self-hosted') }}" }}
with:
r-version: {{ '${{ matrix.r_version.r }}' }}
rtools-version: {{ '${{ matrix.r_version.rtools }}' }}
r-version: {{ '${{ matrix.r_version }}' }}
- name: Setup R Self-Hosted
if: contains(matrix.platform.runs_on, 'self-hosted')
run: |
if [ "{{ "${{ contains(matrix.platform.runs_on, 'arm64') }}" }}" == "true" ]; then
rig_arch="-arm64"
fi
# 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_arch
# rig add {{ '${{ matrix.r_version }}' }} #uncomment this to install latest release/oldrel
rig default {{ '${{ matrix.r_version }}' }}
rig system setup-user-lib
rig system add-pak
{{ macros.github_setup_local_r_repo(false, true, true)|indent }}
- name: Prepare Dependency Installation
shell: bash
run: |
tar -xzf repo/src/contrib/arrow_*.tar.gz arrow/DESCRIPTION
- name: Install dependencies
if: {{ "${{ !contains(matrix.platform.runs_on, 'self-hosted') }}" }}
uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: 'arrow'
extra-packages: cpp11
- name: Install dependencies self-hosted
if: {{ "${{ contains(matrix.platform.runs_on, 'self-hosted') }}" }}
shell: Rscript {0}
run: |
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
devtools::install_dev_deps('./arrow')
- name: Set CRAN like openssl
if: contains(matrix.platform.runs_on, 'arm64')
run: |
Expand Down
6 changes: 3 additions & 3 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -976,11 +976,11 @@ tasks:
- r-lib__libarrow__bin__darwin-arm64-openssl-3.0__arrow-{no_rc_r_version}\.zip
- r-lib__libarrow__bin__darwin-x86_64-openssl-1.1__arrow-{no_rc_r_version}\.zip
- r-lib__libarrow__bin__darwin-x86_64-openssl-3.0__arrow-{no_rc_r_version}\.zip
- r-pkg__bin__windows__contrib__4.1__arrow_{no_rc_r_version}\.zip
- r-pkg__bin__windows__contrib__4.3__arrow_{no_rc_r_version}\.zip
- r-pkg__bin__windows__contrib__4.2__arrow_{no_rc_r_version}\.zip
- r-pkg__bin__macosx__contrib__4.1__arrow_{no_rc_r_version}\.tgz
- r-pkg__bin__macosx__big-sur-x86_64__contrib__4.3__arrow_{no_rc_r_version}\.tgz
- r-pkg__bin__macosx__contrib__4.2__arrow_{no_rc_r_version}\.tgz
- r-pkg__bin__macosx__big-sur-arm64__contrib__4.1__arrow_{no_rc_r_version}\.tgz
- r-pkg__bin__macosx__big-sur-arm64__contrib__4.3__arrow_{no_rc_r_version}\.tgz
- r-pkg__bin__macosx__big-sur-arm64__contrib__4.2__arrow_{no_rc_r_version}\.tgz
- r-pkg__src__contrib__arrow_{no_rc_r_version}\.tar\.gz

Expand Down

0 comments on commit 810aa4b

Please sign in to comment.