Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-24.04, cc: gcc, cxx: g++}
- {os: ubuntu-24.04, cc: clang, cxx: clang++}
- {os: macos-14, cc: gcc-14, cxx: g++-14}
- {os: macos-14, cc: clang, cxx: clang++}
os: [ubuntu-24.04, macos-15]
cxx: [g++, clang++]

runs-on: ${{ matrix.os }}

Expand All @@ -39,9 +36,17 @@ jobs:
- uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
restore-keys:
ccache-${{ matrix.os }}-${{ matrix.cc }}-
key: ccache-${{ matrix.os }}-${{ matrix.cxx }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
ccache-${{ matrix.os }}-${{ matrix.cxx }}-

- name: Set cxx variables
run: |
if [[ ${{ matrix.os }} == 'macos-15' && ${{ matrix.cxx }} == 'g++' ]]; then
echo "CXX=g++-15" >> $GITHUB_ENV
else
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
fi

- name: Install ubuntu dependencies
if: ${{ contains(matrix.os, 'ubuntu') }}
Expand All @@ -50,9 +55,12 @@ jobs:
sudo apt-get install lsb-release wget software-properties-common &&
sudo apt-get install
ccache
clang-15
g++-12
gfortran-12
cmake
ninja-build
clang
clang-tools
g++
gfortran
hdf5-tools
libboost-dev
libclang-dev
Expand Down Expand Up @@ -81,7 +89,7 @@ jobs:

- name: Set up virtualenv
run: |
mkdir $HOME/.venv
mkdir -p $HOME/.venv
python3 -m venv --system-site-packages $HOME/.venv/my_python
source $HOME/.venv/my_python/bin/activate
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
Expand All @@ -96,34 +104,27 @@ jobs:
pip install -r requirements.txt
echo "PATH=$(brew --prefix llvm)/bin:$(brew --prefix gcc)/bin:$PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$(brew --prefix llvm)/lib/python3.13/site-packages" >> $GITHUB_ENV
echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix llvm)/lib/c++ -L/opt/homebrew/opt/llvm/lib/unwind -lunwind" >> $GITHUB_ENV

- name: Add clang CXXFLAGS
if: ${{ contains(matrix.cxx, 'clang') }}
if: ${{ matrix.cxx == 'clang++' }}
run: |
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV

- name: Build & Install TRIQS
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
TRIQS_BRANCH: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
run: |
git clone https://github.com/TRIQS/triqs --branch $TRIQS_BRANCH
mkdir triqs/build && cd triqs/build
cmake .. -DBuild_Tests=OFF -DCMAKE_INSTALL_PREFIX=$HOME/install
make -j1 install VERBOSE=1
cd ../
git clone https://github.com/TRIQS/triqs --branch "$TRIQS_BRANCH"
cmake -S triqs -B triqs/build -G Ninja -DBuild_Tests=OFF -DCMAKE_INSTALL_PREFIX=$HOME/install
cmake --build triqs/build --target install --verbose

- name: Build dft_tools
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
FC: gfortran-12
LIBRARY_PATH: /usr/local/opt/llvm/lib
run: |
source $HOME/install/share/triqs/triqsvars.sh
mkdir build && cd build && cmake ..
make -j2 || make -j1 VERBOSE=1
cmake -S . -B build -G Ninja
cmake --build build --verbose

- name: Print logs
if: ${{ failure() }}
Expand All @@ -146,4 +147,4 @@ jobs:
if: always()
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
key: ccache-${{ matrix.os }}-${{ matrix.cxx }}-${{ github.run_id }}-${{ github.run_attempt }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ doc/cpp2rst_generated
__pycache__/
*.py[cod]
*$py.class

.claude
9 changes: 5 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ for (int i = 0; i < dockerPlatforms.size(); i++) {
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
( echo "FROM flatironjenkins/triqs:${triqsBranch}-${env.STAGE_NAME}" ; sed '0,/^FROM /d' Dockerfile ) > Dockerfile.${env.STAGE_NAME}
cp -f Dockerfile.${env.STAGE_NAME} Dockerfile
"""
archiveArtifacts(artifacts: "Dockerfile.${env.STAGE_NAME}")
/* build and tag */
def args = ''
if (platform == documentationPlatform)
args = '-DBuild_Documentation=1'
else if (platform == "sanitize")
args = '-DASAN=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo'
def img = docker.build("flatironinstitute/${dockerName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_ID=${env.BUILD_TAG} --build-arg CMAKE_ARGS='${args}' .")
def img = docker.build("flatironjenkins/${dockerName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_ID=${env.BUILD_TAG} --build-arg CMAKE_ARGS='${args}' .")
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
img.inside("--shm-size=4gb") {
sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1"
Expand Down Expand Up @@ -124,7 +125,7 @@ try {
def subdir = "${projectName}/${env.BRANCH_NAME}"
git(url: "ssh://[email protected]/TRIQS/TRIQS.github.io.git", branch: "master", credentialsId: "ssh", changelog: false)
sh "rm -rf ${subdir}"
docker.image("flatironinstitute/${dockerName}:${env.BRANCH_NAME}-${documentationPlatform}").inside() {
docker.image("flatironjenkins/${dockerName}:${env.BRANCH_NAME}-${documentationPlatform}").inside() {
sh """#!/bin/bash -ex
base=\$INSTALL/share/doc
dir="${projectName}"
Expand Down
5 changes: 5 additions & 0 deletions doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ plot_html_show_formats = False

intersphinx_mapping = {'python': ('https://docs.python.org/3.11', None), 'triqslibs': ('https://triqs.github.io/triqs/latest', None)}

# numpydoc options
numpydoc_show_class_members = False
numpydoc_show_inherited_class_members = False
numpydoc_class_members_toctree = False

# open links in new tab instead of same window
from sphinx.writers.html import HTMLTranslator
from docutils import nodes
Expand Down