[CI] Test R package with CMake (#10087)

* [CI] Test R package with CMake

* Fix

* Fix

* Update test_r_package.py

* Fix CMake flag for R package

* Install system deps

* Fix

* Use sudo
This commit is contained in:
Philip Hyunsu Cho
2024-03-04 12:32:44 -08:00
committed by GitHub
parent d07b7fe8c8
commit 23a37dcaf9
3 changed files with 28 additions and 4 deletions

View File

@@ -277,6 +277,19 @@ def test_with_cmake(args: argparse.Namespace) -> None:
"Release",
]
)
elif args.compiler == "none":
subprocess.check_call(
[
"cmake",
os.path.pardir,
"-DUSE_OPENMP=ON",
"-DR_LIB=ON",
"-DCMAKE_CONFIGURATION_TYPES=Release",
"-G",
"Unix Makefiles",
]
)
subprocess.check_call(["make", "-j", "install"])
else:
raise ValueError("Wrong compiler")
with DirectoryExcursion(R_PACKAGE):
@@ -333,9 +346,9 @@ if __name__ == "__main__":
parser.add_argument(
"--compiler",
type=str,
choices=["mingw", "msvc"],
choices=["mingw", "msvc", "none"],
help="Compiler used for compiling CXX code. Only relevant for windows build",
default="mingw",
default="none",
required=False,
)
parser.add_argument(