Skip to content

Commit

Permalink
Add in-tree docs (angr#3849)
Browse files Browse the repository at this point in the history
* Add in-tree docs

* Add build dependencies to RTD build

* Also install newer pip

* Install angrdb and pcode when building docs

* Sync ci docs with rtd config

* Use pipe for multiline string

* Fix typo

* Replace copyright with project_copyright

* Ignore type aliases in sphinx coverage

* Add links to plugin documentation

* Use coverage_ignore_pyobjects to ignore aliases

* Attribute copyright to contributors
  • Loading branch information
twizmwazin authored Mar 9, 2023
1 parent 9c09678 commit 5051023
Show file tree
Hide file tree
Showing 10 changed files with 717 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,32 @@ on:
jobs:
ci:
uses: angr/ci-settings/.github/workflows/angr-ci.yml@master
docs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install
run: |
pip install -U pip "setuptools>=59" wheel "unicorn==2.0.1.post1"
pip install git+https://github.com/angr/archinfo.git
pip install git+https://github.com/angr/pyvex.git
pip install git+https://github.com/angr/cle.git
pip install git+https://github.com/angr/claripy.git
pip install git+https://github.com/angr/ailment.git
pip install --no-build-isolation .[angrdb,docs,pcode]
- name: Build docs
run: cd docs && make html
- name: Build coverage
run: cd docs && make coverage
- name: Test coverage
run: >
if [ -s docs/_build/coverage/python.txt ]; then
echo "Doc coverage is missing for the for:"
cat docs/_build/coverage/python.txt
exit 1
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ dist
.vscode/
*.db
*.dylib
docs/_build
17 changes: 17 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
jobs:
post_create_environment:
- pip install -U pip "setuptools>=59" wheel "unicorn==2.0.1.post1"
- pip install git+https://github.com/angr/archinfo.git
- pip install git+https://github.com/angr/pyvex.git
- pip install git+https://github.com/angr/cle.git
- pip install git+https://github.com/angr/claripy.git
- pip install git+https://github.com/angr/ailment.git
- pip install --no-build-isolation .[angrdb,docs,pcode]
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading

0 comments on commit 5051023

Please sign in to comment.