Skip to content

Commit 85984f1

Browse files
committed
correct rstan's dependency list and pin the package under test
Drop V8 and withr: rstan 2.32 replaced V8 with QuickJSR, and V8 failing to install on an old toolchain would have failed the job for reasons that have nothing to do with RcppParallel. The list now mirrors rstan's Imports plus LinkingTo. Install StanHeaders and rstan with dependencies = FALSE, and assert afterwards that RcppParallel is still the .9000 build from this branch -- otherwise dependency resolution could quietly replace it with CRAN's, and the run would report on the released package instead of this one.
1 parent 86440f6 commit 85984f1

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/rstan.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,23 @@ jobs:
6969
))'
7070
7171
# binaries are fine for everything except rstan and StanHeaders, which are
72-
# the packages that actually consume RcppParallel's flags
72+
# the packages that actually consume RcppParallel's flags. this is
73+
# rstan's Imports plus its LinkingTo, minus RcppParallel (installed above)
74+
# and StanHeaders (built from source below)
7375
- name: install rstan's dependencies
74-
run: Rscript -e 'install.packages(c("Rcpp","RcppEigen","BH","inline","loo","pkgbuild","QuickJSR","withr","V8","gridExtra","ggplot2"))'
76+
run: |
77+
Rscript -e 'install.packages(c("Rcpp","RcppEigen","BH","inline","gridExtra","loo","pkgbuild","QuickJSR","ggplot2"))'
7578
79+
# dependencies = FALSE so that resolving StanHeaders/rstan can't quietly
80+
# pull CRAN's RcppParallel over the one we just built -- that would turn
81+
# this into a test of the released package instead
7682
- name: install StanHeaders and rstan from source
77-
run: Rscript -e 'install.packages(c("StanHeaders","rstan"), type = "source", INSTALL_opts = "--no-multiarch")'
83+
run: |
84+
Rscript -e 'install.packages(c("StanHeaders","rstan"), type = "source", dependencies = FALSE, INSTALL_opts = "--no-multiarch")'
85+
86+
- name: check RcppParallel is still the one we built
87+
run: |
88+
Rscript -e 'v <- as.character(packageVersion("RcppParallel")); writeLines(paste("RcppParallel", v)); if (!grepl("[.]9000$", v)) stop("RcppParallel was replaced by a released build; the rstan build did not test this branch")'
7889
7990
- name: load rstan
8091
run: |

0 commit comments

Comments
 (0)