Skip to content

Commit f4820e1

Browse files
authored
Update check-standard.yaml
update to match r4ds to see if resolves error
1 parent 543f3ef commit f4820e1

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

.github/workflows/check-standard.yaml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,50 @@ jobs:
2929
R_KEEP_PKG_SOURCE: yes
3030

3131
steps:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333

3434
- uses: r-lib/actions/setup-pandoc@v2
3535

36+
# Need because of ggalt package, perhaps because it is dependence on
37+
# the proj4 package. libgdal is needed for terra. openssl for arrow.
38+
39+
- name: Install system dependencies (Linux)
40+
if: runner.os == 'Linux'
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y libproj-dev
44+
sudo apt-get install -y libgdal-dev
45+
3646
- uses: r-lib/actions/setup-r@v2
3747
with:
3848
r-version: ${{ matrix.config.r }}
3949
http-user-agent: ${{ matrix.config.http-user-agent }}
4050
use-public-rspm: true
4151

42-
- uses: r-lib/actions/setup-r-dependencies@v2
52+
# The default value of the cache-version is 1, which just uses what is there. If
53+
# you want to rebuild the cache, set this to >1.
54+
55+
- uses: r-lib/actions/setup-renv@v2
4356
with:
44-
extra-packages: rcmdcheck
57+
cache-version: 1
58+
59+
# The arrow package generates lots of problems. Perhaps these will go away
60+
# once a new version is available on CRAN. In the meantime, the only solution
61+
# seems to involve forcing an installation from source. This only really
62+
# seems necessary for the macOS. Not sure why?
63+
64+
- name: Install arrow package from source (macOS)
65+
if: runner.os == 'macOS'
66+
run: |
67+
export ARROW_OPENSSL_CXXFLAGS="-I/usr/local/opt/openssl@3/include"
68+
export ARROW_OPENSSL_LDFLAGS="-L/usr/local/opt/openssl@3/lib -lssl -lcrypto"
69+
export OPENSSL_ROOT_DIR="/usr/local/opt/openssl@3"
70+
Rscript -e 'install.packages("arrow", type = "source", INSTALL_opts = "--no-lock")'
71+
72+
# Sure seems like check-r-package should take care of this installation, but
73+
# it does not seem to do so. Note that you can't just include rcmdcheck in the
74+
# DESCRIPTION file without causing failure to local calls to R CMD check.
4575

76+
- run: Rscript -e 'install.packages("rcmdcheck")'
77+
4678
- uses: r-lib/actions/check-r-package@v2

0 commit comments

Comments
 (0)