Skip to content

Commit

Permalink
basic doxygen build ported from our other repo
Browse files Browse the repository at this point in the history
  • Loading branch information
landinjm committed Dec 16, 2024
1 parent 92cf062 commit d00c5fa
Show file tree
Hide file tree
Showing 22 changed files with 1,870 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches:
- master
- devel
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
- ready_for_review
paths-ignore:
- 'applications/**'
- 'doc/**'


concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish doc to GitHub pages

on:
push:
branches:
- devel
pull_request:
paths-ignore:
- 'doc/**'

permissions:
contents: write

concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request'}}

jobs:
docs:

runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup doxygen
run: |
sudo apt-get install doxygen
sudo apt-get install -y graphviz
- name: Build doxygen files
run: |
cd doc/doxygen
cmake .
make
- name: Upload folders
uses: actions/upload-artifact@v4
with:
name: html-doc
path: doc/doxygen/html/

- name: Deploy to GitHub pages
uses: JamesIves/github-pages-deploy-action@v4
if: github.ref == 'refs/heads/devel'
with:
branch: gh-pages
folder: doc/doxygen/html/
target-folder: doxygen/

1 change: 1 addition & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- ready_for_review
paths-ignore:
- 'applications/**'
- 'doc/**'

concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,10 @@ DoxygenWarningLog.txt
*.nav
*.snm
*.nlo

# Doxygen
doc/doxygen/html/*
doc/doxygen/latex/*
doc/doxygen/Doxyfile.doc_doxygen
doc/doxygen/CMakeDoxyfile.in
doc/doxygen/DoxygenWarningLog.txt
19 changes: 19 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# PRISMS-PF Documentation
The prebuilt documentation can be found here:

https://prisms-center.github.io/phaseField/doxygen_files/manual.html

## Install Doxygen
Doxygen can be installed from https://www.doxygen.nl/

## Build
After Doxygen is installed, simply compile like normal.
```
cmake .
```
```
make
```

## Licensing
The documentation is covered with the same license as the PRISMS-PF library.
31 changes: 31 additions & 0 deletions doc/doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
##
# CMake script for the PRISMS-PF doxygen documentation.
##

cmake_minimum_required(VERSION 3.17.0)

project(PRISMS-PF)

# Check that Doxygen is installed
find_package(Doxygen REQUIRED)

if (DOXYGEN_FOUND)
# Path of Doxyfile
set(DOXYGEN_INPUT ${CMAKE_SOURCE_DIR}/Doxyfile)

# Path of output file
set(DOXYGEN_OUTPUT ${CMAKE_SOURCE_DIR}/Doxyfile.out)

# Copy input to output
configure_file(${DOXYGEN_INPUT} ${DOXYGEN_OUTPUT} @ONLY)

# Add target so we can just call make with no target
add_custom_target(doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUTPUT}
COMMENT "Generating Doxygen documentation"
VERBATIM
)

message(STATUS "Doxygen documentation will be generated using: ${DOXYGEN_INPUT}")

endif (DOXYGEN_FOUND)
Loading

0 comments on commit d00c5fa

Please sign in to comment.