mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 05:20:17 +01:00
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
This commit is contained in:
commit
7fc2bc7a29
7 changed files with 119 additions and 21 deletions
40
src/c-rbtree/.github/workflows/ci.yml
vendored
40
src/c-rbtree/.github/workflows/ci.yml
vendored
|
|
@ -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"
|
||||
|
|
|
|||
23
src/c-rbtree/.readthedocs.yaml
Normal file
23
src/c-rbtree/.readthedocs.yaml
Normal file
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
|
|||
5
src/c-rbtree/src/docs/api.rst
Normal file
5
src/c-rbtree/src/docs/api.rst
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
API
|
||||
===
|
||||
|
||||
.. c:autodoc:: c-*.h c-*.c
|
||||
:transform: kerneldoc
|
||||
51
src/c-rbtree/src/docs/conf.py
Normal file
51
src/c-rbtree/src/docs/conf.py
Normal file
|
|
@ -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'
|
||||
15
src/c-rbtree/src/docs/index.rst
Normal file
15
src/c-rbtree/src/docs/index.rst
Normal file
|
|
@ -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
|
||||
5
src/c-rbtree/src/docs/requirements.txt
Normal file
5
src/c-rbtree/src/docs/requirements.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
c-apidocs>=0.0.3
|
||||
clang>=6
|
||||
hawkmoth>=0.7
|
||||
meson>=0.60
|
||||
ninja>=1.10
|
||||
Loading…
Add table
Reference in a new issue