-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathJenkinsfile
92 lines (88 loc) · 2.43 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
#!groovy
pipeline {
agent {
dockerfile {
label 'docker-gpu-host'
dir '.devcontainer'
additionalBuildArgs '--build-arg USER_UID=520 --build-arg USER_GID=500'
args '--gpus=all'
}
}
options {
timeout(time: 2, unit: 'HOURS')
disableConcurrentBuilds()
}
stages {
stage('Build') {
parallel {
stage('gcc') {
steps {
sh '''
export CONAN_USER_HOME=$PWD/.conan-gcc
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -B build-gcc
cmake --build build-gcc 2>&1 |tee build-gcc/make.out
'''
}
post {
always {
recordIssues enabledForFailure: true, aggregatingResults: false,
tool: gcc(id: 'gcc', pattern: 'build-gcc/make.out')
}
}
}
stage('clang') {
steps {
sh '''
export CONAN_USER_HOME=$PWD/.conan-clang
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build-clang
cmake --build build-clang 2>&1 |tee build-clang/make.out
'''
}
post {
always {
recordIssues enabledForFailure: true, aggregatingResults: false,
tool: gcc(id: 'clang', pattern: 'build-clang/make.out')
}
}
}
}
}
stage('Test') {
parallel {
stage('gcc') {
steps {
sh 'cmake --build build-gcc --target test'
}
post {
always {
step([
$class: 'XUnitPublisher',
thresholds: [[$class: 'FailedThreshold', unstableThreshold: '1']],
tools: [[$class: 'GoogleTestType', pattern: 'build-gcc/Testing/*.xml']]
])
}
}
}
stage('clang') {
steps {
sh 'cmake --build build-clang --target test'
}
post {
always {
step([
$class: 'XUnitPublisher',
thresholds: [[$class: 'FailedThreshold', unstableThreshold: '1']],
tools: [[$class: 'GoogleTestType', pattern: 'build-clang/Testing/*.xml']]
])
}
}
}
}
}
}
post {
failure {
mail to: '[email protected]', subject: "FAILURE: ${currentBuild.fullDisplayName}", body: "Failure: ${env.BUILD_URL}"
}
}
}