From 2c8fa8b8b96c4c8b62a715f1334577b10512df71 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Thu, 18 Jan 2024 08:09:53 -0800 Subject: [PATCH] [CI] Skip MSVC when building R package (#9995) * [CI] Skip MSVC when building R package * [CI] Stop building binary tarball for Windows * Remove unused script --- .github/workflows/r_tests.yml | 1 - dev/release-artifacts.py | 2 +- tests/buildkite/build-rpkg-win64-gpu.ps1 | 21 ----------- tests/buildkite/pipeline-win64.yml | 5 --- tests/ci_build/build_r_pkg_with_cuda_win64.sh | 36 ------------------- 5 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 tests/buildkite/build-rpkg-win64-gpu.ps1 delete mode 100644 tests/ci_build/build_r_pkg_with_cuda_win64.sh diff --git a/.github/workflows/r_tests.yml b/.github/workflows/r_tests.yml index 917245ec6..d004ab15c 100644 --- a/.github/workflows/r_tests.yml +++ b/.github/workflows/r_tests.yml @@ -54,7 +54,6 @@ jobs: matrix: config: - {os: windows-latest, r: 'release', compiler: 'mingw', build: 'autotools'} - - {os: windows-latest, r: '4.3.0', compiler: 'msvc', build: 'cmake'} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} diff --git a/dev/release-artifacts.py b/dev/release-artifacts.py index 429fac078..d5f28f6fc 100644 --- a/dev/release-artifacts.py +++ b/dev/release-artifacts.py @@ -153,7 +153,7 @@ Following steps should be done manually: def download_r_packages( release: str, branch: str, rc: str, commit: str, outdir: str ) -> Tuple[Dict[str, str], List[str]]: - platforms = ["win64", "linux"] + platforms = ["linux"] dirname = os.path.join(outdir, "r-packages") if not os.path.exists(dirname): os.mkdir(dirname) diff --git a/tests/buildkite/build-rpkg-win64-gpu.ps1 b/tests/buildkite/build-rpkg-win64-gpu.ps1 deleted file mode 100644 index a6947c270..000000000 --- a/tests/buildkite/build-rpkg-win64-gpu.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -$ErrorActionPreference = "Stop" - -. tests/buildkite/conftest.ps1 - -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 ) { - Write-Host "--- Upload R tarball" - Get-ChildItem . -Filter xgboost_r_gpu_win64_*.tar.gz | - Foreach-Object { - & aws s3 cp $_ s3://xgboost-nightly-builds/$Env:BUILDKITE_BRANCH/ ` - --acl public-read --no-progress - if ($LASTEXITCODE -ne 0) { throw "Last command failed" } - } -} diff --git a/tests/buildkite/pipeline-win64.yml b/tests/buildkite/pipeline-win64.yml index d4491148e..83a61981e 100644 --- a/tests/buildkite/pipeline-win64.yml +++ b/tests/buildkite/pipeline-win64.yml @@ -13,11 +13,6 @@ steps: key: build-win64-gpu agents: queue: windows-cpu - - label: ":windows: Build XGBoost R package for Windows with CUDA" - command: "tests/buildkite/build-rpkg-win64-gpu.ps1" - key: build-rpkg-win64-gpu - agents: - queue: windows-cpu - wait diff --git a/tests/ci_build/build_r_pkg_with_cuda_win64.sh b/tests/ci_build/build_r_pkg_with_cuda_win64.sh deleted file mode 100644 index 580358883..000000000 --- a/tests/ci_build/build_r_pkg_with_cuda_win64.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -set -e -set -x - -if [ "$#" -ne 1 ] -then - echo "Build the R package tarball with CUDA code. Usage: $0 [commit hash]" - exit 1 -fi - -commit_hash="$1" -# Clear all positional args -set -- - -source activate -python tests/ci_build/test_r_package.py --task=pack -mv xgboost/ xgboost_rpack/ - -mkdir build -cd build -cmake .. -G"Visual Studio 17 2022" -A x64 -DUSE_CUDA=ON -DR_LIB=ON -DLIBR_HOME="c:\\Program Files\\R\\R-4.3.2" -DCMAKE_PREFIX_PATH="C:\\rtools43\\x86_64-w64-mingw32.static.posix\\bin" -cmake --build . --config Release --parallel -cd .. - -# This super wacky hack is found in cmake/RPackageInstall.cmake.in and -# cmake/RPackageInstallTargetSetup.cmake. This hack lets us bypass the normal build process of R -# and have R use xgboost.dll that we've already built. -rm -v xgboost_rpack/configure -rm -rfv xgboost_rpack/src -mkdir -p xgboost_rpack/src -cp -v lib/xgboost.dll xgboost_rpack/src/ -echo 'all:' > xgboost_rpack/src/Makefile -echo 'all:' > xgboost_rpack/src/Makefile.win -mv xgboost_rpack/ xgboost/ -/c/Rtools43/usr/bin/tar -cvf xgboost_r_gpu_win64_${commit_hash}.tar xgboost/ -/c/Rtools43/usr/bin/gzip -9c xgboost_r_gpu_win64_${commit_hash}.tar > xgboost_r_gpu_win64_${commit_hash}.tar.gz