Jenkins: run benchmarks (#1524)
* Jenkins: run benchmarks * don't exit the workspace * try calling the benchmark plugin from the config file * pass all params * separate Jenkins job for benchmarks
This commit is contained in:
parent
83667dddfe
commit
142f791ecf
|
@ -98,5 +98,6 @@ parallel(
|
||||||
runStages()
|
runStages()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
// https://stackoverflow.com/questions/40760716/jenkins-abort-running-build-if-new-one-is-started
|
||||||
|
def buildNumber = env.BUILD_NUMBER as int
|
||||||
|
if (buildNumber > 1) {
|
||||||
|
milestone(buildNumber - 1)
|
||||||
|
}
|
||||||
|
milestone(buildNumber)
|
||||||
|
|
||||||
|
node("metal") {
|
||||||
|
withEnv(["NPROC=${sh(returnStdout: true, script: 'nproc').trim()}"]) {
|
||||||
|
try {
|
||||||
|
stage("Clone") {
|
||||||
|
/* source code checkout */
|
||||||
|
checkout scm
|
||||||
|
/* we need to update the submodules before caching kicks in */
|
||||||
|
sh "git submodule update --init --recursive"
|
||||||
|
}
|
||||||
|
|
||||||
|
cache(maxCacheSize: 250, caches: [
|
||||||
|
[$class: "ArbitraryFileCache", excludes: "", includes: "**/*", path: "${WORKSPACE}/vendor/nimbus-build-system/vendor/Nim/bin"],
|
||||||
|
]) {
|
||||||
|
stage("Build") {
|
||||||
|
sh """#!/bin/bash
|
||||||
|
set -e
|
||||||
|
make -j${env.NPROC} update # to allow a newer Nim version to be detected
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("Benchmark") {
|
||||||
|
sh """#!/bin/bash
|
||||||
|
set -e
|
||||||
|
git clone https://github.com/status-im/nimbus-benchmarking.git
|
||||||
|
./nimbus-benchmarking/run_nbc_benchmarks.sh
|
||||||
|
"""
|
||||||
|
benchmark(altInputSchema: "", altInputSchemaLocation: "", inputLocation: "results/*/result.json", schemaSelection: "defaultSchema", truncateStrings: true)
|
||||||
|
}
|
||||||
|
} catch(e) {
|
||||||
|
// we need to rethrow the exception here
|
||||||
|
throw e
|
||||||
|
} finally {
|
||||||
|
// clean the workspace
|
||||||
|
cleanWs(disableDeferredWipeout: true, deleteDirs: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue