Skip to content

Fix input check

Fix input check #34

Workflow file for this run

# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- master
- pre-release
pull_request:
branches:
- main
- master
- pre-release
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (R ${{ matrix.r }})
strategy:
fail-fast: false
matrix:
r: ['4.3.3']
os: [ubuntu-latest, macOS-latest, windows-latest]
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
R_REMOTES_UPGRADE: never
VDIFFR_RUN_TESTS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
_R_CHECK_LENGTH_1_CONDITION_: TRUE #deprecated from R 4.2.0
_R_CHECK_MATRIX_DATA_: TRUE # only works from R 4.2.0 onwards
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r }}
- name: Install system dependencies on macOS
if: runner.os == 'macOS'
run: |
# see https://github.com/orgs/Homebrew/discussions/4612
unset HOMEBREW_NO_INSTALL_FROM_API
brew update
brew install --cask xquartz
brew install libarchive
shell: bash
- name: Install system dependencies on macOS specific to R devel
if: runner.os == 'macOS' && matrix.r == 'devel'
run: |
# ragg requires harfbuzz fribidi
# The dependencies of the two R packages below are required for compiling from source on Ubuntu, but macOS seems fine without them
# credentials (dependency of usethis) requires libgit2
# curl (dependency of usethis) requires openssl
brew install harfbuzz fribidi libgit2 openssl curl
shell: bash
- name: Install system dependencies on linux
if: runner.os == 'Linux'
run: |
# ragg requires libharfbuzz-dev libfribidi-dev
# credentials (dependency of usethis) requires libgit2-dev
# curl (dependency of usethis) requires libcurl4-openssl-dev
# libicu (dependency of igraph or stringi...) requires libicu libicu-dev
sudo apt install libharfbuzz-dev libfribidi-dev libgit2-dev libcurl4-openssl-dev libicu*
shell: bash
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
- name: Check
if: runner.os != 'Windows'
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(
args = c("--no-manual", "--as-cran", "--ignore-vignettes"),
build_args = c("--no-build-vignettes"),
error_on = "warning",
check_dir = "check")
shell: Rscript {0}"
- name: Check
if: runner.os == 'Windows'
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(
args = c("--no-manual", "--as-cran", "--ignore-vignettes"),
build_args = c("--no-build-vignettes"),
error_on = "warning",
check_dir = "check")
shell: Rscript {0}
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check