Update my contact e-mail #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test (Ubuntu) | |
on: | |
push: | |
branches: | |
- master | |
- ci | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
compiler: | |
- { name: "g++-9", cxx: "g++-9" } | |
- { name: "clang-10", cxx: "clang++-10" } | |
install-libcommute: [true, false] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install -y libeigen3-dev libopenmpi-dev libboost-all-dev | |
sudo apt-get install -y ${{ matrix.compiler.name }} | |
- name: Install Doxygen | |
if: | | |
startsWith(matrix.compiler.name, 'clang') == true && | |
matrix.install-libcommute | |
run: sudo apt-get install -y doxygen graphviz | |
- name: Install libcommute | |
if: matrix.install-libcommute | |
env: | |
CXX: ${{ matrix.compiler.cxx }} | |
run: | | |
git clone https://github.com/krivenko/libcommute ${HOME}/libcommute | |
mkdir ${HOME}/libcommute.build && cd ${HOME}/libcommute.build | |
cmake ${HOME}/libcommute \ | |
-DCMAKE_INSTALL_PREFIX=${HOME}/libcommute.ins \ | |
-DTESTS=OFF \ | |
-DEXAMPLES=OFF | |
make install | |
- name: Build | |
env: | |
CXX: ${{ matrix.compiler.cxx }} | |
run: | | |
if [[ "${{ matrix.compiler.name }}" == clang* ]]; then | |
DOCS=ON | |
else | |
DOCS=OFF | |
fi | |
if [[ "${{ matrix.install-libcommute }}" == true ]]; then | |
LCA="-Dlibcommute_DIR=${HOME}/libcommute.ins/lib/cmake/libcommute" | |
fi | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=installed \ | |
${LCA} \ | |
-DStaticAnalysis=OFF \ | |
-DUSE_OPENMP=ON \ | |
-DDocumentation=${DOCS} \ | |
-DTesting=ON \ | |
-DProgs=ON \ | |
-Dprogs_list="anderson;hubbard2d" .. | |
make VERBOSE=1 | |
- name: Build documentation | |
if: | | |
startsWith(matrix.compiler.name, 'clang') == true && | |
matrix.install-libcommute | |
run: | | |
cd build | |
make doc | |
- name: Run unit tests | |
run: | | |
sudo sh -c 'echo -e "\nrmaps_base_oversubscribe = 1" >> \ | |
/etc/openmpi/openmpi-mca-params.conf' | |
cd build | |
ctest --output-on-failure | |
- name: Install | |
run: | | |
cd build | |
make install | |
- name: Copy GitHub Pages Jekyll configuration file | |
if: | | |
startsWith(matrix.compiler.name, 'clang') == true && | |
matrix.install-libcommute | |
run: | | |
cp scripts/gh_pages_config.yml \ | |
build/installed/share/doc/pomerol/_config.yml | |
- name: Deploy documentation | |
if: | | |
github.ref == 'refs/heads/master' && | |
startsWith(matrix.compiler.name, 'clang') == true && | |
matrix.install-libcommute | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
token: ${{ secrets.GITHUB_TOKEN }} | |
folder: build/installed/share/doc/pomerol |