Skip to content

Commit

Permalink
Work on macOS R-devel Github action (#430)
Browse files Browse the repository at this point in the history
Install jpeg lib from CRAN
  • Loading branch information
dmurdoch authored Jun 29, 2024
1 parent 89b11d2 commit 71f5e50
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: macos-latest, r: 'release'}
- {os: macos-latest, r: 'devel'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand All @@ -46,6 +46,15 @@ jobs:
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Install CRAN libjpeg on MacOS
if: runner.os == 'macOS'
run: |
ARCH=`uname -m`
if [ ! -e /opt/R/$ARCH ]; then sudo mkdir -p /opt/R/$ARCH; sudo chown -R $USER /opt/R; fi
sudo Rscript -e 'dep="jpeg"; source("https://mac.R-project.org/bin/install.R"); install.libs(dep)'
if ! echo $PATH | grep /opt/R/$ARCH/bin >/dev/null; then echo /opt/R/$ARCH/bin > newPATH; cat $GITHUB_PATH >> newPATH; cat newPATH > $GITHUB_PATH; fi
shell: bash

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
Expand Down

0 comments on commit 71f5e50

Please sign in to comment.