Skip to content

Commit 7e5edd6

Browse files
committed
Run all Windows jobs in a single worker image
1 parent 03a1243 commit 7e5edd6

File tree

1 file changed

+15
-32
lines changed

1 file changed

+15
-32
lines changed

Jenkinsfile-win64

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ def commit_id // necessary to pass a variable from one stage to another
1010

1111
pipeline {
1212
agent none
13+
14+
// Setup common job properties
15+
options {
16+
timestamps()
17+
timeout(time: 240, unit: 'MINUTES')
18+
buildDiscarder(logRotator(numToKeepStr: '10'))
19+
preserveStashes()
20+
}
21+
1322
// Build stages
1423
stages {
1524
stage('Jenkins Win64: Initialize') {
@@ -40,8 +49,7 @@ pipeline {
4049
steps {
4150
script {
4251
parallel ([
43-
'test-win64-cpu': { TestWin64CPU() },
44-
'test-win64-gpu-cuda10.1': { TestWin64GPU(cuda_target: 'cuda10_1') }
52+
'test-win64-cuda10.0': { TestWin64() },
4553
])
4654
}
4755
milestone ordinal: 3
@@ -66,7 +74,7 @@ def checkoutSrcs() {
6674
}
6775

6876
def BuildWin64() {
69-
node('win64 && build && cuda10') {
77+
node('win64 && cuda10_unified') {
7078
unstash name: 'srcs'
7179
echo "Building XGBoost for Windows AMD64 target..."
7280
bat "nvcc --version"
@@ -107,48 +115,23 @@ def BuildWin64() {
107115
}
108116
}
109117

110-
def TestWin64CPU() {
111-
node('win64 && cpu') {
118+
def TestWin64() {
119+
node('win64 && cuda10_unified') {
112120
unstash name: 'srcs'
113121
unstash name: 'xgboost_whl'
114122
unstash name: 'xgboost_cli'
115-
echo "Test Win64 CPU"
123+
echo "Test Win64"
116124
echo "Installing Python wheel..."
117125
bat "conda activate && (python -m pip uninstall -y xgboost || cd .)"
118126
bat """
119127
conda activate && for /R %%i in (python-package\\dist\\*.whl) DO python -m pip install "%%i"
120128
"""
121129
echo "Installing Python dependencies..."
122130
bat """
123-
conda activate && conda install -y hypothesis && conda upgrade scikit-learn pandas numpy hypothesis
131+
conda activate && conda install -y hypothesis && conda upgrade scikit-learn pandas numpy hypothesis && python -m pip install cupy-cuda100
124132
"""
125133
echo "Running Python tests..."
126134
bat "conda activate && python -m pytest -v -s --fulltrace tests\\python"
127-
bat "conda activate && python -m pip uninstall -y xgboost"
128-
deleteDir()
129-
}
130-
}
131-
132-
def TestWin64GPU(args) {
133-
node("win64 && gpu && ${args.cuda_target}") {
134-
unstash name: 'srcs'
135-
unstash name: 'xgboost_whl'
136-
unstash name: 'xgboost_cpp_tests'
137-
echo "Test Win64 GPU (${args.cuda_target})"
138-
bat "nvcc --version"
139-
echo "Running C++ tests..."
140-
bat "build\\testxgboost.exe"
141-
echo "Installing Python wheel..."
142-
bat "conda activate && (python -m pip uninstall -y xgboost || cd .)"
143-
bat """
144-
conda activate && for /R %%i in (python-package\\dist\\*.whl) DO python -m pip install "%%i"
145-
"""
146-
echo "Installing Python dependencies..."
147-
def cuda_short_ver = args.cuda_target.replaceAll('_', '')
148-
bat """
149-
conda activate && conda install -y hypothesis && conda upgrade scikit-learn pandas numpy hypothesis && python -m pip install cupy-${cuda_short_ver}
150-
"""
151-
echo "Running Python tests..."
152135
bat """
153136
conda activate && python -m pytest -v -s --fulltrace -m "(not slow) and (not mgpu)" tests\\python-gpu
154137
"""

0 commit comments

Comments
 (0)