Skip to content

Commit

Permalink
merged master into aux-indices
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Nov 18, 2024
2 parents 4f3cd68 + a9206a5 commit 6af00a6
Show file tree
Hide file tree
Showing 88 changed files with 4,709 additions and 3,123 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Linux/MacOS Build

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master'}} # don't cancel jobs on master

#env:

jobs:
Expand Down Expand Up @@ -38,7 +42,7 @@ jobs:
-DCMAKE_CXX_EXTENSIONS=OFF
-DSEQUANT_BUILD_BENCHMARKS=ON
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand All @@ -61,7 +65,7 @@ jobs:
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Setup ccache cache files
uses: actions/cache@v1.1.0
uses: actions/cache@v4
with:
path: ${{github.workspace}}/build/.ccache
key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docs

on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: "Build and Deploy"
runs-on: ubuntu-24.04
env:
CXX: g++
BUILD_CONFIG: >
-G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH='/usr/include/boost'
-DBUILD_TESTING=OFF
-DSEQUANT_BUILD_DOCS=ON
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9' # Breathe needs 3.9 or later
cache: 'pip'

- name: Setup Environment
run: |
cmake -E make_directory ${{github.workspace}}/build
sudo apt-get update
sudo apt-get install -y ninja-build libboost-all-dev doxygen
pip install -r doc/sphinx/requirements.txt
- name: Build Docs
working-directory: ${{github.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_CONFIG
cmake --build . --target sphinx-sequant
- name: Deploy to gh-pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{github.workspace}}/build/doc/sphinx/html
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ add_feature_info(EVAL_TRACE SEQUANT_EVAL_TRACE "Trace expression interpretation"
option(SEQUANT_USE_SYSTEM_BOOST_HASH "Use system Boost for hashing? Set to OFF to make hashing independent of Boost, thus value-portable" ON)
add_feature_info(SEQUANT_USE_SYSTEM_BOOST_HASH SEQUANT_USE_SYSTEM_BOOST_HASH "SeQuant uses system Boost for hashing (thus results depend on the Boost version)")

option(SEQUANT_BUILD_DOCS "Build SeQuant documentation using Doxygen and Sphinx" OFF)
add_feature_info(BUILD_DOCS SEQUANT_BUILD_DOCS "Build SeQuant documentation. Doxygen and Sphinx are required.")

##########################
# Prerequisites
##########################
Expand Down Expand Up @@ -253,6 +256,7 @@ set(SeQuant_src
SeQuant/core/wick_graph.hpp
SeQuant/core/wolfram.hpp
SeQuant/core/wstring.hpp
SeQuant/domain/mbpt/antisymmetrizer.cpp
SeQuant/domain/mbpt/antisymmetrizer.hpp
SeQuant/domain/mbpt/context.hpp
SeQuant/domain/mbpt/context.cpp
Expand All @@ -263,6 +267,7 @@ set(SeQuant_src
SeQuant/domain/mbpt/op.cpp
SeQuant/domain/mbpt/op.hpp
SeQuant/domain/mbpt/op.ipp
SeQuant/domain/mbpt/rdm.cpp
SeQuant/domain/mbpt/rdm.hpp
SeQuant/domain/mbpt/spin.cpp
SeQuant/domain/mbpt/spin.hpp
Expand Down Expand Up @@ -314,6 +319,7 @@ if (Boost_IS_MODULARIZED)
target_link_libraries(SeQuant PUBLIC
Boost::container
Boost::container_hash
Boost::hana
Boost::multiprecision
Boost::numeric_conversion
Boost::numeric_interval
Expand Down Expand Up @@ -434,6 +440,7 @@ if (BUILD_TESTING)
tests/unit/test_latex.cpp
tests/unit/test_utilities.cpp
tests/unit/test_export.cpp
tests/unit/test_meta.cpp
)

if (TARGET tiledarray)
Expand Down Expand Up @@ -555,7 +562,7 @@ if (BUILD_TESTING)
target_link_libraries(${example${i}} SeQuant)
endforeach ()

set(example12 "tensor_network_graphs")
set(example12 "tensor_network_graphs")
add_executable(${example12} EXCLUDE_FROM_ALL
examples/${example12}/${example12}.cpp)
target_link_libraries(${example12} SeQuant)
Expand Down Expand Up @@ -599,8 +606,9 @@ if (SEQUANT_PYTHON)
endif ()

####### DOCS ########

add_subdirectory(doc)
if (SEQUANT_BUILD_DOCS)
add_subdirectory(doc)
endif ()


##########################
Expand Down
14 changes: 7 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
SeQuant: installation guide
===========================
# Installation Guide

## TL;DR

### TL;DR
While in the SeQuant source directory:
* `cmake -B build -S .`
* `cmake --build build --target check-sequant`

## Prerequisites
### Prerequisites
* mandatory:
* CMake 3.15 or later
* a C++17 compiler
Expand All @@ -20,12 +20,12 @@ While in the SeQuant source directory:
* for building `stcc*` example programs
* [Eigen](http://eigen.tuxfamily.org/), version 3

## Configure
### Configure

From the SeQuant source directory run the following command to configure the build harness:
* `cmake -B build -S .`

### Useful CMake variables
#### Useful CMake variables
* [`BUILD_TESTING`](https://cmake.org/cmake/help/latest/module/CTest.html) --- enables unit tests targets, e.g. `check-sequant` [default=ON]
* [`CMAKE_CXX_COMPILER`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html#variable:CMAKE_%3CLANG%3E_COMPILER) --- specifies the C++ compiler to use
* [`CMAKE_PREFIX_PATH`](https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html) --- this semicolon-separated list specifies search paths for dependencies (Boost, Range-V3, etc.)
Expand All @@ -35,7 +35,7 @@ From the SeQuant source directory run the following command to configure the bui
* `SEQUANT_PYTHON` --- enables building of Pythin bindings
* `Boost_FETCH_IF_MISSING` --- if set to `ON`, SeQuant will download and build Boost if it is not found by `find_package(Boost ...)`; this is not recommended. [default=OFF]

## Build
### Build

To build, test, and install SeQuant, run the following commands:
* `cmake --build build`
Expand Down
Loading

0 comments on commit 6af00a6

Please sign in to comment.