Skip to content

Commit

Permalink
[R] Bump requirement to 4.3.0. (#9847)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis authored Dec 6, 2023
1 parent 1de3f41 commit 4bc1f3a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/r_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
submodules: 'true'

- uses: r-lib/actions/setup-r@11a22a908006c25fe054c4ef0ac0436b1de3edbe # v2.6.4
- uses: r-lib/actions/setup-r@e40ad904310fc92e96951c1b0d64f3de6cbe9e14 # v2.6.5
with:
r-version: ${{ matrix.config.r }}

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
matrix:
config:
- {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:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
Expand All @@ -64,7 +64,7 @@ jobs:
with:
submodules: 'true'

- uses: r-lib/actions/setup-r@11a22a908006c25fe054c4ef0ac0436b1de3edbe # v2.6.4
- uses: r-lib/actions/setup-r@e40ad904310fc92e96951c1b0d64f3de6cbe9e14 # v2.6.5
with:
r-version: ${{ matrix.config.r }}

Expand Down
9 changes: 9 additions & 0 deletions R-package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ if(ENABLE_ALL_WARNINGS)
target_compile_options(xgboost-r PRIVATE -Wall -Wextra)
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(
xgboost-r PUBLIC
-DXGBOOST_STRICT_R_MODE=1
Expand Down
2 changes: 1 addition & 1 deletion R-package/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Suggests:
float,
titanic
Depends:
R (>= 3.3.0)
R (>= 4.3.0)
Imports:
Matrix (>= 1.1-0),
methods,
Expand Down
2 changes: 2 additions & 0 deletions tests/ci_build/test_r_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ def test_with_cmake(args: argparse.Namespace) -> None:
"-DCMAKE_CONFIGURATION_TYPES=Release",
"-A",
"x64",
"-G",
"Visual Studio 17 2022",
]
)
subprocess.check_call(
Expand Down

0 comments on commit 4bc1f3a

Please sign in to comment.