2019-11-11 21:43:40 +00:00
|
|
|
def runStages() {
|
|
|
|
stage("Clone") {
|
|
|
|
/* The Git repo seems to be cached in some Jenkins plugin, so this is not always a clean clone. */
|
2019-11-11 21:16:17 +00:00
|
|
|
checkout scm
|
2019-11-11 21:43:40 +00:00
|
|
|
sh "make build-system-checks || true"
|
2019-11-11 21:16:17 +00:00
|
|
|
}
|
2019-11-11 21:43:40 +00:00
|
|
|
stage("Build") {
|
|
|
|
sh "make -j${env.NPROC} update" /* to allow a newer Nim version to be detected */
|
|
|
|
sh "make -j${env.NPROC} V=1 deps" /* to allow the following parallel stages */
|
|
|
|
}
|
|
|
|
stage("Test") {
|
|
|
|
parallel(
|
|
|
|
"tools": {
|
|
|
|
stage("Tools") {
|
|
|
|
sh "make -j${env.NPROC}"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"test suite": {
|
|
|
|
stage("Test suite") {
|
|
|
|
sh "make -j${env.NPROC} test"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
2019-11-11 21:16:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-11 21:43:40 +00:00
|
|
|
parallel(
|
|
|
|
"Linux": {
|
|
|
|
node("linux") {
|
|
|
|
withEnv(["NPROC=${sh(returnStdout: true, script: 'nproc').trim()}"]) {
|
|
|
|
runStages()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"macOS": {
|
|
|
|
node("macos") {
|
|
|
|
withEnv(["NPROC=${sh(returnStdout: true, script: 'sysctl -n hw.logicalcpu').trim()}"]) {
|
|
|
|
runStages()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|