-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy path.readthedocs.yaml
More file actions
51 lines (48 loc) · 2.21 KB
/
Copy path.readthedocs.yaml
File metadata and controls
51 lines (48 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: 2
formats:
- htmlzip
# - pdf
sphinx:
configuration: docs/conf.py
build:
os: ubuntu-24.04
tools:
python: "3.14"
apt_packages:
- graphviz
- inkscape
jobs:
post_checkout:
# Skip docs build if the commit message contains "skip ci"
- (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viq "skip ci") || exit 183
# Skip docs build if there are no changes related to docs
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- bindings/ include/ docs/ python/ .github/SUPPORT.md .readthedocs.yaml;
then
exit 183;
fi
# Unshallow the git clone and fetch tags to get proper version information
- git fetch --unshallow --tags
pre_build:
# Set up uv
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- wget https://github.com/Z3Prover/z3/releases/download/z3-4.13.4/z3-4.13.4-x64-glibc-2.35.zip
- unzip z3-4.13.4-x64-glibc-2.35.zip -d ~/
# Set up build-time dependencies
- uv sync --only-group build --only-group docs
# Install CMake because the default version on Ubuntu 24.04 is too old
- uv pip install cmake
build:
html:
- Z3_ROOT=~/z3-4.13.4-x64-glibc-2.35 uv run --frozen --no-dev --no-build-isolation-package mqt-qmap -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
htmlzip:
- Z3_ROOT=~/z3-4.13.4-x64-glibc-2.35 uv run --frozen --no-dev --no-build-isolation-package mqt-qmap -m sphinx -T -b dirhtml -d docs/_build/doctrees -D language=en docs docs/_build/dirhtml
- mkdir -p $READTHEDOCS_OUTPUT/htmlzip
- zip -r $READTHEDOCS_OUTPUT/htmlzip/html.zip docs/_build/dirhtml/*
# pdf:
# - Z3_ROOT=~/z3-4.13.4-x64-glibc-2.35 uv run --frozen --no-dev --no-build-isolation-package mqt-qmap -m sphinx -T -b latex -d docs/_build/doctrees -D language=en docs docs/_build/latex
# - cd docs/_build/latex && latexmk -pdf -f -dvi- -ps- -interaction=nonstopmode -jobname=$READTHEDOCS_PROJECT
# - mkdir -p $READTHEDOCS_OUTPUT/pdf
# - cp docs/_build/latex/$READTHEDOCS_PROJECT.pdf $READTHEDOCS_OUTPUT/pdf/$READTHEDOCS_PROJECT.pdf