-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation Organize, setup versioned docs Deploy docs to Github pages Update doxygen header Use Doxygen 1.12.0 for github pages builds Improved Process Recovery docs writeup 'make doc' -> 'make docs'
- Loading branch information
1 parent
f5447ef
commit e0ce1f8
Showing
18 changed files
with
1,414 additions
and
50 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
|
||
set -e | ||
|
||
echo "Installing apt packages" | ||
sudo apt-get update >/dev/null | ||
sudo apt-get install -y wget git cmake graphviz >/dev/null | ||
|
||
echo "Installing Doxygen" | ||
wget https://www.doxygen.nl/files/doxygen-1.12.0.linux.bin.tar.gz >/dev/null | ||
tar -xzf doxygen-1.12.0.linux.bin.tar.gz >/dev/null | ||
export PATH="$PWD/doxygen-1.12.0/bin:$PATH" | ||
|
||
#List of branches to build docs for | ||
#TODO: Remove doxygen branch once tested | ||
BRANCHES="doxygen master develop" | ||
|
||
build-docs() ( | ||
git checkout $1 | ||
|
||
#The CMake Doxygen stuff is weird, and doesn't | ||
#properly clean up and/or overwrite old outputs. | ||
#So to make sure we get the correct doc configs, | ||
#we need to delete everything | ||
#We put the docs themselves into a hidden directory | ||
#so they don't get included in this glob | ||
rm -rf ./* | ||
|
||
cmake ../ -DBUILD_DOCS=ON -DDOCS_ONLY=ON \ | ||
-DFENIX_DOCS_MAN=OFF -DFENIX_BRANCH=$1 \ | ||
-DFENIX_DOCS_OUTPUT=$PWD/.docs | ||
make docs | ||
) | ||
|
||
git clone https://www.github.com/sandialabs/Fenix.git | ||
mkdir Fenix/build | ||
cd Fenix/build | ||
|
||
for branch in $BRANCHES; do | ||
echo "Building docs for $branch" | ||
|
||
#TODO: Fail if any branch fails to build, | ||
# once the develop and master branches have doxygen | ||
# merged in | ||
build-docs $branch || true | ||
|
||
echo | ||
echo | ||
done | ||
|
||
if [ -n "$GITHUB_ENV" ]; then | ||
echo "DOCS_DIR=$PWD/.docs" >> $GITHUB_ENV | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish GH Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
- doxygen # TODO: Remove after testing | ||
|
||
#Only one of this workflow runs at a time | ||
concurrency: | ||
group: docs | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build pages | ||
run: /bin/bash .github/scripts/build-gh-pages.sh | ||
|
||
- name: Upload documentation artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ${{ env.DOCS_DIR }} | ||
|
||
deploy-docs: | ||
needs: build-pages | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Deploy documentation to GH Pages | ||
uses: actions/deploy-pages@v4 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
find_package(Doxygen) | ||
|
||
set(FENIX_DOCS_OUTPUT ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Documentation output directory") | ||
set(FENIX_DOCS_MAN "YES" CACHE BOOL "Option to disable man page generation for CI builds") | ||
set(FENIX_BRANCH "local" CACHE BOOL "Git branch being documented, or local if not building for Github Pages") | ||
|
||
if(NOT DOXYGEN_FOUND) | ||
message(STATUS "Doxygen not found, `make docs` disabled") | ||
return() | ||
endif() | ||
|
||
list(APPEND DOXYGEN_EXAMPLE_PATH markdown) | ||
list(APPEND DOXYGEN_IMAGE_PATH images) | ||
|
||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE markdown/Introduction.md) | ||
set(DOXYGEN_LAYOUT_FILE DoxygenLayout.xml) | ||
set(DOXYGEN_OUTPUT_DIRECTORY ${FENIX_DOCS_OUTPUT}) | ||
|
||
set(DOXYGEN_GENERATE_MAN ${FENIX_DOCS_MAN}) | ||
|
||
set(DOXYGEN_QUIET YES) | ||
set(DOXYGEN_WARN_IF_UNDOCUMENTED NO) | ||
set(DOXYGEN_WARN_IF_DOC_ERROR YES) | ||
set(DOXYGEN_WARN_NO_PARAMDOC YES) | ||
set(DOXYGEN_SHOW_INCLUDE_FILES NO) | ||
set(DOXYGEN_WARN_IF_UNDOC_ENUM_VAL NO) | ||
|
||
list(APPEND DOXYGEN_ALIASES "returnstatus=@return FENIX_SUCCESS if successful, any [return code](@ref ReturnCodes) otherwise.") | ||
list(APPEND DOXYGEN_ALIASES "unimplemented=@qualifier UNIMPLEMENTED @brief @htmlonly <span class=\\\"mlabel\\\"> @endhtmlonly UNIMPLEMENTED @htmlonly </span> @endhtmlonly") | ||
|
||
add_subdirectory(html) | ||
|
||
doxygen_add_docs(docs | ||
markdown/Introduction.md fake_init.h ../include ../src | ||
ALL | ||
COMMENT "Generate Fenix documentation") | ||
message(STATUS "Run `make docs` to build documentation") | ||
|
||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man DESTINATION ${CMAKE_INSTALL_PREFIX}) |
Oops, something went wrong.