Skip to content

Commit cdfafc6

Browse files
committed
fix multi-line Rscript -e in the rstan workflow
On Windows, 'Rscript -e' receives only the first line of a multi-line argument, so the reporting step failed to parse what it did get and aborted the run before rstan was ever built. Move the code into a script file, as the other steps already do.
1 parent b3eb552 commit cdfafc6

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Report how the installed RcppParallel resolved TBB, so that a downstream
2+
# build failure can be read against the configuration that produced it.
3+
#
4+
# This lives in a file rather than inline in the workflow: 'Rscript -e' only
5+
# receives the first line of a multi-line argument on Windows, so the rest of
6+
# the expression is silently dropped and R fails to parse what it did get.
7+
8+
writeLines(c(
9+
sprintf("TBB_ENABLED : %s", RcppParallel:::TBB_ENABLED),
10+
sprintf("TBB_LIB : '%s'", RcppParallel:::TBB_LIB),
11+
sprintf("TBB_INC : '%s'", RcppParallel:::TBB_INC),
12+
sprintf("CxxFlags() : %s", RcppParallel:::tbbCxxFlags()),
13+
sprintf("LdFlags() : %s", RcppParallel:::tbbLdFlags())
14+
))

.github/workflows/rstan.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,7 @@ jobs:
6060
run: R CMD INSTALL --preclean .
6161

6262
- name: report how RcppParallel resolved TBB
63-
run: |
64-
Rscript -e 'writeLines(c(
65-
paste("TBB_ENABLED", RcppParallel:::TBB_ENABLED),
66-
paste("TBB_LIB ", RcppParallel:::TBB_LIB),
67-
paste("CxxFlags ", RcppParallel:::tbbCxxFlags()),
68-
paste("LdFlags ", RcppParallel:::tbbLdFlags())
69-
))'
63+
run: Rscript .github/scripts/report-tbb-config.R
7064

7165
# binaries are fine for everything except rstan and StanHeaders, which are
7266
# the packages that actually consume RcppParallel's flags. this is

0 commit comments

Comments
 (0)