Skip to content

Commit 8d6bbbe

Browse files
ci(probe): run the R steps through 'shell: Rscript {0}'
The pwsh -e form failed to launch Rscript on windows-latest, ending the job before any diagnostic printed. Also reaches tbbRoot() through ':::', which is where RcppParallel keeps it.
1 parent 1249f62 commit 8d6bbbe

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

‎.github/workflows/probe-windows-identity.yaml‎

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,34 @@ jobs:
3737
with:
3838
extra-packages: any::testthat, local::.
3939

40+
# `shell: Rscript {0}` runs the body as an R script. Passing R code
41+
# through pwsh -e instead fails to launch at all on this runner.
4042
- name: Report the resolved TBB backend
43+
shell: Rscript {0}
4144
run: |
42-
Rscript -e '
43-
cat("RcppParallel:", format(utils::packageVersion("RcppParallel")), "\n")
44-
cat("backend :", Sys.getenv("RCPP_PARALLEL_BACKEND", "<unset>"), "\n")
45-
cat("defaultNumThreads:", RcppParallel::defaultNumThreads(), "\n")
46-
cat("tbbLibraryPath:", paste(RcppParallel::tbbLibraryPath(), collapse = ", "), "\n")
47-
cat("tbbRoot :", paste(try(RcppParallel::tbbRoot(), silent = TRUE), collapse = ", "), "\n")
48-
'
45+
cat("RcppParallel :", format(utils::packageVersion("RcppParallel")), "\n")
46+
cat("backend :", Sys.getenv("RCPP_PARALLEL_BACKEND", "<unset>"), "\n")
47+
cat("defaultNumThreads:", RcppParallel::defaultNumThreads(), "\n")
48+
cat("tbbLibraryPath :", paste(RcppParallel::tbbLibraryPath(), collapse = ", "), "\n")
49+
# tbbRoot() is not exported.
50+
root = try(RcppParallel:::tbbRoot(), silent = TRUE)
51+
cat("tbbRoot :", paste(root, collapse = ", "), "\n")
4952
5053
# The known failure signature is chain 1 identical, chains 2+ diverging
5154
# from their first warmup step. Several seeds guard against a lucky pass,
5255
# and the per-chain report says whether a failure still has that shape.
5356
- name: Serial vs parallel identity across seeds
54-
run: Rscript tools/probe-identity.R
57+
shell: Rscript {0}
58+
run: |
59+
source("tools/probe-identity.R")
5560
5661
# The assertion as the suite actually states it, with the version gate
5762
# removed on this branch.
5863
- name: The real test block, gate removed
64+
shell: Rscript {0}
5965
run: |
60-
Rscript -e '
61-
library(testthat); library(bgms)
62-
res = test_file("tests/testthat/test-regressions-2.R",
63-
desc = "serial and parallel dispatch produce identical draws",
64-
stop_on_failure = TRUE)
65-
'
66+
library(testthat)
67+
library(bgms)
68+
test_file("tests/testthat/test-regressions-2.R",
69+
desc = "serial and parallel dispatch produce identical draws",
70+
stop_on_failure = TRUE)

0 commit comments

Comments
 (0)