From patchwork Mon May 11 13:48:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 26711 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A2D60BDCBD for ; Mon, 11 May 2026 13:48:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5200F63020; Mon, 11 May 2026 15:48:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="W2vYayqP"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9FE2E6301A for ; Mon, 11 May 2026 15:48:24 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:b16a:5ed9:4ada:a95a]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 9CC89593; Mon, 11 May 2026 15:48:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778507297; bh=vFZ4g8nAup+uYoLfgw2byBc4w66PmQ++ogR9Tl914hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W2vYayqP2cFqiusBUyj5tW7DXJCH5fnrGK7JOXNxf+6KWH0OklcJM4WCdV4x+KXo6 Y9FsyQXdPCexE+mkW/ZhriyHglp2Tme2lZzopmKOXxwPjFYhLC0qALEQhLFSkkzhCZ /XQEgo5Dy/T25UBr5HqqH5nh2ALxR3Cg6HrKHfs4= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 1/2] Split documentation build into separate build step Date: Mon, 11 May 2026 15:48:04 +0200 Message-ID: <20260511134817.2841886-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260511134817.2841886-1-stefan.klug@ideasonboard.com> References: <20260511134817.2841886-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Create a separate build step that builds the docs and merges the html docs and the api docs into a single docs directory. Drop the documentation build from the build-full step as it is no longer needed there. Signed-off-by: Stefan Klug --- Changes in v2: - Fixed copyright - Fixed comments and build message - Build debug for now, as the upstream release build is broken - Collect docs from a temporary install dir --- .gitlab-ci/build-libcamera-docs.sh | 35 ++++++++++++++++++++++++++++++ gitlab-ci.yml | 30 +++++++++++++++++++++---- 2 files changed, 61 insertions(+), 4 deletions(-) create mode 100755 .gitlab-ci/build-libcamera-docs.sh diff --git a/.gitlab-ci/build-libcamera-docs.sh b/.gitlab-ci/build-libcamera-docs.sh new file mode 100755 index 000000000000..cccb5bad9cb5 --- /dev/null +++ b/.gitlab-ci/build-libcamera-docs.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: © 2026 Ideas on Board +# +# Build libcamera docs and collect them in ./docs + +set -e + +source "$(dirname "$0")/lib.sh" +source "$(dirname "$0")/build-libcamera-common.sh" + +libcamera_build_docs() { + echo "Building libcamera docs" + + # Fixme: This should only build the documentation, but as we can't use + # the doc tag for installation we need to build everything. + meson compile -C build -j$BUILD_CONCURRENT_JOBS + + echo "Installing docs" + rm -rf install + mkdir install + + # Fixme: This should use --tags doc,doc-internal, but the installation + # mechanics are broken and need to be fixed in libcamera. Install the + # whole project for now. + meson install -C build --destdir $(pwd)/install + + rm -rf docs + mv install/usr/local/share/doc/libcamera-*/html docs +} + +run libcamera_install_pkgs +run libcamera_setup +run libcamera_build_docs collapsed diff --git a/gitlab-ci.yml b/gitlab-ci.yml index f887e3b6c221..7c5e59de30a1 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -229,10 +229,6 @@ build-full:debian:13: - ARCH: amd64 CC: gcc-14 CXX: g++-14 - MESON_OPTIONS: >- - ${MESON_ALL_OPTIONS} - -D documentation=enabled - -D doc_werror=true - ARCH: amd64 CC: clang CXX: clang++ @@ -302,6 +298,32 @@ build-package:debug: - ARCH: amd64 - ARCH: arm64 +# Build documentation. +build-docs: + extends: + - .fdo.distribution-image@debian + - .libcamera-ci.debian:13 + - .libcamera-ci.scripts + stage: build + needs: + - job: container-debian:13 + artifacts: false + script: + - $CI_PROJECT_DIR/.gitlab-ci/build-libcamera-docs.sh + artifacts: + name: libcamera-docs-${CI_COMMIT_SHA} + when: always + expire_in: 1 week + paths: + - docs + variables: + # Fixme: Switch to release build as soon as the build issues are fixed. + BUILD_TYPE: debug + MESON_OPTIONS: >- + ${MESON_ALL_OPTIONS} + -D documentation=enabled + -D doc_werror=true + # ------------------------------------------------------------------------------ # Lint stage - Run checkstyle.py and check merge suitability # ------------------------------------------------------------------------------