Skip to content

Commit

Permalink
GH-38197: [R] Update actions that used setup-r@v1 to use setup-r@v2 (#…
Browse files Browse the repository at this point in the history
…38218)

### Rationale for this change

CI jobs that used setup-r@ v1 no longer run without error.

### What changes are included in this PR?

- Updated the rchk job to use the `setup-r@ v2`
- Updated the devdocs job to use `setup-r@ v2`. To make this work, we needed to remove the Windows build because it was installing an old version of R. It seems that the job has been running an outdated and unsable (for most users) for a very long time.

### Are these changes tested?

Will be covered by crossbow jobs submitted below.

### Are there any user-facing changes?

No.
* Closes: #38197

Lead-authored-by: Dewey Dunnington <[email protected]>
Co-authored-by: Dewey Dunnington <[email protected]>
Signed-off-by: Dewey Dunnington <[email protected]>
  • Loading branch information
paleolimbot authored Oct 12, 2023
1 parent 84a4ab1 commit 0640f94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 31 deletions.
27 changes: 3 additions & 24 deletions dev/tasks/r/github.devdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-20.04, windows-latest]
os: [macOS-latest, ubuntu-20.04]

steps:
{{ macros.github_checkout_arrow()|indent }}
# TODO (ARROW-16376): Switch to v2 once we use UCRT
- uses: r-lib/actions/setup-r@v1
with:
# temp workaround the fact that R 4.2 requires UCRT which isn't
# currently part of this build.
# remove after https://issues.apache.org/jira/browse/ARROW-16376
r-version: '4.1'
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand All @@ -47,15 +41,11 @@ jobs:
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: Remove system gfortran so that brew can install gcc successfully
run: rm -f /usr/local/bin/gfortran
if: {{ "${{ !contains(matrix.os, 'windows') }}" }}
- name: Write the install script
env:
RUN_DEVDOCS: TRUE
DEVDOCS_MACOS: {{ "${{contains(matrix.os, 'macOS')}}" }}
DEVDOCS_UBUNTU: {{ "${{contains(matrix.os, 'ubuntu')}}" }}
DEVDOCS_WINDOWS: {{ "${{contains(matrix.os, 'windows')}}" }}
run: |
# This isn't actually rendering the docs, but will save arrow/r/vignettes/developers/script.sh
# which can be sourced to install arrow.
Expand All @@ -65,21 +55,10 @@ jobs:
env:
LIBARROW_BINARY: FALSE
ARROW_R_DEV: TRUE
DEVDOCS_WINDOWS: {{ "${{contains(matrix.os, 'windows')}}" }}
run: |
if [ $DEVDOCS_WINDOWS == "true" ]; then
# Part of Path, including the path to R's bin, needs to be reformatted
# from Windows paths (C:\R\bin) to Unix paths (/c/r/bin)
echo export PATH=\"$(cygpath --path "$PATH")\" >> ~/.bash_profile
# This starts a special mingw64 Git Bash shell
$RTOOLS40_HOME/msys2_shell.cmd -here -mingw64 -no-start -defterm -full-path arrow/r/vignettes/developers/script.sh
else
bash arrow/r/vignettes/developers/script.sh
fi
bash arrow/r/vignettes/developers/script.sh
shell: bash
- name: Ensure that the Arrow package is loadable and we have the correct one
env:
DEVDOCS_WINDOWS: {{ "${{contains(matrix.os, 'windows')}}" }}
run: |
echo $LD_LIBRARY_PATH
R --no-save <<EOF
Expand Down
14 changes: 7 additions & 7 deletions dev/tasks/r/github.linux.rchk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
steps:
{{ macros.github_checkout_arrow()|indent }}

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps("arrow/r", dependencies = TRUE)
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: 'arrow/r'
extra-packages: |
any::rcmdcheck
- name: Build arrow package
run: |
R CMD build --no-build-vignettes arrow/r
Expand Down

0 comments on commit 0640f94

Please sign in to comment.