1717 fail-fast : false
1818 matrix :
1919 R : [ '4.3.1', '4.4.1' ]
20- os : [ 'macos-15-intel', 'ubuntu-latest' ]
20+ os : [ 'macos-15-intel', 'ubuntu-latest', 'windows-latest' ]
2121 runs-on : ${{ matrix.os }}
2222 name : ${{ matrix.R }} ${{ matrix.os }} build
2323 env :
@@ -39,18 +39,45 @@ jobs:
3939 sudo apt-get install -y libcurl4-openssl-dev libssh2-1-dev libharfbuzz-dev libfribidi-dev gh &&
4040 sudo rm -rf /var/lib/apt/lists/*
4141 - name : Configuration Information
42+ if : runner.os == 'Linux' || runner.os == 'macOS'
4243 run : |
4344 mkdir ${R_LIBS}
4445 c++ --version
4546 cmake --version
4647 which R
4748 R --version
49+ - name : Configuration Information (Windows)
50+ if : startsWith(matrix.config.os, 'windows')
51+ shell : pwsh
52+ run : |
53+ New-Item -ItemType Directory -Force -Path "$env:R_LIBS" | Out-Null
54+ g++ --version
55+ cmake --version
56+ Get-Command R.exe
57+ R.exe --version
4858 - name : Install R packages
59+ if : runner.os == 'Linux' || runner.os == 'macOS'
4960 run : |
5061 R -e "install.packages(c('remotes'), lib=c('${R_LIBS}'), repo='https://cloud.r-project.org/')"
62+ - name : Install R packages (Windows)
63+ if : startsWith(matrix.config.os, 'windows')
64+ shell : pwsh
65+ run : |
66+ Rscript -e "lib <- Sys.getenv('R_LIBS'); lib <- normalizePath(lib, winslash='/', mustWork=FALSE); dir.create(lib, recursive=TRUE, showWarnings=FALSE); install.packages('remotes', lib=lib, repos='https://cloud.r-project.org/')"
67+ Rscript.exe -e "install.packages(c('remotes', 'desc'), repos='https://cloud.r-project.org/')"
5168 - name : Build and test
69+ if : runner.os == 'Linux' || runner.os == 'macOS'
5270 run : |
5371 set -x
5472 R -e "remotes::install_git(c('.'), lib=c('${R_LIBS}'), configure.vars=c('"MAKEJ=2"'))"
5573 env :
5674 ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS : 2
75+ - name : Build and test (Windows)
76+ if : startsWith(matrix.config.os, 'windows')
77+ shell : pwsh
78+ env :
79+ ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS : 2
80+ run : |
81+ $env:MAKEJ="8"
82+ $env:ADDITIONAL_SITK_MODULES="-DSimpleITK_USE_ELASTIX=ON"
83+ Rcmd.exe INSTALL --build .
0 commit comments