Skip to content
name: R CMD as-cran check Ubuntu
on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
check-as-cran:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.r-version }})
strategy:
matrix:
r-version: ['release']
os: ['ubuntu-latest']
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: install R
run: |
# copied from https://cran.r-project.org/bin/linux/ubuntu/#get-5000-cran-packages
# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
- name: install compiled packages
run: |
sudo add-apt-repository ppa:c2d4u.team/c2d4u4.0+
sudo apt install --no-install-recommends r-cran-openmx
sudo apt install --no-install-recommends r-cran-lavaan
sudo apt install --no-install-recommends r-cran-devtools
sudo apt install --no-install-recommends r-cran-rmarkdown
sudo apt install --no-install-recommends r-cran-knitr
sudo apt install --no-install-recommends r-cran-rcpp
sudo apt install --no-install-recommends r-cran-testthat
sudo apt install --no-install-recommends r-cran-rcmdcheck
- name: Check
run: rcmdcheck::rcmdcheck(path = ".", args = "--no-manual", error_on = "warning")
shell: Rscript {0}