[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
This commit is contained in:
parent
bde20dd897
commit
2c8fa8b8b9
1
.github/workflows/r_tests.yml
vendored
1
.github/workflows/r_tests.yml
vendored
@ -54,7 +54,6 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {os: windows-latest, r: 'release', compiler: 'mingw', build: 'autotools'}
|
- {os: windows-latest, r: 'release', compiler: 'mingw', build: 'autotools'}
|
||||||
- {os: windows-latest, r: '4.3.0', compiler: 'msvc', build: 'cmake'}
|
|
||||||
env:
|
env:
|
||||||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
||||||
RSPM: ${{ matrix.config.rspm }}
|
RSPM: ${{ matrix.config.rspm }}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ Following steps should be done manually:
|
|||||||
def download_r_packages(
|
def download_r_packages(
|
||||||
release: str, branch: str, rc: str, commit: str, outdir: str
|
release: str, branch: str, rc: str, commit: str, outdir: str
|
||||||
) -> Tuple[Dict[str, str], List[str]]:
|
) -> Tuple[Dict[str, str], List[str]]:
|
||||||
platforms = ["win64", "linux"]
|
platforms = ["linux"]
|
||||||
dirname = os.path.join(outdir, "r-packages")
|
dirname = os.path.join(outdir, "r-packages")
|
||||||
if not os.path.exists(dirname):
|
if not os.path.exists(dirname):
|
||||||
os.mkdir(dirname)
|
os.mkdir(dirname)
|
||||||
|
|||||||
@ -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" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -13,11 +13,6 @@ steps:
|
|||||||
key: build-win64-gpu
|
key: build-win64-gpu
|
||||||
agents:
|
agents:
|
||||||
queue: windows-cpu
|
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
|
- wait
|
||||||
|
|
||||||
|
|||||||
@ -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
|
|
||||||
Loading…
x
Reference in New Issue
Block a user