mirror of
https://github.com/triqs/dft_tools
synced 2025-01-03 10:05:49 +01:00
Merge remote-tracking branch 'app4triqs-remote/unstable' into py3
This commit is contained in:
commit
e9d06414af
@ -93,10 +93,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||||||
|
|
||||||
# Global compiler options
|
# Global compiler options
|
||||||
option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF)
|
option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF)
|
||||||
add_compile_options(
|
add_compile_options($<$<CONFIG:Debug>:-ggdb3>)
|
||||||
$<$<CONFIG:Debug>:-Og>
|
|
||||||
$<$<CONFIG:Debug>:-ggdb3>
|
|
||||||
)
|
|
||||||
|
|
||||||
# Create an Interface target for compiler warnings
|
# Create an Interface target for compiler warnings
|
||||||
add_library(${PROJECT_NAME}_warnings INTERFACE)
|
add_library(${PROJECT_NAME}_warnings INTERFACE)
|
||||||
|
@ -10,6 +10,7 @@ WORKDIR $BUILD/$APPNAME
|
|||||||
RUN chown build .
|
RUN chown build .
|
||||||
USER build
|
USER build
|
||||||
ARG BUILD_DOC=0
|
ARG BUILD_DOC=0
|
||||||
RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Documentation=${BUILD_DOC} && make -j2 || make -j1 VERBOSE=1
|
ARG BUILD_ID
|
||||||
|
RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Documentation=${BUILD_DOC} -DBuild_Deps=Always && make -j2 || make -j1 VERBOSE=1
|
||||||
USER root
|
USER root
|
||||||
RUN make install
|
RUN make install
|
||||||
|
22
Jenkinsfile
vendored
22
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,22 +64,30 @@ 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}"
|
||||||
|
def venv = triqsDir
|
||||||
dir(installDir) {
|
dir(installDir) {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
|
|
||||||
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=$venv/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=$venv/include:$hdf5/include:${env.BREW}/include",
|
||||||
|
"LIBRARY_PATH=$venv/lib:$hdf5/lib:${env.BREW}/lib",
|
||||||
|
"LD_LIBRARY_PATH=$hdf5/lib",
|
||||||
|
"PYTHONPATH=$installDir/lib/python3.7/site-packages",
|
||||||
|
"CMAKE_PREFIX_PATH=$venv/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"
|
||||||
|
@ -14,7 +14,8 @@ macro(generate_docs header_file)
|
|||||||
COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/cpp2rst_generated
|
COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/cpp2rst_generated
|
||||||
COMMAND
|
COMMAND
|
||||||
PYTHONPATH=${CPP2PY_BINARY_DIR}:$ENV{PYTHONPATH}
|
PYTHONPATH=${CPP2PY_BINARY_DIR}:$ENV{PYTHONPATH}
|
||||||
${CPP2PY_BINARY_DIR}/bin/c++2rst
|
PATH=${CPP2PY_BINARY_DIR}/bin:${CPP2PY_ROOT}/bin:$ENV{PATH}
|
||||||
|
c++2rst
|
||||||
${header_file}
|
${header_file}
|
||||||
-N ${PROJECT_NAME}
|
-N ${PROJECT_NAME}
|
||||||
--output_directory ${CMAKE_CURRENT_SOURCE_DIR}/cpp2rst_generated
|
--output_directory ${CMAKE_CURRENT_SOURCE_DIR}/cpp2rst_generated
|
||||||
|
Loading…
Reference in New Issue
Block a user