Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienDoerner committed Nov 14, 2023
1 parent 8050fd8 commit cdec99d
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/create_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: create-documentation
on:
workflow_dispatch

jobs:
create-documentation:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
config:
- name: "ubuntu-20"
os: ubuntu-20.04
cxx: "g++-9"
cc: "gcc-9"
fc: "gfortran-9"
swig_builtin: "Off" #uses swig 4.0.1
py: "/usr/bin/python3" #python 3.8

# define steps to take
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Python install
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: Prerequirements
run: |
sudo apt-get update
sudo apt-get install libmuparser-dev libhdf5-serial-dev libomp5 libomp-dev libfftw3-dev libcfitsio-dev lcov
pip install -r doc/pages/example_notebooks/requirements.txt # load requrements for notebooks
- name: Set up the build
env:
CXX: ${{ matrix.config.cxx }}
CC: ${{ matrix.config.cc }}
FC: ${{ matrix.config.fc }}
run: |
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local
-DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=${{ matrix.config.py }}
-DENABLE_TESTING=Off -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }}
-DSIMD_EXTENSIONS=native
-DBUILD_DOC=True -DENABLE_COVERAGE=True
- name: Build CRPropa
run: |
cd build
make -j
- name: run test
run: |
cd build
make test
continue-on-error: true
- name: coverage and documentation
run: |
cd build
make coverage
tar -zcvf coverage.tar.gz coverageReport
make doc
tar -zcvf documentation.tar.gz doc
- name: archive documentation
uses: actions/upload-artifact@v3
with:
name: "documentation.tar.gz"
path: |
documentation.tar.gz
coverage.tar.gz

0 comments on commit cdec99d

Please sign in to comment.