Fix R package build on CI. (#8445)

Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
Jiaming Yuan 2022-11-09 12:18:36 +08:00 committed by GitHub
parent a83748eb45
commit 0252d504d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 17 deletions

View File

@ -6,15 +6,13 @@ source tests/buildkite/conftest.sh
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 \
--build-arg CUDA_VERSION_ARG=${CUDA_VERSION} tests/ci_build/build_r_pkg_with_cuda.sh \
${BUILDKITE_COMMIT}
echo "--- Upload R tarball"
aws s3 cp xgboost_r_gpu_linux_*.tar.gz s3://xgboost-nightly-builds/${BRANCH_NAME}/ \
--acl public-read --no-progress
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
then
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

View File

@ -5,12 +5,12 @@ $ErrorActionPreference = "Stop"
Write-Host "--- Build XGBoost R package with CUDA"
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 ) {
$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"
Get-ChildItem . -Filter xgboost_r_gpu_win64_*.tar.gz |
Foreach-Object {

View File

@ -10,7 +10,7 @@ fi
commit_hash="$1"
make Rpack
python tests/ci_build/test_r_package.py --task=pack
mv xgboost/ xgboost_rpack/
mkdir build

View File

@ -9,8 +9,11 @@ then
fi
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/
mkdir build

View File

@ -251,7 +251,9 @@ def test_with_cmake(args: argparse.Namespace) -> None:
@record_time
def main(args: argparse.Namespace) -> None:
if args.task == "build":
if args.task == "pack":
pack_rpackage()
elif args.task == "build":
src_dir = pack_rpackage()
build_rpackage(src_dir)
elif args.task == "doc":
@ -280,7 +282,7 @@ if __name__ == "__main__":
parser.add_argument(
"--task",
type=str,
choices=["build", "check", "doc"],
choices=["pack", "build", "check", "doc"],
default="check",
required=False,
)