diff options
author | Thomas Haller <thaller@redhat.com> | 2022-07-19 09:02:38 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-07-19 09:02:38 +0200 |
commit | 7fc2bc7a29c2f4b7e7cbd88886b2680535eaff6b (patch) | |
tree | 322e461039b2445ebc12e5b74d171373b192e5d5 | |
parent | e2bedbf8a5a183a4affca010af8badce95d8ed6c (diff) | |
parent | 9358a0e1847bfce5f53730a22fe6c924cd5cc01e (diff) | |
download | NetworkManager-7fc2bc7a29c2f4b7e7cbd88886b2680535eaff6b.tar.gz |
c-rbtree: re-import git-subtree for 'src/c-rbtree'
git subtree pull --prefix src/c-rbtree git@github.com:c-util/c-rbtree.git main --squash
-rw-r--r-- | src/c-rbtree/.github/workflows/ci.yml | 40 | ||||
-rw-r--r-- | src/c-rbtree/.readthedocs.yaml | 23 | ||||
-rw-r--r-- | src/c-rbtree/README.md | 1 | ||||
-rw-r--r-- | src/c-rbtree/src/docs/api.rst | 5 | ||||
-rw-r--r-- | src/c-rbtree/src/docs/conf.py | 51 | ||||
-rw-r--r-- | src/c-rbtree/src/docs/index.rst | 15 | ||||
-rw-r--r-- | src/c-rbtree/src/docs/requirements.txt | 5 |
7 files changed, 119 insertions, 21 deletions
diff --git a/src/c-rbtree/.github/workflows/ci.yml b/src/c-rbtree/.github/workflows/ci.yml index 9db40b619f..489433c281 100644 --- a/src/c-rbtree/.github/workflows/ci.yml +++ b/src/c-rbtree/.github/workflows/ci.yml @@ -7,37 +7,35 @@ on: - cron: '0 0 * * *' jobs: - ci: - name: CI with Default Configuration + ci-linux: + name: Linux CI uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1 with: cabuild_ref: "v1" + linux: true m32: true matrixmode: true valgrind: true - ci-ptrace: - name: Reduced CI with PTrace + ci-linux-ptrace: + name: Linux CI with PTrace uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1 with: cabuild_ref: "v1" + linux: true mesonargs: '-Dptrace=true' ci-macos: - name: CI on MacOS - runs-on: macos-latest - steps: - - name: Fetch Sources - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install Python Dependencies - run: pip install meson ninja - - name: Prepare Build - run: meson setup build - - name: Run Build - run: meson compile -v -C build - - name: Run Test Suite - run: meson test -v -C build + name: MacOS CI + uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1 + with: + cabuild_ref: "v1" + linux: false + macos: true + + ci-docs: + name: Documentation CI + uses: bus1/cabuild/.github/workflows/ci-sphinx.yml@v1 + with: + meson: true + source: "./src/docs" diff --git a/src/c-rbtree/.readthedocs.yaml b/src/c-rbtree/.readthedocs.yaml new file mode 100644 index 0000000000..fd02d29710 --- /dev/null +++ b/src/c-rbtree/.readthedocs.yaml @@ -0,0 +1,23 @@ +# Read the Docs configuration file + +version: 2 + +build: + apt_packages: + - "clang" + jobs: + pre_build: + - meson subprojects download + os: "ubuntu-22.04" + tools: + python: "3" + +formats: "all" + +python: + install: + - requirements: "src/docs/requirements.txt" + system_packages: true + +sphinx: + configuration: "src/docs/conf.py" diff --git a/src/c-rbtree/README.md b/src/c-rbtree/README.md index e3183ac8aa..ff3e1cb70e 100644 --- a/src/c-rbtree/README.md +++ b/src/c-rbtree/README.md @@ -12,6 +12,7 @@ as well as the docbook comments for each function. ### Project * **Website**: <https://c-util.github.io/c-rbtree> + * **Documentation**: <https://c-rbtree.readthedocs.io> * **Bug Tracker**: <https://github.com/c-util/c-rbtree/issues> ### Requirements diff --git a/src/c-rbtree/src/docs/api.rst b/src/c-rbtree/src/docs/api.rst new file mode 100644 index 0000000000..fb41b9e82e --- /dev/null +++ b/src/c-rbtree/src/docs/api.rst @@ -0,0 +1,5 @@ +API +=== + +.. c:autodoc:: c-*.h c-*.c + :transform: kerneldoc diff --git a/src/c-rbtree/src/docs/conf.py b/src/c-rbtree/src/docs/conf.py new file mode 100644 index 0000000000..4bc8f8612a --- /dev/null +++ b/src/c-rbtree/src/docs/conf.py @@ -0,0 +1,51 @@ +# +# Sphinx Documentation Configuration +# + +import re +import os +import sys + +import capidocs.kerneldoc +import hawkmoth + +# Global Setup + +project = 'c-rbtree' + +author = 'C-Util Community' +copyright = '2015-2022, C-Util Community' + +# Hawkmoth C-Audodoc Setup + +capidocs.kerneldoc.hawkmoth_conf() + +# Extensions + +exclude_patterns = [] + +extensions = [ + 'hawkmoth', +] + +# Hawkmoth Options + +import pathlib +def _hawkmoth_glob_includes(path, glob): + entries = [] + for entry in pathlib.Path(path).glob(glob): + entries += ["-I" + os.path.abspath(str(entry))] + return entries + +cautodoc_clang = capidocs.kerneldoc.hawkmoth_include_args() +cautodoc_clang += _hawkmoth_glob_includes("../../subprojects", "libc*/src") + +cautodoc_root = os.path.abspath('..') + +cautodoc_transformations = { + 'kerneldoc': capidocs.kerneldoc.hawkmoth_converter, +} + +# HTML Options + +html_theme = 'sphinx_rtd_theme' diff --git a/src/c-rbtree/src/docs/index.rst b/src/c-rbtree/src/docs/index.rst new file mode 100644 index 0000000000..df281b0bec --- /dev/null +++ b/src/c-rbtree/src/docs/index.rst @@ -0,0 +1,15 @@ +Introduction +============ + +The **c-rbtree** project provides a Red-Black-Tree API, that is fully +implemented in ISO-C11 and has no external dependencies. Furthermore, tree +traversal, memory allocations, and key comparisons are completely controlled by +the API user. The implementation only provides the RB-Tree specific rebalancing +and coloring. + +.. toctree:: + :caption: Library Documentation + :hidden: + + self + api diff --git a/src/c-rbtree/src/docs/requirements.txt b/src/c-rbtree/src/docs/requirements.txt new file mode 100644 index 0000000000..77973ebd67 --- /dev/null +++ b/src/c-rbtree/src/docs/requirements.txt @@ -0,0 +1,5 @@ +c-apidocs>=0.0.3 +clang>=6 +hawkmoth>=0.7 +meson>=0.60 +ninja>=1.10 |