mirror of
https://github.com/triqs/dft_tools
synced 2024-11-18 12:03:50 +01:00
[jenkins] bring into closer alignment with triqs
This commit is contained in:
parent
74aefcb1dc
commit
c2a4685719
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
@ -38,7 +38,7 @@ for (int i = 0; i < dockerPlatforms.size(); i++) {
|
||||
mv -f Dockerfile.jenkins Dockerfile
|
||||
"""
|
||||
/* build and tag */
|
||||
def img = docker.build("flatironinstitute/${dockerName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_DOC=${platform==documentationPlatform} .")
|
||||
def img = docker.build("flatironinstitute/${dockerName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_DOC=${platform==documentationPlatform} --build-arg BUILD_ID=${env.BUILD_TAG} .")
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||
img.inside() {
|
||||
sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1"
|
||||
@ -64,6 +64,7 @@ for (int i = 0; i < osxPlatforms.size(); i++) {
|
||||
def srcDir = pwd()
|
||||
def tmpDir = pwd(tmp:true)
|
||||
def buildDir = "$tmpDir/build"
|
||||
/* install real branches in a fixed predictable place so apps can find them */
|
||||
def installDir = keepInstall ? "${env.HOME}/install/${projectName}/${env.BRANCH_NAME}/${platform}" : "$tmpDir/install"
|
||||
def triqsDir = "${env.HOME}/install/triqs/${triqsBranch}/${platform}"
|
||||
dir(installDir) {
|
||||
@ -71,15 +72,21 @@ for (int i = 0; i < osxPlatforms.size(); i++) {
|
||||
}
|
||||
|
||||
checkout scm
|
||||
|
||||
def hdf5 = "${env.BREW}/opt/hdf5@1.10"
|
||||
dir(buildDir) { withEnv(platformEnv[1].collect { it.replace('\$BREW', env.BREW) } + [
|
||||
"PATH=$triqsDir/bin:${env.BREW}/bin:/usr/bin:/bin:/usr/sbin",
|
||||
"CPLUS_INCLUDE_PATH=$triqsDir/include:${env.BREW}/include",
|
||||
"LIBRARY_PATH=$triqsDir/lib:${env.BREW}/lib",
|
||||
"CMAKE_PREFIX_PATH=$triqsDir/lib/cmake/triqs"]) {
|
||||
"PATH=$triqsDir/bin:${env.BREW}/bin:/usr/bin:/bin:/usr/sbin",
|
||||
"HDF5_ROOT=$hdf5",
|
||||
"C_INCLUDE_PATH=$hdf5/include:${env.BREW}/include",
|
||||
"CPLUS_INCLUDE_PATH=$triqsDir/include:$hdf5/include:${env.BREW}/include",
|
||||
"LIBRARY_PATH=$triqsDir/lib:$hdf5/lib:${env.BREW}/lib",
|
||||
"LD_LIBRARY_PATH=$hdf5/lib",
|
||||
"PYTHONPATH=$installDir/lib/python3.7/site-packages",
|
||||
"CMAKE_PREFIX_PATH=$triqsDir/lib/cmake/triqs"]) {
|
||||
deleteDir()
|
||||
/* note: this is installing into the parent (triqs) venv (install dir), which is thus shared among apps and so not be completely safe */
|
||||
sh "pip3 install -r $srcDir/requirements.txt"
|
||||
sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir"
|
||||
sh "pip3 install -U -r $srcDir/requirements.txt"
|
||||
sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir -DBuild_Deps=Always"
|
||||
sh "make -j2"
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { try {
|
||||
sh "make test CTEST_OUTPUT_ON_FAILURE=1"
|
||||
|
Loading…
Reference in New Issue
Block a user