]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
build: add documentation CI build
authorDaniel Wagner <dwagner@suse.de>
Wed, 10 Jul 2024 06:58:16 +0000 (08:58 +0200)
committerDaniel Wagner <wagi@monom.org>
Wed, 10 Jul 2024 07:07:44 +0000 (09:07 +0200)
Build the documentation in the CI build to catch formatting issues in
the submissions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
.github/workflows/docs.yaml [new file with mode: 0644]
scripts/build.sh

diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
new file mode 100644 (file)
index 0000000..89fbd67
--- /dev/null
@@ -0,0 +1,26 @@
+---
+name: docs
+
+on:
+  push:
+    branches: [master]
+    paths:
+      - Documentation/**
+  pull_request:
+    branches: [master]
+    paths:
+      - Documentation/**
+
+  workflow_dispatch:
+
+jobs:
+  build-docs:
+    name: build documentation
+    runs-on: ubuntu-latest
+    container:
+      image: ghcr.io/igaw/linux-nvme/debian:latest
+    steps:
+      - uses: actions/checkout@v4
+      - name: build
+        run: |
+          scripts/build.sh docs
index be907a5af73d03f3261aed6bf55773384706256f..933d62bc7a204e9104fffe30a0b192fc7c7638dd 100755 (executable)
@@ -22,6 +22,7 @@ usage() {
     echo "  coverage            build coverage report"
     echo "  appimage            build AppImage target"
     echo "  distro              build libnvme and nvme-cli separately"
+    echo "  docs                build documentation"
     echo ""
     echo "configs with muon:"
     echo "  [default]           minimal static build"
@@ -116,6 +117,15 @@ config_meson_appimage() {
         "${BUILDDIR}"
 }
 
+config_meson_docs() {
+    CC="${CC}" "${MESON}" setup                 \
+        -Ddocs=all                              \
+        -Ddocs-build=true                       \
+        --force-fallback-for=libnvme            \
+        -Dlibnvme:werror=false                  \
+        "${BUILDDIR}"
+}
+
 build_meson() {
     "${MESON}" compile                          \
         -C "${BUILDDIR}"