Fix R package build on CI. (#8445)
Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
parent
a83748eb45
commit
0252d504d8
@ -6,15 +6,13 @@ source tests/buildkite/conftest.sh
|
|||||||
|
|
||||||
echo "--- Build XGBoost R package with CUDA"
|
echo "--- Build XGBoost R package with CUDA"
|
||||||
|
|
||||||
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
|
|
||||||
then
|
|
||||||
|
|
||||||
tests/ci_build/ci_build.sh gpu_build_r_centos7 docker \
|
tests/ci_build/ci_build.sh gpu_build_r_centos7 docker \
|
||||||
--build-arg CUDA_VERSION_ARG=${CUDA_VERSION} tests/ci_build/build_r_pkg_with_cuda.sh \
|
--build-arg CUDA_VERSION_ARG=${CUDA_VERSION} tests/ci_build/build_r_pkg_with_cuda.sh \
|
||||||
${BUILDKITE_COMMIT}
|
${BUILDKITE_COMMIT}
|
||||||
|
|
||||||
echo "--- Upload R tarball"
|
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
|
||||||
aws s3 cp xgboost_r_gpu_linux_*.tar.gz s3://xgboost-nightly-builds/${BRANCH_NAME}/ \
|
then
|
||||||
--acl public-read --no-progress
|
echo "--- Upload R tarball"
|
||||||
|
aws s3 cp xgboost_r_gpu_linux_*.tar.gz s3://xgboost-nightly-builds/${BRANCH_NAME}/ \
|
||||||
|
--acl public-read --no-progress
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -5,12 +5,12 @@ $ErrorActionPreference = "Stop"
|
|||||||
Write-Host "--- Build XGBoost R package with CUDA"
|
Write-Host "--- Build XGBoost R package with CUDA"
|
||||||
|
|
||||||
nvcc --version
|
nvcc --version
|
||||||
|
$arch_flag = "-DGPU_COMPUTE_VER=75"
|
||||||
|
|
||||||
|
bash tests/ci_build/build_r_pkg_with_cuda_win64.sh $Env:BUILDKITE_COMMIT
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
|
||||||
|
|
||||||
if ( $is_release_branch -eq 1 ) {
|
if ( $is_release_branch -eq 1 ) {
|
||||||
$arch_flag = "-DGPU_COMPUTE_VER=75"
|
|
||||||
|
|
||||||
bash tests/ci_build/build_r_pkg_with_cuda_win64.sh $Env:BUILDKITE_COMMIT
|
|
||||||
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
|
|
||||||
|
|
||||||
Write-Host "--- Upload R tarball"
|
Write-Host "--- Upload R tarball"
|
||||||
Get-ChildItem . -Filter xgboost_r_gpu_win64_*.tar.gz |
|
Get-ChildItem . -Filter xgboost_r_gpu_win64_*.tar.gz |
|
||||||
Foreach-Object {
|
Foreach-Object {
|
||||||
|
|||||||
@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
commit_hash="$1"
|
commit_hash="$1"
|
||||||
|
|
||||||
make Rpack
|
python tests/ci_build/test_r_package.py --task=pack
|
||||||
mv xgboost/ xgboost_rpack/
|
mv xgboost/ xgboost_rpack/
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|||||||
@ -9,8 +9,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
commit_hash="$1"
|
commit_hash="$1"
|
||||||
|
# Clear all positional args
|
||||||
|
set --
|
||||||
|
|
||||||
MAKE="/c/Rtools/bin/make" /c/Rtools/bin/make Rpack
|
source activate
|
||||||
|
python tests/ci_build/test_r_package.py --task=pack
|
||||||
mv xgboost/ xgboost_rpack/
|
mv xgboost/ xgboost_rpack/
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
@ -31,4 +34,4 @@ echo 'all:' > xgboost_rpack/src/Makefile
|
|||||||
echo 'all:' > xgboost_rpack/src/Makefile.win
|
echo 'all:' > xgboost_rpack/src/Makefile.win
|
||||||
mv xgboost_rpack/ xgboost/
|
mv xgboost_rpack/ xgboost/
|
||||||
/c/Rtools/bin/tar -cvf xgboost_r_gpu_win64_${commit_hash}.tar xgboost/
|
/c/Rtools/bin/tar -cvf xgboost_r_gpu_win64_${commit_hash}.tar xgboost/
|
||||||
/c/Rtools/bin/gzip -9c xgboost_r_gpu_win64_${commit_hash}.tar > xgboost_r_gpu_win64_${commit_hash}.tar.gz
|
/c/Rtools/bin/gzip -9c xgboost_r_gpu_win64_${commit_hash}.tar > xgboost_r_gpu_win64_${commit_hash}.tar.gz
|
||||||
|
|||||||
@ -251,7 +251,9 @@ def test_with_cmake(args: argparse.Namespace) -> None:
|
|||||||
|
|
||||||
@record_time
|
@record_time
|
||||||
def main(args: argparse.Namespace) -> None:
|
def main(args: argparse.Namespace) -> None:
|
||||||
if args.task == "build":
|
if args.task == "pack":
|
||||||
|
pack_rpackage()
|
||||||
|
elif args.task == "build":
|
||||||
src_dir = pack_rpackage()
|
src_dir = pack_rpackage()
|
||||||
build_rpackage(src_dir)
|
build_rpackage(src_dir)
|
||||||
elif args.task == "doc":
|
elif args.task == "doc":
|
||||||
@ -280,7 +282,7 @@ if __name__ == "__main__":
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--task",
|
"--task",
|
||||||
type=str,
|
type=str,
|
||||||
choices=["build", "check", "doc"],
|
choices=["pack", "build", "check", "doc"],
|
||||||
default="check",
|
default="check",
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user