-
Notifications
You must be signed in to change notification settings - Fork 7
168 lines (153 loc) · 5.23 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: CI
on:
push:
branches:
- master
- ci
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 0'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# 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@17/bin/clang,
cxx: /usr/local/opt/llvm@17/bin/clang++}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Ubuntu dependencies
if: startsWith(matrix.os, 'ubuntu')
run: >
sudo apt-get update &&
sudo apt-get install lsb-release wget software-properties-common &&
sudo apt-get install
g++-12
clang-15
libc++-15-dev
libc++abi-15-dev
libomp-15-dev
libgfortran5
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 llvm@17 libomp eigen fftw hdf5 open-mpi
pip3 install mako numpy scipy mpi4py
- name: Cache Boost (a C++20 compatible version)
id: cache-boost
uses: actions/cache@v3
with:
path: ~/boost
key: boost-1.82
- name: Download Boost (a C++20 compatible version)
if: ${{ steps.cache-boost.outputs.cache-hit != 'true' }}
run: |
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.bz2
tar -xf boost_1_82_0.tar.bz2
mv boost_1_82_0 $HOME/boost
- name: Force use of libc++
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cxx, 'clang')
run: echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
- name: Install libcommute
env:
CXX: ${{ matrix.cxx }}
run: |
git clone https://github.com/krivenko/libcommute libcommute
mkdir libcommute/build && pushd libcommute/build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/install \
-DTESTS=OFF \
-DEXAMPLES=OFF
make install
popd
- name: Build & install Pomerol
env:
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=$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.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