[LTP] [PATCH 1/1] ci: Add spinx related job

Petr Vorel pvorel@suse.cz
Mon May 6 23:27:34 CEST 2024


Because by default we don't build doc at all.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,

Tested: https://github.com/pevik/ltp/actions/runs/8976016156

NOTE: it'd be nice to add make install target
(I'm not sure how to get prefix, hopefully including
include/mk/config.mk could be enough).

Also, I'd rename (in a separate commit) .github/workflows/ci.yml
to .github/workflows/ci-docker-build.yml to make it more obvious.

Kind regards,
Petr

 .github/workflows/ci-sphinx-doc.yml | 35 +++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 .github/workflows/ci-sphinx-doc.yml

diff --git a/.github/workflows/ci-sphinx-doc.yml b/.github/workflows/ci-sphinx-doc.yml
new file mode 100644
index 000000000..4bde5cbc8
--- /dev/null
+++ b/.github/workflows/ci-sphinx-doc.yml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2024 Petr Vorel <pvorel@suse.cz>
+
+name: "Test building sphinx doc"
+
+on: [push, pull_request]
+
+permissions: {}
+
+jobs:
+  sphinx:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout LTP
+        uses: actions/checkout@v2
+        with:
+          path: ltp
+
+      - name: Install spinx
+        run: |
+          sudo apt update
+          sudo apt install python3-sphinx python3-virtualenv
+
+      - name: Install spinx dependencies
+        run: |
+          cd "$GITHUB_WORKSPACE/ltp/doc/"
+          python3 -m virtualenv .venv
+          . .venv/bin/activate
+          pip install -r requirements.txt
+
+      - name: Build doc
+        run: |
+          cd "$GITHUB_WORKSPACE/ltp/doc/"
+          . .venv/bin/activate
+          make
-- 
2.43.0



More information about the ltp mailing list