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

GH-38197: [R] Update actions that used setup-r@v1 to use setup-r@v2 #38218

Merged
merged 5 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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