Fix Doxygen workflow (#4372)

This commit is contained in:
John Freeman
2022-12-21 12:41:16 -06:00
committed by GitHub
parent d8a84e9530
commit fda9e9a7ee
4 changed files with 93 additions and 83 deletions

View File

@@ -1,4 +1,5 @@
name: Build and publish Doxygen documentation name: Build and publish Doxygen documentation
# To test this workflow, push your changes to your fork's `develop` branch.
on: on:
push: push:
branches: branches:
@@ -11,12 +12,18 @@ jobs:
image: docker://rippleci/rippled-ci-builder:2944b78d22db image: docker://rippleci/rippled-ci-builder:2944b78d22db
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: check environment
run: |
echo ${PATH} | tr ':' '\n'
cmake --version
doxygen --version
env
- name: build - name: build
run: | run: |
mkdir build mkdir build
cd build cd build
cmake -DBoost_NO_BOOST_CMAKE=ON .. cmake -Donly_docs=TRUE ..
cmake --build . --target docs --parallel $(nproc) cmake --build . --target docs --parallel $(nproc)
- name: publish - name: publish
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3

View File

@@ -74,7 +74,7 @@ jobs:
run: | run: |
mkdir ${build_dir} mkdir ${build_dir}
cd ${build_dir} cd ${build_dir}
conan install .. --build missing --settings build_type=${{ matrix.configuration }} --profile:build default --profile:host default conan install .. --build missing --settings build_type=${{ matrix.configuration }}
- name: configure - name: configure
run: | run: |
cd ${build_dir} cd ${build_dir}

View File

@@ -2,13 +2,12 @@
docs target (optional) docs target (optional)
#]===================================================================] #]===================================================================]
# Early return if the `docs` directory is missing, option(with_docs "Include the docs target?" FALSE)
# e.g. when we are building a Conan package.
if(NOT EXISTS docs) if(NOT (with_docs OR only_docs))
return() return()
endif() endif()
if (tests)
find_package(Doxygen) find_package(Doxygen)
if(NOT TARGET Doxygen::doxygen) if(NOT TARGET Doxygen::doxygen)
message(STATUS "doxygen executable not found -- skipping docs target") message(STATUS "doxygen executable not found -- skipping docs target")
@@ -83,4 +82,3 @@ if (tests)
add_custom_target(docs add_custom_target(docs
DEPENDS "${doxygen_index_file}" DEPENDS "${doxygen_index_file}"
SOURCES "${dependencies}") SOURCES "${dependencies}")
endif ()

View File

@@ -58,6 +58,12 @@ endif ()
include(RippledCompiler) include(RippledCompiler)
include(RippledInterface) include(RippledInterface)
option(only_docs "Include only the docs target?" FALSE)
include(RippledDocs)
if(only_docs)
return()
endif()
### ###
include(deps/Boost) include(deps/Boost)
@@ -119,5 +125,4 @@ include(RippledCore)
include(RippledInstall) include(RippledInstall)
include(RippledCov) include(RippledCov)
include(RippledMultiConfig) include(RippledMultiConfig)
include(RippledDocs)
include(RippledValidatorKeys) include(RippledValidatorKeys)