Skip to content

update workflow

update workflow #2

name: R CMD Check and Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
r: [release]
name: R CMD Check and Build on ${{ matrix.os }} (R ${{ matrix.r }})
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r }}
- name: Install system dependencies on macOS
if: matrix.os == 'macos-latest'
run: |
brew install libgit2
- name: Install system dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y libgit2-dev
- name: Install R package dependencies
run: |
Rscript -e 'install.packages("remotes"); remotes::install_deps(dependencies = TRUE)'
- name: Run R CMD build
run: |
R CMD build .
- name: Run R CMD check without tests
run: |
R CMD check *.tar.gz --no-manual --no-tests --as-cran