Update core #381
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
pull_request: | |
branches: | |
- main | |
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: 'release'} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
RSPM: ${{ matrix.config.rspm }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
RENV_CI_CACHE_VERSION_LINUX: 1 | |
RENV_CI_CACHE_VERSION_MACOS: 1 | |
RENV_CI_CACHE_VERSION_WINDOWS: 1 | |
USE_CXX1X: TRUE | |
USE_CXX11: TRUE | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
- uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: '2.7.3' | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
env: | |
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc | |
run: | | |
# install spatial dependencies | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt update | |
sudo apt install \ | |
libudunits2-dev \ | |
libgdal-dev \ | |
libgeos-dev \ | |
libproj-dev \ | |
libharfbuzz-dev \ | |
libfribidi-dev | |
- name: Install system dependencies | |
if: runner.os == 'macOS' | |
run: | | |
# install spatial dependencies | |
brew install pkg-config gdal proj geos harfbuzz fribidi | |
export LDFLAGS="-L/usr/local/opt/libpq/lib" | |
export CPPFLAGS="-I/usr/local/opt/libpq/include" | |
- name: Install renv | |
shell: Rscript {0} | |
run: | | |
install.packages("renv") | |
- uses: actions/cache@v2 | |
if: startsWith(runner.os, 'Linux') | |
with: | |
path: ~/.local/share/renv | |
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-renv- | |
- uses: actions/cache@v2 | |
if: startsWith(runner.os, 'macOS') | |
with: | |
path: ~/Library/Application Support/renv | |
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-renv- | |
- uses: actions/cache@v2 | |
if: startsWith(runner.os, 'Windows') | |
with: | |
path: ~\AppData\Local\renv | |
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-renv- | |
- name: Restore packages | |
shell: Rscript {0} | |
run: | | |
renv::restore() | |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--no-multiarch"), error_on = "warning") |