-
Notifications
You must be signed in to change notification settings - Fork 298
/
Jenkinsfile.cmake.ubuntu.gcc.test
144 lines (143 loc) · 4.64 KB
/
Jenkinsfile.cmake.ubuntu.gcc.test
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
def common
pipeline {
agent none
options {
buildDiscarder(logRotator(numToKeepStr: "15", artifactNumToKeepStr: "5"))
}
stages {
stage('Environment') {
agent {
label '!windows'
}
steps {
script {
if (changeRequest()) {
def buildNumber = env.BUILD_NUMBER as int
if (buildNumber > 1) milestone(buildNumber - 1)
milestone(buildNumber)
}
common = load("${env.workspace}/.CI/common.groovy")
}
}
}
stage('build') {
parallel {
stage('autoconf-jammy-gcc') {
agent {
docker {
image 'docker.openmodelica.org/build-deps:v1.22.2'
label 'linux'
alwaysPull true
args "--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
"-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
}
}
steps {
script { common.buildOMC('gcc', 'g++', '', true, false) }
stash name: 'omc-gcc', includes: 'build/bin/OMCppOSUSimulation, build/include/omc/omsi/**, build/include/omc/omsic/**, build/lib/x86_64-linux-gnu/omc/omsi/**, build/lib/x86_64-linux-gnu/omc/omsicpp/**, **/config.status'
}
}
stage('cmake-jammy-gcc') {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
"-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
}
}
steps {
script {
common.buildOMC_CMake("-DCMAKE_BUILD_TYPE=Release"
+ " -DOM_USE_CCACHE=OFF"
+ " -DCMAKE_INSTALL_PREFIX=build"
+ " -DSUNDIALS_BUILD_SHARED_LIBS=ON")
sh "build/bin/omc --version"
}
stash name: 'omc-cmake-gcc', includes: 'build/**'
}
}
}
}
stage('tests') {
parallel {
stage('testsuite-cmake-gcc 1/3') {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=runtest-gcc-cache,target=/cache/runtest " +
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
"-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
}
}
environment {
RUNTESTDB = "/cache/runtest/"
LIBRARIES = "/cache/omlibrary"
}
steps {
script {
common.standardSetup()
unstash 'omc-gcc'
unstash 'omc-cmake-gcc'
common.makeLibsAndCache()
common.partest(1, 3)
}
}
}
stage('testsuite-cmake-gcc 2/3') {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=runtest-gcc-cache,target=/cache/runtest " +
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
"-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
}
}
environment {
RUNTESTDB = "/cache/runtest/"
LIBRARIES = "/cache/omlibrary"
}
steps {
script {
common.standardSetup()
unstash 'omc-gcc'
unstash 'omc-cmake-gcc'
common.makeLibsAndCache()
common.partest(2, 3)
}
}
}
stage('testsuite-cmake-gcc 3/3') {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=runtest-gcc-cache,target=/cache/runtest " +
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
"-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
}
}
environment {
RUNTESTDB = "/cache/runtest/"
LIBRARIES = "/cache/omlibrary"
}
steps {
script {
common.standardSetup()
unstash 'omc-gcc'
unstash 'omc-cmake-gcc'
common.makeLibsAndCache()
common.partest(3, 3)
}
}
}
}
}
}
}