From 0d6481295c63f16b1402fdad90bcda1a601e9db8 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 13 Feb 2026 18:07:28 +0100 Subject: [PATCH 1/2] build: remove duplicate workflows The coverage and the docs build workflow are duplicates, they are already build by the coverage.yml and docs.yml workflows. Signed-off-by: Daniel Wagner --- .github/workflows/libnvme-coverage.yml | 26 -------------------------- .github/workflows/libnvme-docs.yaml | 25 ------------------------- 2 files changed, 51 deletions(-) delete mode 100644 .github/workflows/libnvme-coverage.yml delete mode 100644 .github/workflows/libnvme-docs.yaml diff --git a/.github/workflows/libnvme-coverage.yml b/.github/workflows/libnvme-coverage.yml deleted file mode 100644 index 4554435782..0000000000 --- a/.github/workflows/libnvme-coverage.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: libnvme coverage - -on: - push: - branches: [master] - -jobs: - code-coverage: - if: github.repository == 'linux-nvme/libnvme' - name: code coverage - runs-on: ubuntu-latest - continue-on-error: true - container: - image: ghcr.io/linux-nvme/debian.python:latest - steps: - - uses: actions/checkout@v5 - - name: Mark repo as safe for git - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: build - run: | - libnvme/scripts/build.sh coverage - - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true diff --git a/.github/workflows/libnvme-docs.yaml b/.github/workflows/libnvme-docs.yaml deleted file mode 100644 index 665b166fd9..0000000000 --- a/.github/workflows/libnvme-docs.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: libnvme docs - -on: - push: - branches: [master] - pull_request: - branches: [master] - - workflow_dispatch: - -jobs: - build-docs: - name: build documentation - runs-on: ubuntu-latest - container: - image: ghcr.io/linux-nvme/debian:latest - steps: - - uses: actions/checkout@v5 - - name: Mark repo as safe for git - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: build - run: | - scripts/build.sh docs -# libnvme/scripts/build.sh docs From 994d22c49a7b5a5fe6fed7edd8dec582955b5819 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Thu, 22 Jan 2026 20:18:12 +0100 Subject: [PATCH 2/2] docs: update readthedocs setup Update the configuration so it works for two projects. Signed-off-by: Daniel Wagner --- .readthedocs.yaml | 22 ++++++++++++---------- libnvme/.readthedocs.yaml | 22 ++++++++++++++++++++++ scripts/build.sh | 19 ++++++++++++++++--- 3 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 libnvme/.readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6cfc289a62..b76a9c3c0f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,23 +1,25 @@ # SPDX-License-Identifier: Apache-2.0 - version: 2 build: os: ubuntu-24.04 tools: - python: "3" + python: "3.11" + apt_packages: - meson - python3-lxml - docbook-xsl - xsltproc - pandoc - jobs: - post_install: - - pip3 install lxml - pre_build: - - meson setup .build -Ddocs=rst -Ddocs-build=true -Dnvme=disabled -Dlibnvme=disabled -Dpython=disabled || cat .build/meson-logs/meson-log.txt - - meson compile -C .build + - asciidoc + - xmlto + + commands: + - pip install lxml + - scripts/build.sh docs + - cp .build-ci/Documentation/nvme.html .build-ci/Documentation/index.html + + output: .build-ci/Documentation -sphinx: - configuration: .build/libnvme/doc/conf.py +formats: [] diff --git a/libnvme/.readthedocs.yaml b/libnvme/.readthedocs.yaml new file mode 100644 index 0000000000..52c01cc916 --- /dev/null +++ b/libnvme/.readthedocs.yaml @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: Apache-2.0 + +version: 2 + +build: + os: ubuntu-24.04 + tools: + python: "3.11" + + apt_packages: + - meson + - python3-lxml + - docbook-xsl + - xsltproc + - pandoc + + commands: + - pip install lxml + - scripts/build.sh rst_docs + +sphinx: + configuration: .build-ci/libnvme/doc/conf.py diff --git a/scripts/build.sh b/scripts/build.sh index f69b54fa9c..7627a3161d 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -23,7 +23,8 @@ usage() { echo " cross use cross toolchain to build" echo " coverage build coverage report" echo " distro build libnvme and nvme-cli separately" - echo " docs build documentation" + echo " docs build all documentation" + echo " rst_docs build rst documentation only" echo " static build a static binary" echo " libnvme build only libnvme" echo "" @@ -123,12 +124,24 @@ config_meson_coverage() { config_meson_docs() { CC="${CC}" "${MESON}" setup \ + -Dnvme=disabled \ + -Dlibnvme=disabled \ -Ddocs=all \ -Ddocs-build=true \ --prefix=/tmp/usr \ "${BUILDDIR}" } +config_meson_rst_docs() { + CC="${CC}" "${MESON}" setup \ + -Dnvme=disabled \ + -Dlibnvme=disabled \ + -Ddocs=rst \ + -Ddocs-build=true \ + --prefix=/tmp/usr \ + "${BUILDDIR}" +} + config_meson_static() { CC="${CC}" "${MESON}" setup \ --werror \ @@ -146,8 +159,8 @@ config_meson_libnvme() { CC="${CC}" "${MESON}" setup \ --werror \ --buildtype="${BUILDTYPE}" \ - -Dnvme=disabled \ - -Dlibnvme=enabled \ + -Dnvme=disabled \ + -Dlibnvme=enabled \ "${BUILDDIR}" }