Skip to content

Commit

Permalink
Merge pull request #410 from hyoklee/hyoklee-issue-346
Browse files Browse the repository at this point in the history
Close #346.
  • Loading branch information
hyoklee committed Apr 20, 2022
2 parents 04deb36 + 8d15bba commit a8f053c
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: doxygen
on:
push:
branches: [ master ]
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
LOCAL: local

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Get Sources
uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v1

- name: Run cpplint
run: pip install cpplint==1.5.4 && cpplint --recursive --exclude=src/stb_ds.h .

- name: Cache Spack packages
uses: actions/cache@v2
id: spack-cache
with:
path: ~/${{ env.LOCAL }}
key: ${{ runner.os }}-${{ hashFiles('ci/**') }}

- name: Install APT Dependencies
run: |
sudo apt update
sudo apt-get install -y autoconf
sudo apt-get install -y automake
sudo apt-get install -y libtool
sudo apt-get install -y libtool-bin
sudo apt-get install -y mpich
sudo apt-get install -y lcov
sudo apt-get install -y zlib1g-dev
sudo apt-get install -y libsdl2-dev
sudo apt-get install -y graphviz
sudo apt-get install -y doxygen
- name: Build And Install Dependencies
if: steps.spack-cache.outputs.cache-hit != 'true'
run: ci/install_deps.sh

- name: Build and Test
run: ci/install_docs.sh

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./build/_build/html
destination_dir: html
github_token: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions ci/install_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

set -x
set -e
set -o pipefail

mkdir build
pushd build

INSTALL_PREFIX="${HOME}/${LOCAL}"

export CXXFLAGS="${CXXFLAGS} -std=c++17 -Werror -Wall -Wextra"
cmake \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} \
-DCMAKE_BUILD_RPATH=${INSTALL_PREFIX}/lib \
-DCMAKE_INSTALL_RPATH=${INSTALL_PREFIX}/lib \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_CXX_COMPILER=`which mpicxx` \
-DCMAKE_C_COMPILER=`which mpicc` \
-DBUILD_SHARED_LIBS=ON \
-DHERMES_ENABLE_DOXYGEN=ON \
-DHERMES_ENABLE_COVERAGE=ON \
-DHERMES_INTERCEPT_IO=OFF \
-DHERMES_BUILD_BENCHMARKS=ON \
-DHERMES_COMMUNICATION_MPI=ON \
-DHERMES_BUILD_BUFFER_POOL_VISUALIZER=ON \
-DORTOOLS_DIR=${INSTALL_PREFIX} \
-DHERMES_USE_ADDRESS_SANITIZER=ON \
-DHERMES_USE_THREAD_SANITIZER=OFF \
-DHERMES_RPC_THALLIUM=ON \
-DHERMES_DEBUG_HEAP=OFF \
-DHERMES_ENABLE_VFD=ON \
-DBUILD_TESTING=ON \
..
make dox
# cmake --build . -- -j4
# ctest -VV

popd

0 comments on commit a8f053c

Please sign in to comment.