Skip to content

UPDATE

UPDATE #36

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: R Package CI for MacOS
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
os: [macos-latest]
r-version: ['4.1.1']
steps:
- uses: actions/checkout@v4
- name: Install JAGS on macOS
run: brew install jags
- name: Install gcc (includes gfortran)
run: brew install gcc
- name: Ensure gfortran is in PATH
run: |
echo "/opt/homebrew/bin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/gcc/bin" >> $GITHUB_PATH
- name: Check gfortran installation
run: gfortran --version
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Install TinyTeX
run: |
Rscript -e "install.packages('tinytex')"
Rscript -e "tinytex::install_tinytex()"
- name: Set CRAN mirror
run: |
Rscript -e "options(repos = c(CRAN = 'https://cloud.r-project.org/'))"
shell: Rscript {0}
- name: Install remotes package
run: |
Rscript -e "install.packages('remotes')"
- name: Install package dependencies
run: |
Rscript -e "install.packages(c('smacof', 'vegan'), dependencies = TRUE)"
shell: Rscript {0}
- name: Install basicspace from GitHub
env:
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}
run: |
Rscript -e "remotes::install_github('cran/basicspace', force = TRUE)"
shell: Rscript {0}
- name: Install other R package dependencies
run: |
Rscript -e "install.packages(c('rjags', 'ggplot2', 'knitr'))"
shell: Rscript {0}
- name: Install rcmdcheck package
run: |
Rscript -e "install.packages('rcmdcheck')"
shell: Rscript {0}
- name: Check
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')"
shell: Rscript {0}
- name: Test (optional)
run: |
Rscript -e "devtools::test()"
shell: Rscript {0}
env:
R_LIBS_USER: /Users/runner/work/_temp/Library
TZ: UTC
_R_CHECK_SYSTEM_CLOCK_: FALSE
NOT_CRAN: true