mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 17:50:14 +01:00
Squashed 'src/c-rbtree/' changes from e56535a5daa5..edec411b3c1c
edec411b3c1c build: add RTD link to README.md 431a47467052 build: add RTD integration e406cca122d7 build: import documentation builder 5f41b5d8ff75 ci: convert to new ci-c-util workflow git-subtree-dir: src/c-rbtree git-subtree-split: edec411b3c1c03985adb73e3f5b4c9a402206f5b
This commit is contained in:
parent
49f854886e
commit
9358a0e184
7 changed files with 119 additions and 21 deletions
40
.github/workflows/ci.yml
vendored
40
.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
.readthedocs.yaml
Normal file
23
.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/docs/api.rst
Normal file
5
src/docs/api.rst
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
API
|
||||
===
|
||||
|
||||
.. c:autodoc:: c-*.h c-*.c
|
||||
:transform: kerneldoc
|
||||
51
src/docs/conf.py
Normal file
51
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/docs/index.rst
Normal file
15
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/docs/requirements.txt
Normal file
5
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