Skip to content

Commit

Permalink
Merge pull request #9 from lf-lang/docs
Browse files Browse the repository at this point in the history
Docs
  • Loading branch information
lhstrh authored Oct 26, 2021
2 parents 80f5cb2 + f5b5cfe commit 7cb97bc
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 17 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docs

on:
#push:
# branches-ignore:
# - '**'
push:
branches: [ main ]

jobs:
build:

runs-on: macos-latest

steps:
- name: Requirements
run: brew install doxygen
&& brew install sphinx-doc
&& pip3 install sphinx-rtd-theme
&& pip3 install breathe
&& pip3 install sphinx-sitemap
&& pip3 install exhale
- name: Checkout repo
uses: actions/checkout@1.0.0
- name: Build docs
run: cd docs
&& make doxygen
&& cd _build/html
&& touch .nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/_build/html # The folder the action should deploy.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/.idea/
/docs/_build
/docs/api
/.vscode/
7 changes: 3 additions & 4 deletions core/platform/lf_windows_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,15 @@ double _lf_frequency_to_ns = 1.0;
#ifdef NUMBER_OF_WORKERS
#if __STDC_VERSION__ < 201112L || defined (__STDC_NO_THREADS__) // (Not C++11 or later) or no threads support

/**
* \defgroup bgroup Group B
*
NtDelayExecution_t *NtDelayExecution = NULL;
NtQueryPerformanceCounter_t *NtQueryPerformanceCounter = NULL;
NtQuerySystemTime_t *NtQuerySystemTime = NULL;

/**
* Create a new thread, starting with execution of lf_thread
* getting passed arguments. The new handle is stored in thread.
*
* @return 0 on success, 1 otherwise.
* \ingroup bgroup
*/
int lf_thread_create(_lf_thread_t* thread, void *(*lf_thread) (void *), void* arguments) {
uintptr_t handle = _beginthread(lf_thread, 0, arguments);
Expand Down
12 changes: 6 additions & 6 deletions docs_sphinx/Doxyfile.in → docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH =
STRIP_FROM_PATH = ../.

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand Down Expand Up @@ -231,7 +231,7 @@ PYTHON_DOCSTRING = YES
# documentation from any documented member that it re-implements.
# The default value is: YES.

INHERIT_DOCS = YES
INHERIT_DOCS = NO

# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
# page for each member. If set to NO, the documentation of a member will be part
Expand Down Expand Up @@ -871,7 +871,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../core
INPUT = ../

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -960,7 +960,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE = ../docs/

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -1223,7 +1223,7 @@ IGNORE_PREFIX =
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
# The default value is: YES.

GENERATE_HTML = NO
GENERATE_HTML = YES

# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down Expand Up @@ -2227,7 +2227,7 @@ PERLMOD_MAKEVAR_PREFIX =
# C-preprocessor directives found in the sources and include files.
# The default value is: YES.

ENABLE_PREPROCESSING = NO
ENABLE_PREPROCESSING = YES

# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
# in the source code. If set to NO, only conditional compilation will be
Expand Down
4 changes: 4 additions & 0 deletions docs_sphinx/Makefile → docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ clean: Makefile
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doxygen: Makefile
doxygen Doxyfile.in

17 changes: 12 additions & 5 deletions docs_sphinx/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'navigation_depth': 8,
'includehidden': True,
'titles_only': False
}

# Setup the breathe extension
breathe_projects = {
"reactor-cpp": "./_build/xml"
"reactor-c": "./_build/xml"
}

# Setup the exhale extension
Expand All @@ -96,7 +96,7 @@
"containmentFolder": "./api",
"rootFileName": "library_root.rst",
"rootFileTitle": "Reactor C Documentation",
"doxygenStripFromPath": "..",
"doxygenStripFromPath": "../.",
# Suggested optional arguments
"createTreeView": True,
# TIP: if using the sphinx-bootstrap-theme, you need
Expand All @@ -105,9 +105,16 @@
# "exhaleDoxygenStdin": "INPUT = ../core"
}



# Tell sphinx what the primary language being documented is.
primary_domain = 'c'

breathe_domain_by_extension = {
"h" : "c",
"c" : "c",
}

# Tell sphinx what the pygments highlight language should be.
highlight_language = 'c'

Expand All @@ -119,7 +126,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']

breathe_default_project = "reactor-cpp"
breathe_default_project = "reactor-c"
breathe_default_members = ('members', 'undoc-members')
4 changes: 2 additions & 2 deletions docs_sphinx/index.rst → docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
.. toctree::

about
api/library_root
api/library_root
api
File renamed without changes.
File renamed without changes.

0 comments on commit 7cb97bc

Please sign in to comment.