Skip to content

UPDATE

UPDATE #48

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 system dependencies on macOS
run: |
brew install jags
brew install --cask mactex-no-gui
brew install gfortran
shell: bash
- name: Configure Makevars for gfortran
run: |
mkdir -p ~/.R
echo "FC = /opt/homebrew/opt/gcc/bin/gfortran" >> ~/.R/Makevars
echo "F77 = /opt/homebrew/opt/gcc/bin/gfortran" >> ~/.R/Makevars
echo "FLIBS = -L/opt/homebrew/opt/gcc/lib/gcc/current -lgfortran -lquadmath -lm" >> ~/.R/Makevars
shell: bash
- name: Set PATH for gfortran
run: |
echo "/opt/homebrew/bin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/gcc/bin" >> $GITHUB_PATH
shell: bash
- name: Check gfortran installation
run: |
which gfortran
gfortran --version
shell: bash
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Install remotes package
run: |
Rscript -e "install.packages('remotes')"
shell: Rscript {0}
- name: Install package dependencies
run: |
Rscript -e "install.packages(c('smacof', 'ellipse', 'plyr', 'vegan'))"
shell: Rscript {0}
- name: Install basicspace from GitHub
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "remotes::install_github('cran/basicspace', force = TRUE)"
shell: Rscript {0}
- name: Set CRAN mirror and install other R package dependencies
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "options(repos = c(CRAN = 'https://cloud.r-project.org/')); install.packages(c('rjags', 'ggplot2', 'knitr'));"
shell: Rscript {0}
- name: Install rcmdcheck package
run: |
Rscript -e "install.packages('rcmdcheck')"
shell: Rscript {0}
- name: Run R CMD check
env:
PATH: /opt/homebrew/opt/gcc/bin:/opt/homebrew/bin:$PATH
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:
TZ: UTC
_R_CHECK_SYSTEM_CLOCK_: false
NOT_CRAN: true