-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Add Windows GPU to Jenkins CI pipeline (#4463)
* Fix #4462: Use /MT flag consistently for MSVC target * First attempt at Windows CI * Distinguish stages in Linux and Windows pipelines * Try running CMake in Windows pipeline * Add build step
- Loading branch information
Showing
5 changed files
with
98 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/usr/bin/groovy | ||
// -*- mode: groovy -*- | ||
|
||
/* Jenkins pipeline for Windows AMD64 target */ | ||
|
||
pipeline { | ||
agent none | ||
// Build stages | ||
stages { | ||
stage('Jenkins Win64: Get sources') { | ||
agent { label 'win64' } | ||
steps { | ||
script { | ||
checkoutSrcs() | ||
} | ||
stash name: 'srcs' | ||
milestone ordinal: 1 | ||
} | ||
} | ||
stage('Jenkins Win64: Build') { | ||
agent none | ||
steps { | ||
script { | ||
parallel ([ | ||
'build-win64': { BuildWin64() } | ||
]) | ||
} | ||
milestone ordinal: 2 | ||
} | ||
} | ||
} | ||
} | ||
|
||
// check out source code from git | ||
def checkoutSrcs() { | ||
retry(5) { | ||
try { | ||
timeout(time: 2, unit: 'MINUTES') { | ||
checkout scm | ||
sh 'git submodule update --init' | ||
} | ||
} catch (exc) { | ||
deleteDir() | ||
error "Failed to fetch source codes" | ||
} | ||
} | ||
} | ||
|
||
def BuildWin64() { | ||
node('win64') { | ||
unstash name: 'srcs' | ||
echo "Building XGBoost for Windows AMD64 target..." | ||
bat """ | ||
mkdir build | ||
cd build | ||
cmake .. -G"Visual Studio 15 2017 Win64" -DUSE_CUDA=ON -DCMAKE_VERBOSE_MAKEFILE=ON | ||
""" | ||
bat """ | ||
cd build | ||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe" xgboost.sln /m /p:Configuration=Release | ||
""" | ||
bat """ | ||
cd python-package | ||
conda activate && python setup.py bdist_wheel --universal | ||
""" | ||
stash name: 'xgboost_win_whl', includes: 'python-package/dist/*.whl' | ||
archiveArtifacts artifacts: "python-package/dist/*.whl", allowEmptyArchive: true | ||
deleteDir() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters