Skip to content

Spike and slab model-averaging (#38) #190

Spike and slab model-averaging (#38)

Spike and slab model-averaging (#38) #190

Workflow file for this run

name: R-CMD-tests
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
# Set up renv
- name: Setup renv
uses: r-lib/actions/setup-renv@v2
# Install the package
- name: Install devtools and the RoBMA Package
run: |
install.packages(c('devtools', 'metaBMA', 'metafor', 'weightr', 'lme4', 'fixest', 'emmeans', 'metadat', 'vdiffr', 'testthat', 'covr', 'pandoc'))
devtools::install()
shell: Rscript {0}
# Run tests
- name: Run Tests
run: |
devtools::test()
shell: Rscript {0}