Skip to content

Commit

Permalink
Add CI for sphinx doc builds
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <travis.collins@analog.com>
  • Loading branch information
tfcollins committed Sep 9, 2024
1 parent 8f716c1 commit a3e9ee1
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/doc/styles/ADI/Capitalization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: capitalization
message: "'%s' should be in title case"
level: warning
scope: sentence
# $title, $sentence, $lower, $upper, or a pattern.
#match: $title
#style: AP # AP or Chicago; only applies when match is set to $title.
exceptions:
- ADC
- DAC
- adc
- dac
5 changes: 5 additions & 0 deletions .github/doc/styles/ADI/Spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: spelling
message: "Did you really mean '%s'?"
level: error
ignore:
- Vocab/Sphinx/accept.txt
14 changes: 14 additions & 0 deletions .github/doc/styles/ADI/Terms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `extends` specifies the extension point you're using. Here, we're
# using `substitution` to ensure correct usage of some techincal and
# brand-specifc terminology.
extends: substitution
# `message` allows you to customize the output shown to your users.
message: Use '%s' instead of '%s'.
# We're setting this rule's severity to `error`, which will cause
# CI builds to fail.
level: error
# We're using case-insensitive patterns.
ignorecase: true
swap:
libIIO: libiio
linux: Linux
8 changes: 8 additions & 0 deletions .github/doc/styles/Google/Units.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Put a nonbreaking space between the number and the unit in '%s'."
link: 'https://developers.google.com/style/units-of-measure'
nonword: true
level: warning
tokens:
- \d+(?:B|kB|MB|GB|TB)
- \d+(?:ns|ms|s|min|h|d)
80 changes: 80 additions & 0 deletions .github/doc/styles/config/vocabularies/Sphinx/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
adijif
204B
204C
JESD204B
JESD204C
libiio
pypi
conda
JESD
ADI
SYSREF
LMFC
AD-FMCDAQ2-EBZ
AD9523-1
AD9528
AD9680
ADRV9009
HMC7044
Nox
pyenv
bashrc
zshrc
Makefile
Ultrascale
Ultrascale+
[aA][dD][cC]
[dD][aA][cC]
PLL
[nN]ox
[mM]ultiblock
codecov
mux
muxes
muxing
Fmax
parameterization
clk
[xX]ilinx
(?i)fpgas
fpga
Scopy
sysfs
iiod
IIOD
usb
Jetson
Mbed
repo
github
iio_context
iio_device
iio_channel
iio_buffer
iio_scan_context
iio_attr
iio_reg
iio_info
iio_readdev
iio_writedev
iio_rwdev
iio_stresstest
iio_genxml
arg
pid
hostname
data_bits
parity_bits
stop_bits
flow_control
Xon
Xoff

ip
uri
deinterleave
endianness
zeroconf
attr
Doxygen
Nechita
Empty file.
54 changes: 54 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Documentation Tests

on: [push, pull_request]

jobs:
CheckDocs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y git cmake graphviz libavahi-common-dev libavahi-client-dev libaio-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git libzstd-dev doxygen pandoc
mkdir build
cd build
cmake .. -DWITH_MAN=ON -DHAVE_DNS_SD=OFF
make
sudo make install
cd ..
cd docs
pip install -r requirements_doc.txt
cd ..
- name: Build man pages
run: |
cd docs
python man_to_rst.py
cd ..
- name: Check doc build
run: |
cd docs
make html SPHINXOPTS="-W"
cd ..
# - name: Check doc coverage
# run: |
# cd docs
# make coverage
# cat build/coverage/python.txt
# cat build/coverage/python.txt | wc -l | xargs -I % test % -eq 2
# cd ..

- name: Check doc links
run: |
cd docs
make linkcheck
cd ..
12 changes: 12 additions & 0 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: reviewdog
on: [pull_request,push]

jobs:
vale:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: errata-ai/vale-action@reviewdog
with:
files: docs/source

0 comments on commit a3e9ee1

Please sign in to comment.