forked from qutip/qutip
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.12 KB
/
build_documentation.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build documentation
on:
[push, pull_request]
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Install documentation dependencies
run: |
pip install pip --upgrade
python -mpip install -r doc/requirements.txt
sudo apt-get update
sudo apt-get install texlive-full
- name: Install QuTiP from GitHub
run: |
# Build without build isolation so that we use the build
# dependencies already installed from doc/requirements.txt.
python -m pip install -e .[full] --no-build-isolation --config-settings editable_mode=compat
# Install in editable mode so it doesn't matter if we import from
# inside the installation directory, otherwise we can get some errors
# because we're importing from the wrong location.
python -c 'import qutip; qutip.about()'
- name: Build PDF documentation
working-directory: doc
run: |
make latexpdf SPHINXOPTS="-W --keep-going -T"
# Above flags are:
# -W : turn warnings into errors
# --keep-going : do not stop after the first error
# -T : display a full traceback if a Python exception occurs
- name: Upload built PDF files
uses: actions/upload-artifact@v4
with:
name: qutip_pdf_docs
path: doc/_build/latex/*
if-no-files-found: error
- name: Build HTML documentation
working-directory: doc
run: |
make html SPHINXOPTS="-W --keep-going -T"
# Above flags are:
# -W : turn warnings into errors
# --keep-going : do not stop after the first error
# -T : display a full traceback if a Python exception occurs
- name: Upload built HTML files
uses: actions/upload-artifact@v4
with:
name: qutip_html_docs
path: doc/_build/html/*
if-no-files-found: error