Skip to content

Commit

Permalink
[CI] Fix TRIQS compilation on macOS-12 / Clang 17
Browse files Browse the repository at this point in the history
  • Loading branch information
krivenko committed May 14, 2024
1 parent c6b74cf commit 9db63ea
Showing 1 changed file with 57 additions and 50 deletions.
107 changes: 57 additions & 50 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, cc: gcc-12, cxx: g++-12}
- {os: ubuntu-22.04, cc: clang-15, cxx: clang++-15}
- {os: macos-12, cc: gcc-12, cxx: g++-12}
- {os: macos-12, cc: /usr/local/opt/llvm@17/bin/clang,
cxx: /usr/local/opt/llvm@17/bin/clang++}
# FIXME
#- {os: ubuntu-22.04, cc: gcc-12, cxx: g++-12}
#- {os: ubuntu-22.04, cc: clang-15, cxx: clang++-15}
#- {os: macos-12, cc: gcc-12, cxx: g++-12}
- {os: macos-12, cc: /usr/local/opt/llvm@18/bin/clang,
cxx: /usr/local/opt/llvm@18/bin/clang++}

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

Expand Down Expand Up @@ -64,7 +65,7 @@ jobs:
- name: Install Homebrew dependencies
if: startsWith(matrix.os, 'macos')
run: |
brew install llvm@17 libomp eigen fftw hdf5 open-mpi
brew install llvm@18 eigen fftw hdf5 open-mpi
pip3 install mako numpy scipy mpi4py
- name: Cache Boost (a C++20 compatible version)
Expand Down Expand Up @@ -115,47 +116,53 @@ jobs:
make -j2 install VERBOSE=1
popd
- name: Build & install TRIQS
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
git clone https://github.com/TRIQS/triqs --branch 3.2.x
mkdir triqs/build && pushd triqs/build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/install \
-DBoost_INCLUDE_DIR=$HOME/boost \
-DBuild_Tests=OFF
make -j2 install VERBOSE=1
popd
- name: Build pomerol2triqs
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
source $HOME/install/share/triqs/triqsvars.sh
mkdir build && pushd build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/install \
-DBoost_INCLUDE_DIR=$HOME/boost
make -j2 install VERBOSE=1
popd
- name: Test pomerol2triqs
env:
TMPDIR: "/tmp"
run: |
if [[ "${{ matrix.os }}" == ubuntu* ]]; then
sudo sh -c 'echo -e "\nrmaps_base_oversubscribe = 1" >> \
/etc/openmpi/openmpi-mca-params.conf'
else
mkdir -p $HOME/.prte
echo -e "\nrmaps_default_mapping_policy = :oversubscribe" >> \
$HOME/.prte/mca-params.conf
fi
source $HOME/install/share/triqs/triqsvars.sh
cd build
ctest --output-on-failure
#- name: Build & install TRIQS
# env:
# CC: ${{ matrix.cc }}
# CXX: ${{ matrix.cxx }}
# run: |
# git clone https://github.com/TRIQS/triqs --branch 3.2.x
# mkdir triqs/build && pushd triqs/build
# if [[ "${{ matrix.os }}" == macos* &&
# "${{ matrix.cxx }}" == *clang++ ]]; then
# LC="-DLIBCLANG_LOCATION=/usr/local/opt/llvm@17/lib/libclang.dylib"
# export CPPFLAGS="-Xpreprocessor -fopenmp=libomp"
# fi
# cmake .. \
# -DCMAKE_BUILD_TYPE=Debug \
# -DCMAKE_INSTALL_PREFIX=$HOME/install \
# -DBoost_INCLUDE_DIR=$HOME/boost \
# ${LC} \
# -DBuild_Tests=OFF
# make -j2 install VERBOSE=1
# popd
#
#- name: Build pomerol2triqs
# env:
# CC: ${{ matrix.cc }}
# CXX: ${{ matrix.cxx }}
# run: |
# source $HOME/install/share/triqs/triqsvars.sh
# mkdir build && pushd build
# cmake .. \
# -DCMAKE_BUILD_TYPE=Debug \
# -DCMAKE_INSTALL_PREFIX=$HOME/install \
# -DBoost_INCLUDE_DIR=$HOME/boost
# make -j2 install VERBOSE=1
# popd
#
#- name: Test pomerol2triqs
# env:
# TMPDIR: "/tmp"
# run: |
# if [[ "${{ matrix.os }}" == ubuntu* ]]; then
# sudo sh -c 'echo -e "\nrmaps_base_oversubscribe = 1" >> \
# /etc/openmpi/openmpi-mca-params.conf'
# else
# mkdir -p $HOME/.prte
# echo -e "\nrmaps_default_mapping_policy = :oversubscribe" >> \
# $HOME/.prte/mca-params.conf
# fi
# source $HOME/install/share/triqs/triqsvars.sh
# cd build
# ctest --output-on-failure

0 comments on commit 9db63ea

Please sign in to comment.