From patchwork Wed May 13 21:26:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26752 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 21BD8C32F7 for ; Wed, 13 May 2026 21:26:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B4ECC6302C; Wed, 13 May 2026 23:26:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fyc6pqBN"; 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 F405962010 for ; Wed, 13 May 2026 23:26:15 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2F3546A2; Wed, 13 May 2026 23:26:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778707567; bh=w05tNqThj/PFnem7ewoG/STHKiPlUchNedzw7ny+O7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fyc6pqBNF/oAS0DD0qopDZAsw+LrMUDRlCTLDAgk9ktw/4iNDDDmTiU1N4LC1HPCD kF3cJYksrsUcCFbfvMRlAJ0KKf39W1t6Uqg5FjVZfkqKROXPwKDkdTDbB+8p3glfR7 4XHHyCiu01Ies9wvzAwWwvmDH7spIWIlIcxeFg0U= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [libcamera-ci] [PATCH v3 1/2] Split documentation build into separate build step Date: Thu, 14 May 2026 00:26:11 +0300 Message-ID: <20260513212613.362445-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260513212613.362445-1-laurent.pinchart@ideasonboard.com> References: <20260513212613.362445-1-laurent.pinchart@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" From: Stefan Klug 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 Signed-off-by: Laurent Pinchart --- Changes since v2: - Don't run libcamera_install_pkgs - Only build the documentation target - Install to 'install' instead of '$(pwd)/install' as in other jobs - Move public and internal API docs to the correct location - Install with --no-rebuild - Add meson-logs/ and build.ninja to artifacts (requested by Barnabás) - Use release build - Use minimal meson options --- .gitlab-ci/build-libcamera-docs.sh | 42 ++++++++++++++++++++++++++++++ gitlab-ci.yml | 33 ++++++++++++++++++++--- 2 files changed, 71 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..26aec0813007 --- /dev/null +++ b/.gitlab-ci/build-libcamera-docs.sh @@ -0,0 +1,42 @@ +#!/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" + + meson compile -C build -j$BUILD_CONCURRENT_JOBS documentation + + echo "Installing docs" + rm -rf build/install + + meson install -C build \ + --destdir install \ + --no-rebuild \ + --tags doc,doc-internal + + local doc_dir=(build/install/usr/local/share/doc/libcamera-*) + + rm -rf docs + mv "${doc_dir}/html" docs + + # Move the internal and public API directories to the correct location + # in case the libcamera documentation post-install script has not run. + for api in internal-api public-api ; do + if [[ -d "${doc_dir}/${api}" ]] ; then + rm -rf "docs/${api}" + mv "${doc_dir}/${api}" docs/ + fi + done +} + +run libcamera_setup +run libcamera_build_docs collapsed diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 2b376c5da1ee..278e69079c15 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -209,10 +209,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 BUILD_TYPE: release CC: gcc-14 @@ -301,6 +297,35 @@ 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: + - build/meson-logs/ + - build/build.ninja + - docs + variables: + BUILD_TYPE: release + MESON_OPTIONS: >- + --auto-features disabled + -D pipelines=[] + -D test=false + -D documentation=enabled + -D doc_werror=true + # ------------------------------------------------------------------------------ # Lint stage - Run checkstyle.py and check merge suitability # ------------------------------------------------------------------------------