Unverified Commit 3c7e38be authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] [R-package] test against R 4.3 on Windows (#6061)

parent d45dca70
...@@ -55,12 +55,14 @@ Remove-From-Path ".*\\R\\.*" ...@@ -55,12 +55,14 @@ Remove-From-Path ".*\\R\\.*"
Remove-From-Path ".*R Client.*" Remove-From-Path ".*R Client.*"
Remove-From-Path ".*rtools40.*" Remove-From-Path ".*rtools40.*"
Remove-From-Path ".*rtools42.*" Remove-From-Path ".*rtools42.*"
Remove-From-Path ".*rtools43.*"
Remove-From-Path ".*shells.*" Remove-From-Path ".*shells.*"
Remove-From-Path ".*Strawberry.*" Remove-From-Path ".*Strawberry.*"
Remove-From-Path ".*tools.*" Remove-From-Path ".*tools.*"
Remove-Item C:\rtools40 -Force -Recurse -ErrorAction Ignore Remove-Item C:\rtools40 -Force -Recurse -ErrorAction Ignore
Remove-Item C:\rtools42 -Force -Recurse -ErrorAction Ignore Remove-Item C:\rtools42 -Force -Recurse -ErrorAction Ignore
Remove-Item C:\rtools43 -Force -Recurse -ErrorAction Ignore
# Get details needed for installing R components # Get details needed for installing R components
# #
...@@ -76,11 +78,11 @@ if ($env:R_MAJOR_VERSION -eq "3") { ...@@ -76,11 +78,11 @@ if ($env:R_MAJOR_VERSION -eq "3") {
$env:RTOOLS_EXE_FILE = "rtools35-x86_64.exe" $env:RTOOLS_EXE_FILE = "rtools35-x86_64.exe"
$env:R_WINDOWS_VERSION = "3.6.3" $env:R_WINDOWS_VERSION = "3.6.3"
} elseif ($env:R_MAJOR_VERSION -eq "4") { } elseif ($env:R_MAJOR_VERSION -eq "4") {
$RTOOLS_INSTALL_PATH = "C:\rtools42" $RTOOLS_INSTALL_PATH = "C:\rtools43"
$env:RTOOLS_BIN = "$RTOOLS_INSTALL_PATH\usr\bin" $env:RTOOLS_BIN = "$RTOOLS_INSTALL_PATH\usr\bin"
$env:RTOOLS_MINGW_BIN = "$RTOOLS_INSTALL_PATH\x86_64-w64-mingw32.static.posix\bin" $env:RTOOLS_MINGW_BIN = "$RTOOLS_INSTALL_PATH\x86_64-w64-mingw32.static.posix\bin"
$env:RTOOLS_EXE_FILE = "rtools42-5253-5107.exe" $env:RTOOLS_EXE_FILE = "rtools43-5550-5548.exe"
$env:R_WINDOWS_VERSION = "4.2.2" $env:R_WINDOWS_VERSION = "4.3.1"
} else { } else {
Write-Output "[ERROR] Unrecognized R version: $env:R_VERSION" Write-Output "[ERROR] Unrecognized R version: $env:R_VERSION"
Check-Output $false Check-Output $false
......
...@@ -86,7 +86,7 @@ jobs: ...@@ -86,7 +86,7 @@ jobs:
task: r-package task: r-package
compiler: MINGW compiler: MINGW
toolchain: MSYS toolchain: MSYS
r_version: 4.2 r_version: 4.3
build_type: cmake build_type: cmake
container: null container: null
# Visual Studio 2019 # Visual Studio 2019
...@@ -102,7 +102,7 @@ jobs: ...@@ -102,7 +102,7 @@ jobs:
task: r-package task: r-package
compiler: MSVC compiler: MSVC
toolchain: MSVC toolchain: MSVC
r_version: 4.2 r_version: 4.3
build_type: cmake build_type: cmake
container: null container: null
############### ###############
...@@ -119,7 +119,7 @@ jobs: ...@@ -119,7 +119,7 @@ jobs:
task: r-package task: r-package
compiler: MINGW compiler: MINGW
toolchain: MSYS toolchain: MSYS
r_version: 4.2 r_version: 4.3
build_type: cran build_type: cran
container: null container: null
- os: ubuntu-latest - os: ubuntu-latest
......
...@@ -383,6 +383,13 @@ if(MSVC) ...@@ -383,6 +383,13 @@ if(MSVC)
CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO
) )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP")
if(__BUILD_FOR_R)
# MSVC does not like this commit:
# https://github.com/wch/r-source/commit/fb52ac1a610571fcb8ac92d886b9fefcffaa7d48
#
# and raises "error C3646: 'private_data_c': unknown override specifier"
add_definitions(-DR_LEGACY_RCOMPLEX)
endif()
if(USE_DEBUG) if(USE_DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Od") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Od")
else() else()
......
...@@ -97,9 +97,10 @@ After installing `Rtools` and `CMake`, be sure the following paths are added to ...@@ -97,9 +97,10 @@ After installing `Rtools` and `CMake`, be sure the following paths are added to
- If you have `Rtools` 4.0, example: - If you have `Rtools` 4.0, example:
- `C:\rtools40\mingw64\bin` - `C:\rtools40\mingw64\bin`
- `C:\rtools40\usr\bin` - `C:\rtools40\usr\bin`
- If you have `Rtools` 4.2, example: - If you have `Rtools` 4.2+, example:
- `C:\rtools42\x86_64-w64-mingw32.static.posix\bin` - `C:\rtools42\x86_64-w64-mingw32.static.posix\bin`
- `C:\rtools42\usr\bin` - `C:\rtools42\usr\bin`
- **NOTE**: this is e.g. `rtools43\` for R 4.3
* `CMake` * `CMake`
- example: `C:\Program Files\CMake\bin` - example: `C:\Program Files\CMake\bin`
* `R` * `R`
...@@ -107,7 +108,7 @@ After installing `Rtools` and `CMake`, be sure the following paths are added to ...@@ -107,7 +108,7 @@ After installing `Rtools` and `CMake`, be sure the following paths are added to
NOTE: Two `Rtools` paths are required from `Rtools` 4.0 onwards because paths and the list of included software was changed in `Rtools` 4.0. NOTE: Two `Rtools` paths are required from `Rtools` 4.0 onwards because paths and the list of included software was changed in `Rtools` 4.0.
NOTE: `Rtools42` takes a very different approach to the compiler toolchain than previous releases, and how you install it changes what is required to build packages. See ["Howto: Building R 4.2 and packages on Windows"](https://cran.r-project.org/bin/windows/base/howto-R-4.2.html). NOTE: `Rtools42` and later take a very different approach to the compiler toolchain than previous releases, and how you install it changes what is required to build packages. See ["Howto: Building R 4.2 and packages on Windows"](https://cran.r-project.org/bin/windows/base/howto-R-4.2.html).
#### Windows Toolchain Options #### Windows Toolchain Options
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment