Skip to content

Commit af7a042

Browse files
committed
docs: update readthedocs setup
Update the configuration so it works for two projects. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 0d64812 commit af7a042

4 files changed

Lines changed: 57 additions & 26 deletions

File tree

.libnvme.readthedocs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
version: 2
4+
5+
build:
6+
os: ubuntu-24.04
7+
tools:
8+
python: "3.11"
9+
10+
apt_packages:
11+
- meson
12+
- python3-lxml
13+
- docbook-xsl
14+
- xsltproc
15+
- pandoc
16+
17+
commands:
18+
- pip install lxml
19+
- scripts/build.sh rst_docs
20+
21+
sphinx:
22+
configuration: .build-ci/libnvme/doc/conf.py

.nvme-cli.readthedocs.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
version: 2
3+
4+
build:
5+
os: ubuntu-24.04
6+
tools:
7+
python: "3.11"
8+
9+
apt_packages:
10+
- meson
11+
- python3-lxml
12+
- docbook-xsl
13+
- xsltproc
14+
- pandoc
15+
16+
commands:
17+
- pip install lxml
18+
- scripts/build.sh docs
19+
- cp .build-ci/Documentation/nvme.html .build-ci/Documentation/index.html
20+
21+
output: .build-ci/Documentation
22+
23+
formats: []

.readthedocs.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

scripts/build.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ usage() {
2323
echo " cross use cross toolchain to build"
2424
echo " coverage build coverage report"
2525
echo " distro build libnvme and nvme-cli separately"
26-
echo " docs build documentation"
26+
echo " docs build all documentation"
27+
echo " rst_docs build rst documentation only"
2728
echo " static build a static binary"
2829
echo " libnvme build only libnvme"
2930
echo ""
@@ -129,6 +130,14 @@ config_meson_docs() {
129130
"${BUILDDIR}"
130131
}
131132

133+
config_meson_rst_docs() {
134+
CC="${CC}" "${MESON}" setup \
135+
-Ddocs=rst \
136+
-Ddocs-build=true \
137+
--prefix=/tmp/usr \
138+
"${BUILDDIR}"
139+
}
140+
132141
config_meson_static() {
133142
CC="${CC}" "${MESON}" setup \
134143
--werror \
@@ -146,8 +155,8 @@ config_meson_libnvme() {
146155
CC="${CC}" "${MESON}" setup \
147156
--werror \
148157
--buildtype="${BUILDTYPE}" \
149-
-Dnvme=disabled \
150-
-Dlibnvme=enabled \
158+
-Dnvme=disabled \
159+
-Dlibnvme=enabled \
151160
"${BUILDDIR}"
152161
}
153162

0 commit comments

Comments
 (0)