forked from Technica-Engineering/vector_blf
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
160 lines (159 loc) · 6.69 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// SPDX-FileCopyrightText: 2013-2021 Tobias Lorenz <[email protected]>
//
// SPDX-License-Identifier: GPL-3.0-or-later
pipeline {
agent none
stages {
stage('Build and Test') {
parallel {
stage('Debian Testing') {
agent {
dockerfile {
filename 'debian_testing'
label 'linux'
dir 'Dockerfiles'
}
}
steps {
sh '''
cmake --version
gcc --version
g++ --version
'''
dir('build-debian_testing') {
sh '''
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=sysroot \
-DOPTION_BUILD_EXAMPLES=ON \
-DOPTION_BUILD_TESTS=ON \
-DOPTION_RUN_CCCC=ON \
-DOPTION_RUN_CPPCHECK=ON \
-DOPTION_USE_GCOV=ON \
-DOPTION_USE_GPROF=OFF \
-DOPTION_ADD_LCOV=ON \
-DOPTION_RUN_DOXYGEN=ON \
..
'''
sh 'cmake --build .'
sh 'ctest'
sh 'make install'
}
}
post {
success {
archiveArtifacts artifacts: 'build-debian_testing/sysroot/**'
publishHTML target: [
reportName: 'Doxygen',
reportDir: 'build-debian_testing/src/Vector/BLF/docs/doxygen/html',
reportFiles: 'index.html',
includes: '**'
]
}
}
}
stage('Debian 9 Stretch Backports') {
agent {
dockerfile {
filename 'debian_stretch-backports'
label 'linux'
dir 'Dockerfiles'
}
}
steps {
sh '''
cmake --version
gcc --version
g++ --version
'''
dir('build-debian_stretch-backports') {
sh '''
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=sysroot \
-DOPTION_BUILD_EXAMPLES=ON \
-DOPTION_BUILD_TESTS=ON \
-DOPTION_RUN_CCCC=OFF \
-DOPTION_RUN_CPPCHECK=OFF \
-DOPTION_USE_GCOV=OFF \
-DOPTION_USE_GPROF=OFF \
-DOPTION_ADD_LCOV=OFF \
-DOPTION_RUN_DOXYGEN=OFF \
..
'''
sh 'cmake --build .'
sh 'ctest'
}
}
}
stage('Debian 10 Buster') {
agent {
dockerfile {
filename 'debian_buster'
label 'linux'
dir 'Dockerfiles'
}
}
steps {
sh '''
cmake --version
gcc --version
g++ --version
'''
dir('build-debian_buster') {
sh '''
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=sysroot \
-DOPTION_BUILD_EXAMPLES=ON \
-DOPTION_BUILD_TESTS=ON \
-DOPTION_RUN_CCCC=OFF \
-DOPTION_RUN_CPPCHECK=OFF \
-DOPTION_USE_GCOV=OFF \
-DOPTION_USE_GPROF=OFF \
-DOPTION_ADD_LCOV=OFF \
-DOPTION_RUN_DOXYGEN=OFF \
..
'''
sh 'cmake --build .'
sh 'ctest'
}
}
}
stage('Visual Studio 2017') {
agent {
/* disabled till this is solved: https://issues.jenkins-ci.org/browse/JENKINS-36776
dockerfile {
filename 'windowsservercore_1709-visualstudio_2017'
label 'windows'
dir 'Dockerfiles'
}
*/
node {
label 'windows'
customWorkspace 'C:\\workspace\\Vector_BLF'
}
}
steps {
bat '''
cmake --version
'''
dir('build-windowsservercore_1709-visualstudio_2017') {
bat '''
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=sysroot \
-DOPTION_BUILD_EXAMPLES=ON \
-DOPTION_BUILD_TESTS=OFF \
-DOPTION_RUN_CCCC=OFF \
-DOPTION_RUN_CPPCHECK=OFF \
-DOPTION_USE_GCOV=OFF \
-DOPTION_USE_GPROF=OFF \
-DOPTION_ADD_LCOV=OFF \
-DOPTION_RUN_DOXYGEN=OFF \
..
'''
bat 'cmake --build .'
}
}
}
}
}
}
}