[R] Bump requirement to 4.3.0. (#9847)

This commit is contained in:
Jiaming Yuan 2023-12-07 00:12:45 +08:00 committed by GitHub
parent 1de3f4135c
commit 4bc1f3a388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4 deletions

View File

@ -25,7 +25,7 @@ jobs:
with: with:
submodules: 'true' submodules: 'true'
- uses: r-lib/actions/setup-r@11a22a908006c25fe054c4ef0ac0436b1de3edbe # v2.6.4 - uses: r-lib/actions/setup-r@e40ad904310fc92e96951c1b0d64f3de6cbe9e14 # v2.6.5
with: with:
r-version: ${{ matrix.config.r }} r-version: ${{ matrix.config.r }}
@ -54,7 +54,7 @@ jobs:
matrix: matrix:
config: config:
- {os: windows-latest, r: 'release', compiler: 'mingw', build: 'autotools'} - {os: windows-latest, r: 'release', compiler: 'mingw', build: 'autotools'}
- {os: windows-latest, r: '4.2.0', compiler: 'msvc', build: 'cmake'} - {os: windows-latest, r: '4.3.0', compiler: 'msvc', build: 'cmake'}
env: env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }} RSPM: ${{ matrix.config.rspm }}
@ -64,7 +64,7 @@ jobs:
with: with:
submodules: 'true' submodules: 'true'
- uses: r-lib/actions/setup-r@11a22a908006c25fe054c4ef0ac0436b1de3edbe # v2.6.4 - uses: r-lib/actions/setup-r@e40ad904310fc92e96951c1b0d64f3de6cbe9e14 # v2.6.5
with: with:
r-version: ${{ matrix.config.r }} r-version: ${{ matrix.config.r }}

View File

@ -14,6 +14,15 @@ if(ENABLE_ALL_WARNINGS)
target_compile_options(xgboost-r PRIVATE -Wall -Wextra) target_compile_options(xgboost-r PRIVATE -Wall -Wextra)
endif() endif()
if(MSVC)
# https://github.com/microsoft/LightGBM/pull/6061
# MSVC doesn't work with anonymous types in structs. (R complex)
#
# syntax error: missing ';' before identifier 'private_data_c'
#
target_compile_definitions(xgboost-r PRIVATE -DR_LEGACY_RCOMPLEX)
endif()
target_compile_definitions( target_compile_definitions(
xgboost-r PUBLIC xgboost-r PUBLIC
-DXGBOOST_STRICT_R_MODE=1 -DXGBOOST_STRICT_R_MODE=1

View File

@ -58,7 +58,7 @@ Suggests:
float, float,
titanic titanic
Depends: Depends:
R (>= 3.3.0) R (>= 4.3.0)
Imports: Imports:
Matrix (>= 1.1-0), Matrix (>= 1.1-0),
methods, methods,

View File

@ -261,6 +261,8 @@ def test_with_cmake(args: argparse.Namespace) -> None:
"-DCMAKE_CONFIGURATION_TYPES=Release", "-DCMAKE_CONFIGURATION_TYPES=Release",
"-A", "-A",
"x64", "x64",
"-G",
"Visual Studio 17 2022",
] ]
) )
subprocess.check_call( subprocess.check_call(