diff --git a/.github/workflows/call-r-check.yml b/.github/workflows/call-r-check.yml index 2a4a81e0..54430a92 100644 --- a/.github/workflows/call-r-check.yml +++ b/.github/workflows/call-r-check.yml @@ -1,10 +1,14 @@ -# Workflow derived from https://github.com/inlabru-org/inlabru/blob/devel/.github/workflows/R-CMD-check.yaml +# 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 +# +# NOTE: This workflow is overkill for most R packages and +# check-standard.yaml is likely a better choice. +# usethis::use_github_action("check-standard") will install it. on: push: - branches: main + branches: [main, master] pull_request: - branches: main + branches: [main, master] name: R-CMD-check @@ -18,14 +22,23 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-12, r: 'release'} + - {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'} + # Use 3.6 to trigger usage of RTools35 + - {os: windows-latest, r: '3.6'} + # use 4.1 to check with rtools40's older compiler + - {os: windows-latest, r: '4.1'} + + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + - {os: ubuntu-latest, r: 'oldrel-2'} + - {os: ubuntu-latest, r: 'oldrel-3'} + - {os: ubuntu-latest, r: 'oldrel-4'} env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: @@ -38,36 +51,12 @@ jobs: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - extra-repositories: "https://inla.r-inla-download.org/R/testing" - - - name: Install system dependencies on MacOS (X11, gdal) - if: runner.os == 'macOS' - run: | - brew install --cask xquartz - brew install pkg-config - brew install proj@9 - brew install gdal - - - name: Install system dependencies on Linux (GL) - if: runner.os == 'Linux' - run: | - sudo apt-get update -y && sudo apt-get install -y libglu1-mesa-dev - uses: r-lib/actions/setup-r-dependencies@v2 with: - dependencies: '"all"' - extra-packages: | - rcmdcheck - - - name: Session info - run: | - options(width = 100) - pkgs <- installed.packages()[, "Package"] - sessioninfo::session_info(pkgs, include_base = TRUE) - shell: Rscript {0} + extra-packages: any::rcmdcheck + needs: check - uses: r-lib/actions/check-r-package@v2 - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false with: - args: 'c("--no-manual", "--as-cran")' \ No newline at end of file + upload-snapshots: true \ No newline at end of file