3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-29 00:15:00 +02:00

Merge branch 'unstable'

This commit is contained in:
Nils Wentzell 2018-09-17 15:01:06 -04:00
commit e95982c906
5 changed files with 21 additions and 21 deletions

View File

@ -25,7 +25,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR (NOT IS_ABSOLUTE ${CMAKE_INSTA
endif()
message(STATUS "-------- INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------")
# Use git to detect App4Triqs version and git hash
# Use git to detect app4triqs version and git hash
execute_process(COMMAND bash "-c" "${TRIQS_GIT_EXECUTABLE} describe | sed \"s/-\\([0-9]*\\)-.*/.\\1/g\""
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE APP4TRIQS_VERSION

32
Jenkinsfile vendored
View File

@ -30,13 +30,13 @@ for (int i = 0; i < dockerPlatforms.size(); i++) {
def platform = dockerPlatforms[i]
platforms[platform] = { -> node('docker') {
stage(platform) { timeout(time: 1, unit: 'HOURS') {
checkout scm
/* construct a Dockerfile for this base */
sh """
( echo "FROM flatironinstitute/triqs:${triqsBranch}-${env.STAGE_NAME}" ; sed '0,/^FROM /d' Dockerfile ) > Dockerfile.jenkins
mv -f Dockerfile.jenkins Dockerfile
"""
/* build and tag */
checkout scm
/* construct a Dockerfile for this base */
sh """
( echo "FROM flatironinstitute/triqs:${triqsBranch}-${env.STAGE_NAME}" ; sed '0,/^FROM /d' Dockerfile ) > Dockerfile.jenkins
mv -f Dockerfile.jenkins Dockerfile
"""
/* build and tag */
def img = docker.build("flatironinstitute/${projectName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_DOC=${platform==documentationPlatform} .")
if (!publish || platform != documentationPlatform) {
/* but we don't need the tag so clean it up (except for documentation) */
@ -72,8 +72,8 @@ for (int i = 0; i < osxPlatforms.size(); i++) {
"LIBRARY_PATH=$triqsDir/lib:${env.BREW}/lib",
"CMAKE_PREFIX_PATH=$triqsDir/share/cmake"]) {
deleteDir()
sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir"
sh "make -j3"
sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir"
sh "make -j3"
try {
sh "make test"
} catch (exc) {
@ -96,30 +96,30 @@ try {
def workDir = pwd()
/* Update documention on gh-pages branch */
dir("$workDir/gh-pages") {
def subdir = env.BRANCH_NAME
git(url: "ssh://git@github.com/TRIQS/${projectName}.git", branch: "gh-pages", credentialsId: "ssh", changelog: false)
def subdir = "${projectName}/${env.BRANCH_NAME}"
git(url: "ssh://git@github.com/TRIQS/TRIQS.github.io.git", branch: "master", credentialsId: "ssh", changelog: false)
sh "rm -rf ${subdir}"
docker.image("flatironinstitute/${projectName}:${env.BRANCH_NAME}-${documentationPlatform}").inside() {
sh "cp -rp \$INSTALL/share/doc/${projectName} ${subdir}"
}
sh "git add -A ${subdir}"
sh """
git commit --author='Flatiron Jenkins <jenkins@flatironinstitute.org>' --allow-empty -m 'Generated documentation for ${env.BRANCH_NAME}' -m '${env.BUILD_TAG} ${commit}'
git commit --author='Flatiron Jenkins <jenkins@flatironinstitute.org>' --allow-empty -m 'Generated documentation for ${subdir}' -m '${env.BUILD_TAG} ${commit}'
"""
// note: credentials used above don't work (need JENKINS-28335)
sh "git push origin gh-pages"
sh "git push origin master"
}
/* Update docker repo submodule */
dir("$workDir/docker") { try {
git(url: "ssh://git@github.com/TRIQS/docker.git", branch: env.BRANCH_NAME, credentialsId: "ssh", changelog: false)
sh "echo '160000 commit ${commit}\t${projectName}' | git update-index --index-info"
sh """
git commit --author='Flatiron Jenkins <jenkins@flatironinstitute.org>' -m 'Autoupdate ${projectName}' -m '${env.BUILD_TAG}'
git commit --author='Flatiron Jenkins <jenkins@flatironinstitute.org>' --allow-empty -m 'Autoupdate ${projectName}' -m '${env.BUILD_TAG}'
"""
// note: credentials used above don't work (need JENKINS-28335)
sh "git push origin ${env.BRANCH_NAME}"
} catch (err) {
/* Ignore, non-critical -- might not exist on this branch */
/* Ignore, non-critical -- might not exist on this branch */
echo "Failed to update docker repo"
} }
} }
@ -137,7 +137,7 @@ Check console output at \$BUILD_URL to view full results.
Building \$BRANCH_NAME for \$CAUSE
\$JOB_DESCRIPTION
Chages:
Changes:
\$CHANGES
End of build log:

View File

@ -12,9 +12,9 @@ To use this skeleton for a new triqs application, the following steps are necess
```bash
git clone https://github.com/triqs/app4triqs --branch unstable mynewapp
cd mynewapp
git remote set-url https://github.com/myuser/mynewapp
git remote set-url origin https://github.com/myuser/mynewapp
find . -type f | grep -v .git | xargs sed -i 's/app4triqs/mynewapp/g; s/APP4TRIQS/MYNEWAPP/g'
find . | grep -v .git | xargs rename app4triqs mytriqsapp
find . | grep -v .git | xargs rename 's/app4triqs/mytriqsapp/'
git add -A
git commit -m "Create mynewapp from github.com/triqs/app4triqs skeleton"
git push

View File

@ -16,7 +16,7 @@ target_compile_definitions(app4triqs_c PRIVATE
# Install library and headers
install(TARGETS app4triqs_c EXPORT app4triqs-targets DESTINATION lib)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include/app4triqs FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
# ========= Static Analyzer Checks ==========

View File

@ -8,7 +8,7 @@ file(GLOB_RECURSE sources *.rst)
set(sphinx_top ${CMAKE_CURRENT_BINARY_DIR}/html/contents.html)
add_custom_command(OUTPUT ${sphinx_top} DEPENDS ${sources}
COMMAND ${TRIQS_SPHINXBUILD_EXECUTABLE} -c . -j8 -b html ${CMAKE_CURRENT_BINARY_DIR} html)
COMMAND PYTHONPATH=${CMAKE_BINARY_DIR}/python:$ENV{PYTHONPATH} ${TRIQS_SPHINXBUILD_EXECUTABLE} -c . -j8 -b html ${CMAKE_CURRENT_BINARY_DIR} html)
add_custom_target(docs_sphinx ALL DEPENDS ${sphinx_top} ${CMAKE_CURRENT_BINARY_DIR})
# Application must be compiled first