Skip to content

Commit

Permalink
CI: added some "basic" GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 16, 2024
1 parent e35e4d9 commit f76ffec
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 37 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,35 @@ jobs:
run: |
cd build
ninja test_clang_format
documentation:
name: Documentation
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Check out libCellML
uses: actions/checkout@v4
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install buildcache
uses: mikehardy/buildcache-action@v2
- name: Install dot
run: |
sudo apt update
sudo apt install graphviz
- name: Install Doxygen
run: |
sudo apt update
sudo apt install doxygen
- name: Install Sphinx
run: |
pip3 install sphinx
- name: Configure libCellML
run: |
mkdir build
cd build
cmake -G Ninja -DBINDINGS_PYTHON=OFF ..
- name: Documentation
run: |
cd build
ninja docs
2 changes: 2 additions & 0 deletions cmake/environmentchecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ else ()
endif()
find_program(CLANG_FORMAT_EXE NAMES ${PREFERRED_CLANG_FORMAT_NAMES} clang-format)
find_program(CLANG_TIDY_EXE NAMES ${PREFERRED_CLANG_TIDY_NAMES} clang-tidy)
find_program(DOT_EXE NAMES ${PREFERRED_FIND_NAMES} dot)
find_program(FIND_EXE NAMES ${PREFERRED_FIND_NAMES} find)
find_program(GCOV_EXE NAMES ${PREFERRED_GCOV_NAMES} gcov)
find_program(LLVM_COV_EXE NAMES ${PREFERRED_LLVM_COV_NAMES} llvm-cov HINTS ${LLVM_BIN_DIR} /Library/Developer/CommandLineTools/usr/bin/)
Expand Down Expand Up @@ -93,6 +94,7 @@ else ()
BUILDCACHE_EXE
CLANG_TIDY_EXE
CLANG_FORMAT_EXE
DOT_EXE
FIND_EXE
GCC_COVERAGE_COMPILER_FLAGS_OK
GCOV_EXE
Expand Down
5 changes: 2 additions & 3 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if(SPHINX_FOUND)
COMMENT "Building HTML documentation with Sphinx")
endif()

if(DOXYGEN_FOUND)
if(DOXYGEN_FOUND AND DOT_EXE)
set(DOXYGEN_DOCS_TARGET api_docs)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in.config ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(${DOXYGEN_DOCS_TARGET}
Expand All @@ -76,7 +76,7 @@ if(LIBCELLML_COVERAGE)
COMMENT "Running coverage tests with html output")
endif()

if(SPHINX_FOUND OR DOXYGEN_FOUND OR LIBCELLML_COVERAGE)
if(SPHINX_FOUND AND DOXYGEN_FOUND AND LIBCELLML_COVERAGE)
add_custom_target(docs
DEPENDS ${SPHINX_DOCS_TARGET} ${DOXYGEN_DOCS_TARGET} ${COVERAGE_DOCS_TARGET} ${DOXYGEN_API_XML_DOCS_TARGET}
COMMENT "Generating documentation")
Expand All @@ -86,4 +86,3 @@ if(SPHINX_FOUND OR DOXYGEN_FOUND OR LIBCELLML_COVERAGE)
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/_doctrees
COMMENT "Cleaning documentation")
endif()

