Some checks failed
weaselab/conflict-set/pipeline/head There was a failure building this commit
Now we can right benchmarks against one api, and just change the library path
85 lines
3.4 KiB
Groovy
85 lines
3.4 KiB
Groovy
def CleanBuildAndTest(String cmakeArgs) {
|
|
sh """
|
|
export CCACHE_DIR=/ccache
|
|
rm -rf build
|
|
mkdir build
|
|
cd build
|
|
cmake .. -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${cmakeArgs}
|
|
ninja
|
|
ccache -s
|
|
"""
|
|
catchError {
|
|
sh '''
|
|
cd build
|
|
ctest --no-compress-output --test-output-size-passed 100000 --test-output-size-failed 100000 -T Test -j `nproc` --timeout 90
|
|
zstd Testing/*/Test.xml
|
|
LD_LIBRARY_PATH=skip_list ./conflict_set_bench
|
|
LD_LIBRARY_PATH=radix_tree ./conflict_set_bench
|
|
'''
|
|
}
|
|
xunit tools: [CTest(pattern: 'build/Testing/*/Test.xml')], reduceLog: false, skipPublishingChecks: false
|
|
minio bucket: 'jenkins', credentialsId: 'jenkins-minio', excludes: '', host: 'minio.weaselab.dev', includes: 'build/Testing/*/Test.xml.zst', targetFolder: '${JOB_NAME}/${BUILD_NUMBER}/${STAGE_NAME}/'
|
|
}
|
|
|
|
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Pre-commit') {
|
|
agent {
|
|
dockerfile {
|
|
args '-v /home/jenkins/ccache:/ccache'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
script {
|
|
env.HOME = env.WORKSPACE
|
|
}
|
|
sh 'pre-commit run --all-files --show-diff-on-failure'
|
|
}
|
|
}
|
|
stage('Release [gcc]') {
|
|
agent {
|
|
dockerfile {
|
|
args '-v /home/jenkins/ccache:/ccache'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
CleanBuildAndTest("-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release")
|
|
recordIssues(tools: [gcc()])
|
|
sh '''
|
|
cd build
|
|
cpack -G DEB
|
|
'''
|
|
minio bucket: 'jenkins', credentialsId: 'jenkins-minio', excludes: '', host: 'minio.weaselab.dev', includes: 'build/*.deb', targetFolder: '${JOB_NAME}/${BUILD_NUMBER}/${STAGE_NAME}/'
|
|
sh '''
|
|
cd paper
|
|
make
|
|
'''
|
|
minio bucket: 'jenkins', credentialsId: 'jenkins-minio', excludes: '', host: 'minio.weaselab.dev', includes: 'paper/*.pdf', targetFolder: '${JOB_NAME}/${BUILD_NUMBER}/${STAGE_NAME}/'
|
|
}
|
|
}
|
|
stage('Coverage') {
|
|
agent {
|
|
dockerfile {
|
|
args '-v /home/jenkins/ccache:/ccache'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
CleanBuildAndTest("-DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_BUILD_TYPE=Debug")
|
|
sh '''
|
|
gcovr --gcov-executable "llvm-cov-15 gcov" --exclude '.*third_party.*' --cobertura > build/coverage.xml
|
|
'''
|
|
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'build/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
emailext mimeType: 'text/html', body: '${SCRIPT, template="groovy-html.template"}', subject: "${env.JOB_NAME} - Build# ${env.BUILD_NUMBER} - ${currentBuild.currentResult}", to: 'andrew@weaselab.dev'
|
|
}
|
|
}
|
|
}
|