Skip to content

R-CMD-check

R-CMD-check #104

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
- cron: '0 0 * * 0'
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
env:
# install full prebuilt version
TINYTEX_INSTALLER: TinyTeX
- name: Install Valgrind on Linux
if: runner.os == 'Linux'
run: sudo apt-get -y install valgrind
- uses: r-lib/actions/setup-r@v2-branch
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::XML
needs: check
- name: Check
run: |
options(crayon.enabled = TRUE)
Sys.info()['sysname']
# Set R_GSCMD in Windows
if (Sys.info()['sysname'] == "Windows") {
system.partition = 'c:'
dirs = c('Program Files', 'Program Files (x86)')
for (dir in dirs) {
dir.list = list.dirs(file.path(system.partition, dir), recursive = FALSE)
GsinList = grepl(pattern = 'gs', x = dir.list)
if (sum(GsinList) > 0) {
gsDirectory = which(GsinList == TRUE)
GsExeFiles = list.files(
dir.list[gsDirectory],
recursive = TRUE,
pattern = 'gswin',
include.dirs = TRUE,
full.names = TRUE
)[1]
message('Gs found! ~> ',GsExeFiles)
Sys.setenv(R_GSCMD = GsExeFiles)
break
}
}
}
rckargs <- c("--as-cran", "--run-donttest")
if (Sys.info()['sysname'] != "Darwin") {
rckargs <- c(rckargs, "--use-valgrind")
}
rcmdcheck::rcmdcheck(args = rckargs,
build_args = c("--compact-vignettes=gs+qpdf"),
error_on = "warning", check_dir = "check",
env = c(`NOT_CRAN` = "true",
`_R_CHECK_FORCE_SUGGESTS_` = "true",
`_R_STOP_ON_XTFRM_DATA_FRAME_` = "true",
`_R_COMPILE_AND_INSTALL_PACKAGES_` = "always",
`_R_CHECK_CRAN_INCOMING_USE_ASPELL_` = "false"))
shell: Rscript {0}