Skip to content

Use correct specification of empty array #115

Use correct specification of empty array

Use correct specification of empty array #115

Workflow file for this run

name: Benchmarks
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
pull_request:
paths:
# Directories with source code and benchmarking code
- "inst/stan/**"
- "R/**"
- "src/**"
- "touchstone/**"
# Stan model
- "inst/pcens_model.stan"
# Benchmarking config file
- ".github/workflows/benchmarks*.yaml"
# Benchmarking action
- ".github/actions/touchstone-recieve/**"
# Package metadata
- DESCRIPTION
workflow_dispatch:
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
config: ${{ steps.read_touchstone_config.outputs.config }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: read_touchstone_config
run: |
content=`cat ./touchstone/config.json`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
echo "::set-output name=config::$content"
build:
needs: prepare
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- ${{ fromJson(needs.prepare.outputs.config) }}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: 'https://stan-dev.r-universe.dev'
- name: Install cmdstanr
run: install.packages("cmdstanr")
shell: Rscript {0}
- name: Install cmdstan
uses: epinowcast/actions/install-cmdstan@v1
with:
cmdstan-version: 'latest'
num-cores: 2
- uses: seabbs/touchstone/actions/receive@main
with:
cache-version: 1
touchstone_ref: '@f5c859e'
benchmarking_repo: ${{ matrix.config.benchmarking_repo }}
benchmarking_ref: ${{ matrix.config.benchmarking_ref }}
benchmarking_path: ${{ matrix.config.benchmarking_path }}
extra-repositories: 'https://stan-dev.r-universe.dev'