-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
87 lines (73 loc) · 2.79 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
#!/usr/bin/env groovy
currentBuild.result = "SUCCESS"
node('rocm && fiji')
{
// sh 'env | sort'
def scm_dir = pwd()
def build_dir_debug = "${scm_dir}/../build/debug"
def build_dir_release = "${scm_dir}/../build/release"
try
{
dir("${scm_dir}") {
stage("Clone") {
checkout scm
}
}
// create softlinks for clang
sh "sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.5 50 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.5"
dir("${build_dir_release}") {
stage("configure clang release") {
sh "cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRARY=ON -DBUILD_CLIENTS=ON -DBUILD_CLIENTS_SAMPLES=ON -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_RIDER=ON -DHIP_ROOT=/opt/rocm/hip -DBOOST_ROOT=/opt/boost/clang -DFFTW_ROOT=/usr/lib ${scm_dir}"
}
stage("Build") {
sh 'make -j 8'
}
stage("Package Debian") {
sh 'cd library-build; make package'
archive includes: 'library-build/*.deb'
}
stage("unit tests") {
sh '''
cd clients-build/tests-build/staging
./rocfft-test-correctness-d --gtest_output=xml
'''
junit 'clients-build/tests-build/staging/*.xml'
}
stage("rider") {
sh '''
cd clients-build/rider-build/staging
./rocfft-rider-d -x 16
./rocfft-rider-d -x 256
./rocfft-rider-d -x 1024
'''
}
// stage("samples") {
// sh '''
// cd clients-build/samples-build/fixed-16
// ./fixed-16
// '''
// }
}
// dir("${build_dir_debug}") {
// stage("clang-tidy checks") {
// sh "cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_LIBRARY=ON -DHIP_ROOT=/opt/rocm/hip -DCMAKE_CXX_CLANG_TIDY=\"clang-tidy-3.5;-checks=*\" ${scm_dir}"
// sh 'make'
// }
// }
}
catch( err )
{
currentBuild.result = "FAILURE"
def email_list = emailextrecipients([
[$class: 'CulpritsRecipientProvider']
])
// CulpritsRecipientProvider below doesn't help, because nobody uses their real email address
// emailext to: "[email protected]", recipientProviders: [[$class: 'CulpritsRecipientProvider']],
// subject: "${env.JOB_NAME} finished with ${currentBuild.result}",
// body: "Node: ${env.NODE_NAME}\nSee ${env.BUILD_URL}\n\n" + err.toString()
subject: "${env.JOB_NAME} finished with ${currentBuild.result}",
body: "Node: ${env.NODE_NAME}\nSee ${env.BUILD_URL}\n\n" + err.toString()
throw err
}
}