forked from conceptslearningmachine-FEIN-85-1759293/mcas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
92 lines (83 loc) · 3.38 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
pipeline {
agent any
stages {
stage('Debug Build') {
steps {
timeout(time: 60, unit: 'MINUTES')
{
sh "git submodule update --init -f"
sh "./deps/install-python-deps.sh"
sh "mkdir -p debug-build ; cd debug-build ; cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=`pwd`/dist .."
dir('debug-build') {
sh "make bootstrap ; make -j ; make -j install"
}
}
}
}
stage('Debug Run') {
steps {
timeout(time: 60, unit: 'MINUTES')
{
dir('debug-build') {
withEnv(["LD_LIBRARY_PATH=${pwd()}/dist/lib:${pwd()}/dist/lib64"]) {
sh "ln -s -f ${pwd()}/dist/lib/libfabric.so.1.13.1 ${pwd()}/dist/lib/libfabric.so.1"
sh "ln -s -f ${pwd()}/dist/lib/libcityhash.so ${pwd()}/dist/lib/libcityhash.so.0"
sh "ln -s -f ${pwd()}/dist/lib/libxpmem.so ${pwd()}/dist/lib/libxpmem.so.0"
sh "echo $LD_LIBRARY_PATH"
sh "./dist/testing/run-tests.sh > results.log"
}
sh "if grep fail results.log ; then exit -1; else exit 0; fi"
}
}
}
}
stage('Release Build') {
steps {
timeout(time: 60, unit: 'MINUTES')
{
sh "git submodule update --init -f"
sh "mkdir -p release-build ; cd release-build ; cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/dist .."
dir('release-build') {
sh "make bootstrap ; make -j ; make -j install"
}
}
}
}
stage('Release Run') {
steps {
timeout(time: 60, unit: 'MINUTES')
{
dir('release-build') {
withEnv(["LD_LIBRARY_PATH=${pwd()}/dist/lib:${pwd()}/dist/lib64"]) {
sh "ln -s -f ${pwd()}/dist/lib/libfabric.so.1.13.1 ${pwd()}/dist/lib/libfabric.so.1"
sh "ln -s -f ${pwd()}/dist/lib/libcityhash.so ${pwd()}/dist/lib/libcityhash.so.0"
sh "ln -s -f ${pwd()}/dist/lib/libxpmem.so ${pwd()}/dist/lib/libxpmem.so.0"
sh "echo $LD_LIBRARY_PATH"
sh "./dist/testing/run-tests.sh release > results.log"
}
sh "if grep fail results.log ; then exit -1; else exit 0; fi"
}
}
}
}
}
post {
success {
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: false,
disableDeferredWipeout: true,
notFailBuild: true,
patterns: [[pattern: '**/*.log', type: 'EXCLUDE']])
githubNotify(status: 'SUCCESS', description: 'Jenkins build OK')
}
failure {
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: false,
cleanWhenFailure: false,
disableDeferredWipeout: true,
notFailBuild: true,
patterns: [[pattern: '**/*.log', type: 'EXCLUDE']])
githubNotify(status: 'FAILURE', description: 'Jenkins build failed')
}
}
}