This file contains hidden or 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
| # Workflow derived from https://github.com/r-lib/actions/tree/master/examples | |
| # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
| on: | |
| push: | |
| branches: | |
| - revdep-workflow-testing | |
| workflow_dispatch: | |
| name: Reverse Dependency Checks | |
| jobs: | |
| revdep-checks: | |
| runs-on: macos-latest | |
| name: Reverse dependency checks | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| cache: 'always' | |
| extra-packages: rcmdcheck BH RcppParallel RcppEigen Rcpp rstan github::CraigWangStat/eggCountsExtra | |
| - name: Install R Package Build Dependencies | |
| uses: r-hub/actions/setup-r-sysreqs@v1 | |
| with: | |
| type: full | |
| - name: Install additional system deps | |
| run: | | |
| brew install jags openjdk | |
| R CMD javareconf | |
| - name: Install additional package deps | |
| run: | | |
| install.packages('cmdstanr', repos = c('https://stan-dev.r-universe.dev', 'https://cloud.r-project.org')) | |
| install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE) | |
| install.packages("glmmADMB", repos=c("http://R-Forge.R-project.org", 'https://cloud.r-project.org')) | |
| shell: Rscript {0} | |
| - name: Install dependencies | |
| run: pak::pak(revdepcheck::cran_revdeps('rstantools'), dependencies = TRUE) | |
| shell: Rscript {0} | |
| - name: Build package | |
| run: R CMD BUILD . | |
| - name: Run reverse dependency checks | |
| run: | | |
| tools::check_packages_in_dir(getwd(), reverse = list(), Ncpus = 3) | |
| shell: Rscript {0} | |