66 changes: 33 additions & 33 deletions docs/conf.in.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,42 @@
# These are the shorthand for external links. Use them in the other pages as:
# :shortcut:`Shortcut text <extra string if needed>` NB space before <
# Declare below as:
# 'shortcut': ('http://linkhere/%s',''), NB have to put the string insertion %s to make it work
# 'shortcut': ('http://linkhere/%s', None), NB have to put the string insertion %s to make it work
extlinks = {
# NB for deployment outside of the libcellml.org domain, you will need to include the root of the href for the
# :api: shortcut here. This only works internally.
'api': ('/documentation/latest/api/classlibcellml_1_1%s', ''),
'buildbot': ('https://buildbot.net/%s',''),
'cellml': ('https://www.cellml.org/%s',''),
'cellml2spec': ('https://www.cellml.org/specifications/cellml_2.0%s', ''),
'clang': ('https://clang.llvm.org/%s',''),
'cmake': ('https://cmake.org/%s',''),
'doxygen': ('http://www.doxygen.nl/%s',''),
'forcescheduler': ('http://docs.buildbot.net/latest/developer/cls-forcesched.html%s',''),
'gcc': ('https://gcc.gnu.org/%s',''),
'gcovr': ('https://gcovr.com/%s',''),
'git': ('https://git-scm.com/%s',''),
'github': ('https://github.com/%s',''),
'github_desktop': ('https://desktop.github.com/%s',''),
'github_help': ('https://help.github.com%s',''),
'github_rtd': ('https://github.com/rtfd/readthedocs.org/issues%s',''),
'google_style_guide': ('https://google.github.io/styleguide/cppguide.html%s',''),
'graphviz': ('http://graphviz.org%s',''),
'htpasswd': ('https://httpd.apache.org/docs/current/programs/htpasswd.html%s',''),
'libcellml_repo': ('https://github.com/cellml/libcellml/%s',''),
'libcellml_buildbot': ('https://autotest.bioeng.auckland.ac.nz/buildbot/libcellml/#/builders%s',''),
'libxml2': ('http://xmlsoft.org/%s',''),
'mathml': ('https://www.w3.org/Math/%s',''),
'msvs': ('https://visualstudio.microsoft.com%s',''),
'opencmiss_libxml2_repo': ('https://github.com/OpenCMISS-Dependencies/libxml2/releases%s',''),
'opencmiss_zlib_repo': ('https://github.com/OpenCMISS-Dependencies/zlib/releases%s',''),
'python': ('https://www.python.org/%s',''),
'sphinx': ('http://www.sphinx-doc.org/en/master/%s',''),
'swig':('http://swig.org%s',''),
'swigwin_download': ('https://sourceforge.net/projects/swig/files/swigwin/%s',''),
'wikipedia': ('https://en.wikipedia.org/wiki%s',''),
'xml': ('https://www.w3.org/XML/%s',''),
'zlib': ('https://www.zlib.net/%s',''),
'api': ('/documentation/latest/api/classlibcellml_1_1%s', None),
'buildbot': ('https://buildbot.net/%s', None),
'cellml': ('https://www.cellml.org/%s', None),
'cellml2spec': ('https://www.cellml.org/specifications/cellml_2.0%s', None),
'clang': ('https://clang.llvm.org/%s', None),
'cmake': ('https://cmake.org/%s', None),
'doxygen': ('http://www.doxygen.nl/%s', None),
'forcescheduler': ('http://docs.buildbot.net/latest/developer/cls-forcesched.html%s', None),
'gcc': ('https://gcc.gnu.org/%s', None),
'gcovr': ('https://gcovr.com/%s', None),
'git': ('https://git-scm.com/%s', None),
'github': ('https://github.com/%s', None),
'github_desktop': ('https://desktop.github.com/%s', None),
'github_help': ('https://help.github.com%s', None),
'github_rtd': ('https://github.com/rtfd/readthedocs.org/issues%s', None),
'google_style_guide': ('https://google.github.io/styleguide/cppguide.html%s', None),
'graphviz': ('http://graphviz.org%s', None),
'htpasswd': ('https://httpd.apache.org/docs/current/programs/htpasswd.html%s', None),
'libcellml_repo': ('https://github.com/cellml/libcellml/%s', None),
'libcellml_buildbot': ('https://autotest.bioeng.auckland.ac.nz/buildbot/libcellml/#/builders%s', None),
'libxml2': ('http://xmlsoft.org/%s', None),
'mathml': ('https://www.w3.org/Math/%s', None),
'msvs': ('https://visualstudio.microsoft.com%s', None),
'opencmiss_libxml2_repo': ('https://github.com/OpenCMISS-Dependencies/libxml2/releases%s', None),
'opencmiss_zlib_repo': ('https://github.com/OpenCMISS-Dependencies/zlib/releases%s', None),
'python': ('https://www.python.org/%s', None),
'sphinx': ('http://www.sphinx-doc.org/en/master/%s', None),
'swig':('http://swig.org%s', None),
'swigwin_download': ('https://sourceforge.net/projects/swig/files/swigwin/%s', None),
'wikipedia': ('https://en.wikipedia.org/wiki%s', None),
'xml': ('https://www.w3.org/XML/%s', None),
'zlib': ('https://www.zlib.net/%s', None),
}

# The master toctree document.
Expand Down
2 changes: 1 addition & 1 deletion src/api/libcellml/generatorprofile.h
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,7 @@ class LIBCELLML_EXPORT GeneratorProfile
* Set the @c std::string for the name of the state variable type that is
* used in a differential model.
*
* @param stateTypeString The @c std::string to use for the name of the
* @param stateVariableTypeString The @c std::string to use for the name of the
* state variable type.
*/
void setStateVariableTypeString(const std::string &stateVariableTypeString);
Expand Down

0 comments on commit f76ffec

Please sign in to comment.