Skip to content

Commit

Permalink
[CI] Build and test on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
krivenko committed Dec 5, 2022
1 parent b11db6b commit 1b44a13
Showing 1 changed file with 77 additions and 61 deletions.
138 changes: 77 additions & 61 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,66 @@ jobs:
build:

strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-20.04, cc: gcc-10, cxx: g++-10}
- {os: ubuntu-20.04, cc: clang-13, cxx: clang++-13}
- {os: macos-11, cc: gcc-11, cxx: g++-11}
- {os: macos-11, cc: /usr/local/opt/llvm/bin/clang,
cxx: /usr/local/opt/llvm/bin/clang++}

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

steps:
- uses: actions/checkout@v2

- name: Update apt-get cache
run: sudo apt-get update
- uses: actions/checkout@v3

- name: Install Ubuntu dependencies
if: startsWith(matrix.os, 'ubuntu')
run: >
sudo apt-get install lsb-release wget software-properties-common &&
wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh &&
sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 13 &&
sudo apt-get install
g++-10
clang-13
libgfortran4
gfortran
libeigen3-dev
openmpi-bin
openmpi-common
openmpi-doc
libopenmpi-dev
libblas-dev
liblapack-dev
libfftw3-dev
libgmp-dev
hdf5-tools
libhdf5-dev
python3-dev
python3-numpy
python3-scipy
python3-matplotlib
ipython3
python3-mpi4py
python3-mako
libnfft3-dev
sudo apt-get update &&
sudo apt-get install lsb-release wget software-properties-common &&
wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh &&
sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 13 &&
sudo apt-get install
g++-10
clang-13
libgfortran4
gfortran
libeigen3-dev
openmpi-bin
openmpi-common
openmpi-doc
libopenmpi-dev
libblas-dev
liblapack-dev
libfftw3-dev
libgmp-dev
hdf5-tools
libhdf5-dev
python3-dev
python3-numpy
python3-scipy
python3-matplotlib
ipython3
python3-mpi4py
python3-mako
- name: Install Homebrew dependencies
if: startsWith(matrix.os, 'macos')
run: |
brew install gcc@11 llvm eigen fftw hdf5 open-mpi openblas
pip3 install mako numpy scipy mpi4py
- name: Download Boost (a C++20 compatible version)
run: |
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2
tar -xf boost_1_78_0.tar.bz2
mv boost_1_78_0 boost
mv boost_1_78_0 $HOME/boost
- name: Install libcommute
env:
CXX: ${{ matrix.compiler.cxx }}
CXX: ${{ matrix.cxx }}
run: |
git clone https://github.com/krivenko/libcommute libcommute
mkdir libcommute/build && pushd libcommute/build
Expand All @@ -82,49 +90,57 @@ jobs:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
git clone https://github.com/pomerol-ed/pomerol
mkdir pomerol/build && pushd pomerol/build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/install \
-DBoost_INCLUDE_DIR=$(readlink -f ../../boost) \
-Dlibcommute_DIR=$HOME/install/lib/cmake \
-DTesting=OFF \
-DDocumentation=OFF
make -j2 install VERBOSE=1
popd
git clone https://github.com/pomerol-ed/pomerol
mkdir pomerol/build && pushd pomerol/build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/install \
-DBoost_INCLUDE_DIR=$HOME/boost \
-Dlibcommute_DIR=$HOME/install/lib/cmake \
-DTesting=OFF \
-DDocumentation=OFF
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.1.x
mkdir triqs/build && pushd triqs/build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/install \
-DBoost_INCLUDE_DIR=$(readlink -f ../../boost) \
-DBuild_Tests=OFF
make -j2 install VERBOSE=1
popd
git clone https://github.com/TRIQS/triqs --branch 3.1.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
make -j2 install VERBOSE=1
popd
source $HOME/install/share/triqs/triqsvars.sh
mkdir build && pushd build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/install
make -j2 install VERBOSE=1
popd
- name: Test pomerol2triqs
env:
TMPDIR: "/tmp"
run: |
sudo sh -c 'echo -e "\nrmaps_base_oversubscribe = 1" >> /etc/openmpi/openmpi-mca-params.conf'
if [[ "${{ matrix.os }}" == ubuntu* ]]; then
sudo sh -c 'echo -e "\nrmaps_base_oversubscribe = 1" >> \
/etc/openmpi/openmpi-mca-params.conf'
else
echo -e "\nrmaps_base_oversubscribe = 1" >> \
/usr/local/etc/openmpi-mca-params.conf
fi
source $HOME/install/share/triqs/triqsvars.sh
cd build
ctest --output-on-failure

0 comments on commit 1b44a13

Please sign in to comment.