Skip to content

Commit 0d5489d

Browse files
committed
update macos workflow
1 parent 97fe863 commit 0d5489d

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ jobs:
3333
steps:
3434
- name: Install XQuartz on macOS
3535
if: runner.os == 'macOS'
36-
run: brew install xquartz --cask
37-
36+
run: |
37+
brew install xquartz --cask
38+
brew install pkg-config
39+
brew install cairo
40+
brew install libgit2
41+
3842
- uses: actions/checkout@v4
3943

4044
- uses: r-lib/actions/setup-pandoc@v2
@@ -45,16 +49,42 @@ jobs:
4549
http-user-agent: ${{ matrix.config.http-user-agent }}
4650
use-public-rspm: true
4751

52+
- name: Query dependencies
53+
run: |
54+
install.packages('remotes')
55+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
56+
shell: Rscript {0}
57+
58+
- name: Cache R packages
59+
if: runner.os != 'Windows'
60+
uses: actions/cache@v3
61+
with:
62+
path: ${{ env.R_LIBS_USER }}
63+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
64+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
65+
66+
- name: Install system dependencies on macOS
67+
if: runner.os == 'macOS'
68+
run: |
69+
brew install --cask xquartz
70+
brew install pkg-config
71+
brew install cairo
72+
brew install libgit2
73+
brew install imagemagick
74+
brew install ghostscript
75+
4876
- uses: r-lib/actions/setup-r-dependencies@v2
4977
with:
5078
extra-packages: any::rcmdcheck
5179
needs: check
80+
cache-version: 2
5281

5382
- uses: r-lib/actions/check-r-package@v2
5483
env:
5584
_R_CHECK_CRAN_INCOMING_: false
5685
_R_CHECK_DONTTEST_EXAMPLES_: false
5786
DISPLAY: 99.0
87+
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
5888
with:
5989
upload-snapshots: true
6090
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

0 commit comments

Comments
 (0)