forked from dmlc/xgboost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
55 lines (49 loc) · 1.17 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// -*- mode: groovy -*-
// Jenkins pipeline
// See documents at https://jenkins.io/doc/book/pipeline/jenkinsfile/
// command to start a docker container
docker_run = 'tests/ci_build/ci_build.sh'
// timeout in minutes
max_time = 60
// initialize source codes
def init_git() {
retry(5) {
try {
timeout(time: 2, unit: 'MINUTES') {
checkout scm
sh 'git submodule update --init'
}
} catch (exc) {
deleteDir()
error "Failed to fetch source codes"
}
}
}
stage('Build') {
node('GPU' && 'linux') {
ws('workspace/xgboost/build-gpu-cmake') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} gpu tests/ci_build/build_gpu_cmake.sh"
}
}
}
node('GPU' && 'linux') {
ws('workspace/xgboost/build-gpu-make') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} gpu make PLUGIN_UPDATER_GPU=ON"
}
}
}
}
stage('Unit Test') {
node('GPU' && 'linux') {
ws('workspace/xgboost/unit-test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} gpu tests/ci_build/test_gpu.ssh"
}
}
}
}