forked from hyrise/hyrise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
117 lines (106 loc) · 5.32 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
node {
def oppossumCI = docker.image('hyrise/opossum-ci:17.10');
oppossumCI.pull()
// create ccache volume on host using:
// mkdir /mnt/ccache; mount -t tmpfs -o size=10G none /mnt/ccache
oppossumCI.inside("-u 0:0 -v /mnt/ccache:/ccache -e \"CCACHE_DIR=/ccache\" -e \"CCACHE_CPP2=yes\" -e \"CACHE_MAXSIZE=10GB\" -e \"CCACHE_SLOPPINESS=file_macro\"") {
try {
stage("Setup") {
checkout([
$class: 'GitSCM',
branches: scm.branches,
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
extensions: scm.extensions + [$class: 'CloneOption', noTags: true, reference: '', shallow: true, honorRefspec: true],
// Set the remote by hand so that we can only check out the branch that we want:
userRemoteConfigs: [[refspec: "+refs/heads/" + scm.branches[0] + ":refs/remotes/origin/" + scm.branches[0],
url : scm.userRemoteConfigs.get(0).getUrl(),
credentialsId: scm.userRemoteConfigs.get(0).getCredentialsId()]],
])
sh "./install.sh"
sh "mkdir clang-debug && cd clang-debug && cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_CXX_COMPILER=clang++-5.0 .. &\
mkdir clang-release && cd clang-release && cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_CXX_COMPILER=clang++-5.0 .. &\
mkdir clang-release-no-numa && cd clang-release-no-numa && cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_CXX_COMPILER=clang++-5.0 -DDISABLE_NUMA_SUPPORT=On .. &\
mkdir gcc-release && cd gcc-release && cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. &\
mkdir gcc-debug-coverage && cd gcc-debug-coverage && cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. &\
wait"
}
stage("Linting") {
sh '''
scripts/lint.sh
if [ $? != 0 ]; then
echo "ERROR: Linting error occured. Execute \"scripts/lint.sh\" for details!"
exit 1
fi
'''
}
parallel clangRelease: {
stage("clang-release") {
sh "export CCACHE_BASEDIR=`pwd`; cd clang-release && make all -j \$(( \$(cat /proc/cpuinfo | grep processor | wc -l) / 3))"
sh "./clang-release/hyriseTest"
}
}, clangDebugBuildOnly: {
stage("clang-debug") {
sh "export CCACHE_BASEDIR=`pwd`; cd clang-debug && make all -j \$(( \$(cat /proc/cpuinfo | grep processor | wc -l) / 3))"
}
}
parallel clangDebugRun: {
stage("clang-debug:test") {
sh "./clang-debug/hyriseTest"
}
}, clangDebugSanitizers: {
stage("clang-debug:sanitizers") {
sh "export CCACHE_BASEDIR=`pwd`; cd clang-debug && make hyriseSanitizers -j \$(( \$(cat /proc/cpuinfo | grep processor | wc -l) / 3))"
sh "LSAN_OPTIONS=suppressions=asan-ignore.txt ./clang-debug/hyriseSanitizers"
}
}, gccRelease: {
stage("gcc-release") {
sh "export CCACHE_BASEDIR=`pwd`; cd gcc-release && make all -j \$(( \$(cat /proc/cpuinfo | grep processor | wc -l) / 3))"
sh "./gcc-release/hyriseTest"
}
}, tpcc: {
stage("TPCC Test") {
sh "./scripts/test_tpcc.sh clang-release"
}
}, clangReleaseSanitizers: {
stage("clang-release:sanitizers") {
sh "export CCACHE_BASEDIR=`pwd`; cd clang-release && make hyriseSanitizers -j \$(( \$(cat /proc/cpuinfo | grep processor | wc -l) / 3))"
sh "LSAN_OPTIONS=suppressions=asan-ignore.txt ./clang-release/hyriseSanitizers"
}
}, clangReleaseSanitizersNoNuma: {
stage("clang-release:sanitizers w/o NUMA") {
sh "export CCACHE_BASEDIR=`pwd`; cd clang-release-no-numa && make hyriseSanitizers -j \$(( \$(cat /proc/cpuinfo | grep processor | wc -l) / 3))"
sh "LSAN_OPTIONS=suppressions=asan-ignore.txt ./clang-release-no-numa/hyriseSanitizers"
}
}, gccDebugCverage: {
stage("gcc-debug-coverage") {
sh "export CCACHE_BASEDIR=`pwd`; cd gcc-debug-coverage && make hyriseCoverage -j \$(( \$(cat /proc/cpuinfo | grep processor | wc -l) / 3))"
sh "./scripts/coverage.sh gcc-debug-coverage true"
archive 'coverage_badge.svg'
archive 'coverage_percent.txt'
publishHTML (target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'coverage',
reportFiles: 'index.html',
reportName: "RCov Report"
])
script {
coverageChange = sh script: "./scripts/compare_coverage.sh", returnStdout: true
githubNotify context: 'Coverage', description: "$coverageChange", status: 'SUCCESS', targetUrl: "${env.BUILD_URL}/RCov_Report/index.html"
}
}
}
stage("Cleanup") {
// Clean up workspace.
step([$class: 'WsCleanup'])
}
} catch (error) {
stage "Cleanup after fail"
throw error
} finally {
sh "ls -A1 | xargs rm -rf"
deleteDir()
}
}
}