-
Notifications
You must be signed in to change notification settings - Fork 12
/
.jenkins
83 lines (82 loc) · 3.2 KB
/
.jenkins
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
pipeline {
triggers {
issueCommentTrigger('.*test this please.*')
}
agent none
environment {
CCACHE_DIR = '/tmp/ccache'
CCACHE_MAXSIZE = '10G'
FORTRILINOS_DIR = '/opt/fortrilinos'
CTEST_OPTIONS = '--timeout 180 --no-compress-output -T Test --test-output-size-passed=65536 --test-output-size-failed=1048576'
// Run MPI as root
OMPI_ALLOW_RUN_AS_ROOT = '1'
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM = '1'
}
stages {
stage('Build') {
parallel {
stage('GCC-7.5-MPI') {
agent {
dockerfile {
filename "Dockerfile"
dir "docker"
args '-v /tmp/ccache:/tmp/ccache'
additionalBuildArgs '--build-arg NPROC=4'
label 'docker'
}
}
steps {
sh 'ccache --zero-stats'
sh 'rm -rf build && mkdir -p build'
dir('build') {
sh '''
cmake \
-GNinja \
-D CMAKE_INSTALL_PREFIX=$FORTRILINOS_DIR \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D MPIEXEC_MAX_NUMPROCS=4 \
-D ForTrilinos_TESTING=ON \
-D ForTrilinos_EXAMPLES=ON \
..
'''
sh 'ninja -v'
sh 'ctest $CTEST_OPTIONS'
}
}
post {
always {
sh 'ccache --show-stats'
xunit reduceLog: false, tools:[CTest(deleteOutputFiles: true, failIfNotNew: true, pattern: 'build/Testing/**/Test.xml', skipNoTestFiles: false, stopProcessingIfError: true)]
}
success {
sh 'cd build && ninja install'
sh 'rm -rf test_install && mkdir -p test_install'
dir('test_install') {
sh 'cp -r ../example/test-installation .'
sh '''
cmake \
-D CMAKE_PREFIX_PATH=$FORTRILINOS_DIR \
test-installation
'''
sh 'make VERBOSE=1'
sh 'make test'
}
}
}
}
}
}
}
post {
always {
node('docker') {
recordIssues(
enabledForFailure: true,
tools: [gcc()],
qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]],
)
}
}
}
}