adding prior_mixture()
and spike-and-slab style model-averaging upgrades
#169
Workflow file for this run
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 | |
on: | |
push: | |
branches: [main, master, pre-release] | |
pull_request: | |
branches: [main, master, pre-release] | |
jobs: | |
build: | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: windows-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'release'} | |
- {os: macOS-latest, r: 'release'} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
# Install JAGS and system dependencies on Linux | |
- name: Install System Dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libssl-dev \ | |
libcurl4-openssl-dev \ | |
libxml2-dev \ | |
libfontconfig1-dev \ | |
libharfbuzz-dev \ | |
libfribidi-dev \ | |
libfreetype6-dev \ | |
libpng-dev \ | |
libtiff5-dev \ | |
libjpeg-dev \ | |
libcairo2-dev \ | |
jags | |
# Install JAGS on Windows | |
- name: Install JAGS (Windows) | |
if: runner.os == 'Windows' | |
shell: cmd | |
run: | | |
curl -o jags-installer.exe -L https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe/download | |
jags-installer.exe /S | |
del jags-installer.exe | |
# Set JAGS environment variables on Windows | |
- name: Set JAGS environment variables (Windows) | |
if: runner.os == 'Windows' | |
shell: cmd | |
run: | | |
echo JAGS_ROOT=C:\Program Files\JAGS\JAGS-4.3.1>> %GITHUB_ENV% | |
echo JAGS_MAJOR_VERSION=4>> %GITHUB_ENV% | |
echo PATH=C:\Program Files\JAGS\JAGS-4.3.1\bin;%PATH%>> %GITHUB_ENV% | |
# Install JAGS on macOS | |
- name: Install JAGS (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew update | |
brew install jags | |
# Find and Set JAGS Paths | |
- name: Set Environment Variables (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
JAGS_BIN=$(brew --prefix jags)/bin | |
echo "JAGS_ROOT=$(brew --prefix jags)" >> $GITHUB_ENV | |
echo "PATH=$JAGS_BIN:$PATH" >> $GITHUB_ENV | |
echo "PKG_CONFIG_PATH=$(brew --prefix jags)/lib/pkgconfig" >> $GITHUB_ENV | |
# Create Symlink for jags-terminal (if necessary) | |
- name: Create Symlink for jags-terminal (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
sudo mkdir -p $(brew --prefix)/libexec | |
sudo ln -s $(brew --prefix jags)/bin/jags $(brew --prefix)/libexec/jags-terminal | |
# Install the package | |
- name: Install the required packages | |
run: | | |
options(repos = c(CRAN = "https://cloud.r-project.org")) | |
install.packages('devtools') | |
install.packages('rcmdcheck') | |
install.packages(c('BayesFactor', 'runjags', 'rjags', 'rstan', 'scales', 'vdiffr', 'testthat', 'covr', 'pandoc')) | |
devtools::install() | |
shell: Rscript {0} | |
- name: Check | |
if: runner.os != 'Windows' | |
env: | |
_R_CHECK_CRAN_INCOMING_REMOTE_: false | |
run: | | |
options(crayon.enabled = TRUE) | |
rcmdcheck::rcmdcheck( | |
args = c("--no-manual", "--as-cran", "--ignore-vignettes"), | |
build_args = c("--no-build-vignettes"), | |
error_on = "warning", | |
check_dir = "check") | |
shell: Rscript {0}" | |
- name: Check | |
if: runner.os == 'Windows' | |
env: | |
_R_CHECK_CRAN_INCOMING_REMOTE_: false | |
JAGS_ROOT: "/c/progra~1/JAGS/JAGS-4.3.1" | |
JAGS_MAJOR_VERSION: 4 | |
run: | | |
options(crayon.enabled = TRUE) | |
rcmdcheck::rcmdcheck( | |
args = c("--no-manual", "--as-cran", "--ignore-vignettes"), | |
build_args = c("--no-build-vignettes"), | |
error_on = "warning", | |
check_dir = "check") | |
shell: Rscript {0} | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | |
path: check |