[CI] Add CI pipeline to build libxgboost4j.so targeting Linux ARM64 (#10487)
This commit is contained in:
committed by
GitHub
parent
4abf24aa4f
commit
08658b124d
@@ -134,6 +134,7 @@ def main():
|
||||
print("====Creating directories to hold native binaries====")
|
||||
for os_ident, arch in [
|
||||
("linux", "x86_64"),
|
||||
("linux", "aarch64"),
|
||||
("windows", "x86_64"),
|
||||
("macos", "x86_64"),
|
||||
("macos", "aarch64"),
|
||||
@@ -156,6 +157,14 @@ def main():
|
||||
url=f"{nightly_bucket_prefix}/{git_branch}/libxgboost4j/xgboost4j_{commit_hash}.dll",
|
||||
filename="xgboost4j/src/main/resources/lib/windows/x86_64/xgboost4j.dll",
|
||||
)
|
||||
retrieve(
|
||||
url=f"{nightly_bucket_prefix}/{git_branch}/libxgboost4j/libxgboost4j_linux_x86_64_{commit_hash}.so",
|
||||
filename="xgboost4j/src/main/resources/lib/linux/x86_64/libxgboost4j.so",
|
||||
)
|
||||
retrieve(
|
||||
url=f"{nightly_bucket_prefix}/{git_branch}/libxgboost4j/libxgboost4j_linux_arm64_{commit_hash}.so",
|
||||
filename="xgboost4j/src/main/resources/lib/linux/aarch64/libxgboost4j.so",
|
||||
)
|
||||
retrieve(
|
||||
url=f"{nightly_bucket_prefix}/{git_branch}/libxgboost4j/libxgboost4j_{commit_hash}.dylib",
|
||||
filename="xgboost4j/src/main/resources/lib/macos/x86_64/libxgboost4j.dylib",
|
||||
@@ -166,22 +175,6 @@ def main():
|
||||
)
|
||||
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
# libxgboost4j.so for Linux x86_64, CPU only
|
||||
zip_path = os.path.join(tempdir, "xgboost4j_2.12.jar")
|
||||
extract_dir = os.path.join(tempdir, "xgboost4j")
|
||||
retrieve(
|
||||
url=f"{maven_repo_prefix}/xgboost4j_2.12/{version}/"
|
||||
f"xgboost4j_2.12-{version}.jar",
|
||||
filename=zip_path,
|
||||
)
|
||||
os.mkdir(extract_dir)
|
||||
with zipfile.ZipFile(zip_path, "r") as t:
|
||||
t.extractall(extract_dir)
|
||||
cp(
|
||||
os.path.join(extract_dir, "lib", "linux", "x86_64", "libxgboost4j.so"),
|
||||
"xgboost4j/src/main/resources/lib/linux/x86_64/libxgboost4j.so",
|
||||
)
|
||||
|
||||
# libxgboost4j.so for Linux x86_64, GPU support
|
||||
zip_path = os.path.join(tempdir, "xgboost4j-gpu_2.12.jar")
|
||||
extract_dir = os.path.join(tempdir, "xgboost4j-gpu")
|
||||
|
||||
Reference in New Issue
Block a user