From 331bbc8068ac0cc457e608d60f9928eec9577e67 Mon Sep 17 00:00:00 2001 From: Dylan Simon Date: Fri, 22 Jun 2018 11:15:27 -0400 Subject: [PATCH 1/5] [jenkins] move docs to separate gh-pages repo --- Jenkinsfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 942075ea..638e9426 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 ' --allow-empty -m 'Generated documentation for ${env.BRANCH_NAME}' -m '${env.BUILD_TAG} ${commit}' + git commit --author='Flatiron Jenkins ' --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 ' -m 'Autoupdate ${projectName}' -m '${env.BUILD_TAG}' + git commit --author='Flatiron Jenkins ' --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" } } } } From af8f3ad824e5858ee793f744ad590f0f3a91a8c8 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Thu, 30 Aug 2018 18:05:04 -0400 Subject: [PATCH 2/5] Minor fixes and adjustments --- CMakeLists.txt | 2 +- README.md | 4 ++-- c++/app4triqs/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4a2b692..521bb4ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/README.md b/README.md index 64b4af2f..16c57cc7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/c++/app4triqs/CMakeLists.txt b/c++/app4triqs/CMakeLists.txt index 2674e7a9..24344a90 100644 --- a/c++/app4triqs/CMakeLists.txt +++ b/c++/app4triqs/CMakeLists.txt @@ -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 ========== From de2792361e85f77bb5d34f1250bb31b08b5cc040 Mon Sep 17 00:00:00 2001 From: Dylan Simon Date: Mon, 17 Sep 2018 13:41:37 -0400 Subject: [PATCH 3/5] jenkins: fix typo in email alert --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 638e9426..c835cc67 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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: From afe06474ff19d57718f128b8854175801a3d592e Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Mon, 17 Sep 2018 15:00:40 -0400 Subject: [PATCH 4/5] [cmake] Fix python environment for doc generation --- doc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 40bbedc8..c131ac34 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -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 From 548993e1d0927652448552af556c16f2c1edb9bf Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 12 Sep 2018 11:29:47 -0400 Subject: [PATCH 5/5] [doc] Update website logos --- doc/_templates/sideb.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/_templates/sideb.html b/doc/_templates/sideb.html index 11622acf..5b1c7b8e 100644 --- a/doc/_templates/sideb.html +++ b/doc/_templates/sideb.html @@ -1,7 +1,14 @@ -

+

CEA Ecole Polytechnique
CNRS ERC + Flatiron Institute +
+ Simons Foundation +

+
+

+ Visit the project on GitHub