Repository navigation
Expand file tree
/
Copy path.readthedocs.yaml
More file actions
54 lines (49 loc) · 1.88 KB
/
Copy path.readthedocs.yaml
File metadata and controls
54 lines (49 loc) · 1.88 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
52
53
54
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.11"
apt_packages:
- build-essential
- cmake
- gfortran
- libfftw3-dev
- libopenblas-dev
- ninja-build
- pkg-config
jobs:
pre_build:
# Build only the INPUT-registry dumper (~30 sources), not the full
# program: compiling all of ABACUS took most of RTD's 15-minute limit.
- cmake -Bbuild -GNinja -DENABLE_MPI=OFF -DENABLE_LCAO=OFF
- cmake --build build --target abacus_input_yaml -j $(nproc)
- build/source/source_io/abacus_input_yaml > docs/parameters.yaml
- python3 docs/generate_input_main.py docs/parameters.yaml
# RTD builds PR (external) versions as HTML only, so PDF failures would
# not surface until post-merge. Run the same latex->PDF chain here as a
# pre-merge gate. `latexpdf` is a make-mode target, not a -b builder,
# hence the two-step latex build + make all-pdf.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ]; then
sphinx-build -b latex docs/ _latex_prcheck --fail-on-warning
fi
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true
# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt