mirror of
https://github.com/triqs/dft_tools
synced 2025-01-03 10:05:49 +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
|
mv -f Dockerfile.jenkins Dockerfile
|
||||||
"""
|
"""
|
||||||
/* build and tag */
|
/* 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') {
|
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||||
img.inside() {
|
img.inside() {
|
||||||
sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1"
|
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 srcDir = pwd()
|
||||||
def tmpDir = pwd(tmp:true)
|
def tmpDir = pwd(tmp:true)
|
||||||
def buildDir = "$tmpDir/build"
|
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 installDir = keepInstall ? "${env.HOME}/install/${projectName}/${env.BRANCH_NAME}/${platform}" : "$tmpDir/install"
|
||||||
def triqsDir = "${env.HOME}/install/triqs/${triqsBranch}/${platform}"
|
def triqsDir = "${env.HOME}/install/triqs/${triqsBranch}/${platform}"
|
||||||
dir(installDir) {
|
dir(installDir) {
|
||||||
@ -71,15 +72,21 @@ for (int i = 0; i < osxPlatforms.size(); i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
|
def hdf5 = "${env.BREW}/opt/hdf5@1.10"
|
||||||
dir(buildDir) { withEnv(platformEnv[1].collect { it.replace('\$BREW', env.BREW) } + [
|
dir(buildDir) { withEnv(platformEnv[1].collect { it.replace('\$BREW', env.BREW) } + [
|
||||||
"PATH=$triqsDir/bin:${env.BREW}/bin:/usr/bin:/bin:/usr/sbin",
|
"PATH=$triqsDir/bin:${env.BREW}/bin:/usr/bin:/bin:/usr/sbin",
|
||||||
"CPLUS_INCLUDE_PATH=$triqsDir/include:${env.BREW}/include",
|
"HDF5_ROOT=$hdf5",
|
||||||
"LIBRARY_PATH=$triqsDir/lib:${env.BREW}/lib",
|
"C_INCLUDE_PATH=$hdf5/include:${env.BREW}/include",
|
||||||
"CMAKE_PREFIX_PATH=$triqsDir/lib/cmake/triqs"]) {
|
"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()
|
deleteDir()
|
||||||
/* note: this is installing into the parent (triqs) venv (install dir), which is thus shared among apps and so not be completely safe */
|
/* 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 "pip3 install -U -r $srcDir/requirements.txt"
|
||||||
sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir"
|
sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir -DBuild_Deps=Always"
|
||||||
sh "make -j2"
|
sh "make -j2"
|
||||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { try {
|
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { try {
|
||||||
sh "make test CTEST_OUTPUT_ON_FAILURE=1"
|
sh "make test CTEST_OUTPUT_ON_FAILURE=1"
|
||||||
|
Loading…
Reference in New Issue
Block a user