update workflow #2
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
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 |