Skip to content

Commit

Permalink
Merge branch 'master' into v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed May 23, 2024
2 parents 7687037 + 91e4bf6 commit 336309a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ jobs:
echo "CMDSTAN_PATH=${HOME}/.cmdstan" >> $GITHUB_ENV
shell: bash

- name: Use stock RTools for Windows R-Devel
if: ${{ matrix.config.os == 'windows-latest' && matrix.config.r == 'devel' }}
run: |
echo "CMDSTANR_USE_RTOOLS=TRUE" >> $GITHUB_ENV
shell: bash

- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -59,8 +65,17 @@ jobs:

- name: Install cmdstan
run: |
<<<<<<< HEAD
cmdstanr::check_cmdstan_toolchain()
cmdstanr::install_cmdstan(cores = 2, version = "2.35.0-rc2")
=======
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
if (Sys.getenv("CMDSTANR_USE_RTOOLS") == "TRUE") {
cmdstanr::install_cmdstan(cores = 2, version = "2.35.0-rc2")
} else {
cmdstanr::install_cmdstan(cores = 2)
}
>>>>>>> master
shell: Rscript {0}

- name: Session info
Expand Down
5 changes: 5 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ is_rosetta2 <- function() {

# Returns the type of make command to use to compile depending on the OS
make_cmd <- function() {
<<<<<<< HEAD
if (os_is_windows() && !os_is_wsl()) {
"make.exe"
=======
if (os_is_windows() && !os_is_wsl() && (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) {
"mingw32-make.exe"
>>>>>>> master
} else {
"make"
}
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-install.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
context("install")
# Current tests need CmdStan 2.35 for stock rtools, but is not yet released
skip_if(Sys.getenv("CMDSTANR_USE_RTOOLS") != "")

# Skip for now
skip()
Expand Down

0 comments on commit 336309a

Please sign in to comment.